source: trunk/athena/bin/athrun/bash_completion @ 23802

Revision 23802, 462 bytes checked in by broder, 15 years ago (diff)
In athrun's bash_completion: You can never have enough quotes.
Line 
1_athrun () {
2    local cur
3    local opts
4    COMPREPLY=()
5    prev="${COMP_WORDS[COMP_CWORD-1]}"
6    cur="${COMP_WORDS[COMP_CWORD]}"
7    if [ $COMP_CWORD -lt 3 ]; then
8        case $COMP_CWORD in
9            1)
10                opts="$(ls /mit)"
11                ;;
12            2)
13                opts="$(ls "$(athdir "/mit/$prev" bin)")"
14                ;;
15        esac
16        COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
17    fi
18}
19complete -F _athrun athrun
Note: See TracBrowser for help on using the repository browser.