2003-08-04 03:18:31 +00:00
|
|
|
# gkrellm(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
|
2003-12-31 07:22:37 +00:00
|
|
|
|
2009-06-08 21:22:43 +03:00
|
|
|
have gkrellm || have gkrellm2 &&
|
2003-08-04 03:18:31 +00:00
|
|
|
_gkrellm()
|
|
|
|
{
|
2009-10-04 19:42:50 +02:00
|
|
|
local cur prev
|
2003-08-04 03:18:31 +00:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
COMPREPLY=()
|
|
|
|
cur=`_get_cword`
|
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
2003-08-04 03:18:31 +00:00
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
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
|
2003-08-04 03:18:31 +00:00
|
|
|
|
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
|
2003-08-04 03:18:31 +00:00
|
|
|
|
2009-06-08 21:22:43 +03:00
|
|
|
} &&
|
2009-10-22 12:04:29 +03:00
|
|
|
complete -F _gkrellm -o filenames gkrellm gkrellm2
|
2009-10-01 20:54:51 +03:00
|
|
|
|
|
|
|
# Local variables:
|
|
|
|
# mode: shell-script
|
2009-10-04 19:42:50 +02:00
|
|
|
# sh-basic-offset: 4
|
2009-10-01 20:54:51 +03:00
|
|
|
# sh-indent-comment: t
|
2009-10-04 19:42:50 +02:00
|
|
|
# indent-tabs-mode: nil
|
2009-10-01 20:54:51 +03:00
|
|
|
# End:
|
2009-10-04 19:42:50 +02:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|