[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-100-g5dba39c
Igor Murzov
e-mail at date.by
Sun Dec 18 18:02:41 UTC 2011
The following commit has been merged in the master branch:
commit 5dba39cbd3283f1e127753b3d54a200a1ffecbd6
Author: Igor Murzov <e-mail at date.by>
Date: Sun Dec 18 21:59:15 2011 +0400
htop: New completoin.
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 797fc88..ea30170 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -114,6 +114,7 @@ bashcomp_DATA = a2x \
hddtemp \
hid2hci \
hping2 \
+ htop \
htpasswd \
iconv \
id \
diff --git a/completions/kcov b/completions/htop
similarity index 54%
copy from completions/kcov
copy to completions/htop
index 21a8eba..969eb39 100644
--- a/completions/kcov
+++ b/completions/htop
@@ -1,25 +1,20 @@
-# kcov completion -*- shell-script -*-
+# htop(1) completion -*- shell-script -*-
-_kcov()
+_htop()
{
local cur prev words cword split
_init_completion -s || return
case "$prev" in
- --pid|-p)
- _pids
+ -s|--sort-key)
+ COMPREPLY=( $( compgen -W '$( "$1" -s help )' -- "$cur" ) )
return
;;
- --sort-type|-s)
- COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) )
+ -u|--user)
+ _usergroup
return
;;
- --include-path|--exclude-path)
- _filedir
- return
- ;;
- --limits|-l|--title|-t|--include-pattern|--exclude-pattern|\
- --path-strip-level)
+ -d|--delay)
# argument required but no completions available
return
;;
@@ -32,8 +27,6 @@ _kcov()
[[ $COMPREPLY == *= ]] && compopt -o nospace
return
fi
-
- _filedir
-} && complete -F _kcov kcov
+} && complete -F _htop htop
# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/htop.exp b/test/completion/htop.exp
new file mode 100644
index 0000000..c537247
--- /dev/null
+++ b/test/completion/htop.exp
@@ -0,0 +1 @@
+assert_source_completions htop
diff --git a/test/lib/completions/abook.exp b/test/lib/completions/htop.exp
similarity index 80%
copy from test/lib/completions/abook.exp
copy to test/lib/completions/htop.exp
index 43f6272..d3e94d1 100644
--- a/test/lib/completions/abook.exp
+++ b/test/lib/completions/htop.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "abook "
+assert_complete_any "htop -"
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list