Revision 24429,
365 bytes
checked in by broder, 15 years ago
(diff) |
In athinfo:
* Enable tab-completion for athrun. (Trac: #364)
|
Line | |
---|
1 | _athinfo () { |
---|
2 | COMPREPLY=() |
---|
3 | local cur="${COMP_WORDS[$COMP_CWORD]}" |
---|
4 | |
---|
5 | if [ $COMP_CWORD -eq 1 ]; then |
---|
6 | _known_hosts -a |
---|
7 | elif [ $COMP_CWORD -eq 2 ]; then |
---|
8 | local IFS=$'\n' |
---|
9 | COMPREPLY=( $(compgen -W "$(athinfo -t 1 "${COMP_WORDS[1]}" queries 2>/dev/null | awk '!/^#/ && !/^$/ { print $1 }')" -- "$cur") ) |
---|
10 | fi |
---|
11 | } |
---|
12 | complete -F _athinfo athinfo |
---|
Note: See
TracBrowser
for help on using the repository browser.