# freeciv client completions -*- shell-script -*- proc _civclient { local cur prev words cword _init_completion || return match $prev { with -l|-S|-t|--log|--Sound|--tiles _filedir return 0 with -P|--Plugin setglobal COMPREPLY = ''( $( compgen -W 'none esd sdl' -- "$cur" ) ) return 0 with -s|--server _known_hosts_real $cur return 0 } if [[ "$cur" == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) } } && complete -F _civclient civclient freeciv-gtk2 freeciv-sdl freeciv-xaw # ex: ts=4 sw=4 et filetype=sh