diff options
Diffstat (limited to 'contrib/lisp')
-rw-r--r-- | contrib/lisp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/contrib/lisp b/contrib/lisp index be8e1f92..cf9e2f8b 100644 --- a/contrib/lisp +++ b/contrib/lisp @@ -1,9 +1,7 @@ -# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- -# ex: ts=8 sw=8 noet filetype=sh -# # bash programmable completion for various Common Lisp implementations by # Nikodemus Siivola <nikodemus@random-state.net> +have lisp && _lisp() { local cur @@ -13,14 +11,21 @@ _lisp() # completing an option (may or may not be separated by a space) if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '-core -lib -batch -quit -edit -eval -init \ - -dynamic-space-size -hinit -noinit -nositeinit -load \ - -slave ' \ - -- $cur ) ) + COMPREPLY=( $( compgen -W '-core -lib -batch -quit -edit -eval -init \ + -dynamic-space-size -hinit -noinit -nositeinit -load -slave ' \ + -- "$cur" ) ) else - _filedir + _filedir fi return 0 -} -complete -F _lisp -o default lisp +} && +complete -F _lisp $default lisp + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh |