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