10 dir=$CROMBIEPATH/scripts
11 files=($dir/*.[p,s]? $dir/*.R)
18 if [
"${f%%.*}" !=
"README" -a
"${f%%.*}" !=
"noauto" ]
20 subcommands+=
"${f%%.*} " 26 cur=${COMP_WORDS[COMP_CWORD]}
27 prev=${COMP_WORDS[$((COMP_CWORD-1))]}
29 if [
"$prev" =
"crombie" ]
32 COMPREPLY=( $(compgen -W
"${subcommands[@]}" $cur ) )
34 elif [
"$prev" =
"submitlxbatch" ]
37 COMPREPLY=( $(compgen -W
"hadd test resub fresh" $cur ) )
39 elif [
"$prev" =
"submitcondor" ]
42 COMPREPLY=( $(compgen -W
"test fresh" $cur ) )
44 elif [
"$prev" =
"terminalslim" ]
47 COMPREPLY=( $(compgen -W
"hadd resub fresh" $cur ) )
49 elif [
"$prev" =
"presentation" ]
52 COMPREPLY=( $(compgen -W `date +%y%m%d` $cur ) )
54 elif [
"$prev" =
"backupslides" ]
57 COMPREPLY=( $(compgen -W
"all" $cur ) )
59 elif [
"$prev" =
"workspace" ]
62 COMPREPLY=( $(compgen -W
"test" $cur ) )
64 elif [
"$prev" =
"test" -a $COMP_CWORD -eq 2 ]
67 COMPREPLY=( $(compgen -W
"fast" $cur ) )
69 elif [
"$prev" =
"generatedocs" ]
72 COMPREPLY=( $(compgen -W
"copy test" $cur ) )
74 elif [
"$prev" =
"addxs" ]
77 COMPREPLY=( $(compgen -W
"skip" $cur ) )
79 elif [
"${COMP_WORDS[1]}" =
"generatedocs" ]
82 if [
"$prev" =
"copy" ]
84 COMPREPLY=( $(compgen -W
"athena lxplus" $cur ) )
89 elif [
"${COMP_WORDS[1]}" =
"compile" ]
92 fullobjects=($CROMBIEPATH/old/*/src/*.cc)
95 for obj
in ${fullobjects[@]}
97 withext=
"$( basename $obj )" 98 objects+=
"${withext%%.*} " 101 COMPREPLY=( $(compgen -W
"${objects[@]}" $cur ) )
113 complete -o bashdefault -o default -F _crombie_subs crombie