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