58 lines
1.2 KiB
Plaintext
Raw Normal View History

# freeciv completions
2003-12-31 07:22:37 +00:00
have civserver || have freeciv-server &&
_civserver()
{
local cur prev words cword
_init_completion || return
case $prev in
-f|-g|-l|-r|--file|--log|--gamelog|--read)
2009-10-04 19:42:50 +02:00
_filedir
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
2009-10-04 19:42:50 +02:00
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _civserver civserver freeciv-server
have civclient || have freeciv-gtk2 || have freeciv-sdl || have freeciv-xaw &&
_civclient()
{
local cur prev words cword
_init_completion || return
case $prev in
-l|-S|-t|--log|--Sound|--tiles)
2009-10-04 19:42:50 +02:00
_filedir
return 0
;;
-P|--Plugin)
2009-10-04 19:42:50 +02:00
COMPREPLY=( $( compgen -W 'none esd sdl' -- "$cur" ) )
return 0
;;
-s|--server)
2009-10-04 19:42:50 +02:00
_known_hosts_real "$cur"
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
2009-10-04 19:42:50 +02:00
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _civclient civclient freeciv-gtk2 freeciv-sdl freeciv-xaw
# 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