Last change
on this file since 437 was
420,
checked in by g7moreau, 5 years ago
|
- Add everything to build a Debian package
|
File size:
634 bytes
|
Rev | Line | |
---|
[420] | 1 | # bash completion for tssh |
---|
[221] | 2 | |
---|
[420] | 3 | have tssh && |
---|
| 4 | _tssh() { |
---|
[221] | 5 | local cur prev |
---|
| 6 | |
---|
| 7 | COMPREPLY=() |
---|
| 8 | #_get_comp_words_by_ref cur prev |
---|
| 9 | cur="${COMP_WORDS[COMP_CWORD]}" |
---|
| 10 | prev="${COMP_WORDS[COMP_CWORD-1]}" |
---|
| 11 | |
---|
| 12 | if [[ "$cur" == '-*' || $COMP_CWORD -gt 1 ]] |
---|
| 13 | then |
---|
[420] | 14 | COMPREPLY=($(compgen -W "$(tssh -h|grep '^ tssh'|sed -e 's/[\[]/\n/g;'|grep -- '^-'|cut -f 1 -d ']'|cut -f 1 -d ' '|sed -e 's/|/ /g;'|xargs echo -n)" -- "$cur")) |
---|
[221] | 15 | else |
---|
[420] | 16 | COMPREPLY=($(compgen -W "$(tssh -h|grep '^ tssh'|sed -e 's/[\[]/\n/g;'|grep -- '^-'|cut -f 1 -d ']'|cut -f 1 -d ' '|sed -e 's/|/ /g;'|xargs echo -n)" -- "$cur")) |
---|
[221] | 17 | fi |
---|
| 18 | |
---|
[420] | 19 | } && complete -F _tssh tssh |
---|
Note: See
TracBrowser
for help on using the repository browser.