56 lines
1.3 KiB
Plaintext
Raw Normal View History

# gkrellm(1) completion
2003-12-31 07:22:37 +00:00
2009-06-08 21:22:43 +03:00
have gkrellm || have gkrellm2 &&
_gkrellm()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-19 21:33:09 +03:00
-t|--theme)
2009-10-04 19:42:50 +02:00
_filedir -d
return 0
;;
2009-10-19 21:33:09 +03:00
-p|--plugin)
_filedir so
2009-10-04 19:42:50 +02:00
return 0
;;
2009-10-19 21:33:09 +03:00
-s|--server)
2009-10-04 19:42:50 +02:00
_known_hosts_real "$cur"
return 0
;;
2009-10-19 21:33:09 +03:00
-l|--logfile)
_filedir
return 0
;;
-g|--geometry|-c|--config|-P|--port|-d|--debug-level)
# Argument required but no completions available
return 0
;;
2009-10-19 21:39:55 +03:00
-h|--help|-v|--version)
# All other options are noop with these
return 0
;;
2009-10-04 19:42:50 +02:00
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
2009-10-19 21:33:09 +03:00
COMPREPLY=( $( compgen -W '--theme --geometry --wm --m2 --nt \
--withdrawn --config --force-host-config --server --port --nc \
--config-clean --nolock --plugin --demo --logfile --version \
--debug-level --help' -- "$cur" ) )
2009-10-04 19:42:50 +02:00
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _gkrellm -o filenames gkrellm gkrellm2
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh