1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
# rmaxima(1) completion -*- shell-script -*-
_rmaxima()
{
local cur prev words cword split
_init_completion -s || return
case $prev in
--help|-h|--version|-v)
return
;;
--batch|-b)
_filedir '@(mac|wxm)'
return
;;
--batch-lisp)
_filedir lisp
return
;;
--batch-string)
return
;;
--directories|-d)
_filedir -d
return
;;
--disable-readline)
return
;;
--enable-lisp-debugger|-g)
return
;;
--userdir)
_filedir -d
return
;;
--init)
_filedir '@(mac|wxm|lisp)'
return
;;
--init-mac)
_filedir mac
return
;;
--init-lisp)
_filedir lisp
return
;;
-l|--lisp)
return
;;
--list-avail)
return
;;
-p)
_filedir lisp
return
;;
-q|--quiet)
return
;;
-r|--run-string)
return
;;
-s|--server)
return
;;
-u|--use-version)
return
;;
-v|--verbose)
return
;;
--version)
return
;;
--very-quiet)
return
;;
-X|--lisp-options=)
return
;;
esac
$split && return 0
if [[ "$cur" == -* ]]; then
local opts="$( _parse_help "$1" )"
[[ $opts ]] || opts="$( _parse_usage "$1" )"
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
else
_filedir '@(mac|wxm)'
fi
} && complete -F _rmaxima rmaxima
|