2 # Modified inkscape template of allali@univ-mlv.fr
3 # by cengique@users.sf.net
11 cur=${COMP_WORDS[COMP_CWORD]}
13 if [[ $COMP_CWORD > 1 ]]; then
14 last=${COMP_WORDS[$(($COMP_CWORD - 1))]}
20 shopt -q extglob && g=1
21 test $g -eq 0 && shopt -s extglob
23 if [[ $last == +(--export|-e) ]]; then #'+(--export|-e)'
24 _filedir '+(pdf[1234]|PDF[1234]|pdf|PDF|ps|PS|xhtml|XHTML)'
28 COMPREPLY=( $( compgen -W '-help -userdir -sysdir \
29 -geometry -dbg -x --execute -e --export \
30 -i --import -version -batch' -- $cur ) ) ;;
36 # turn it off if necessary
37 test $g -eq 0 && shopt -u extglob
40 [ "${have:-}" ] && complete -F _lyxz $filenames lyx