nethogs: New completion.

This commit is contained in:
Igor Murzov 2011-11-25 04:33:36 +03:00
parent 2e859f1a6c
commit f271d7e8db
4 changed files with 47 additions and 0 deletions

View File

@ -199,6 +199,7 @@ bashcomp_DATA = a2x \
mysql \
mysqladmin \
ncftp \
nethogs \
newgrp \
newlist \
newusers \

25
completions/nethogs Normal file
View File

@ -0,0 +1,25 @@
# bash completion for nethogs(8) -*- shell-script -*-
_nethogs()
{
local cur prev words cword
_init_completion || return
case "$prev" in
-d)
# expect integer value
COMPREPLY+=( $( compgen -W '{0..9}' ) )
compopt -o nospace
return
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" -h )' -- "$cur" ) )
return
fi
_available_interfaces -a
} && complete -F _nethogs nethogs
# ex: ts=4 sw=4 et filetype=sh

View File

@ -0,0 +1 @@
assert_source_completions nethogs

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "nethogs "
sync_after_int
teardown