diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2013-01-30 22:25:26 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2013-01-30 22:25:26 +0200 |
commit | 8c572951330bb0ed3a669fd2d8e4dd219430ff11 (patch) | |
tree | 53b8f9b9ca18e2b2d1f6b00fa6496fdd1bfd9308 /completions/ngrep | |
parent | d08b9f233559b3dced20050ba312b08fe0de53b4 (diff) | |
download | bash-completion-8c572951330bb0ed3a669fd2d8e4dd219430ff11.tar.gz |
ngrep: New completion.
Diffstat (limited to 'completions/ngrep')
-rw-r--r-- | completions/ngrep | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/completions/ngrep b/completions/ngrep new file mode 100644 index 00000000..7c867649 --- /dev/null +++ b/completions/ngrep @@ -0,0 +1,37 @@ +# ngrep(8) completion -*- shell-script -*- + +_ngrep() +{ + local cur prev words cword + _init_completion || return + + case $prev in + -h|-V|-n|-A|-s|-S|-c|-P) + return + ;; + -I|-O) + _filedir pcap + return + ;; + -d) + _available_interfaces -a + return + ;; + -W) + COMPREPLY=( $( compgen -W 'normal byline single none' -- "$cur" ) ) + return + ;; + -F) + _filedir + return + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) ) + return + fi +} && +complete -F _ngrep ngrep + +# ex: ts=4 sw=4 et filetype=sh |