mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
Next patch from Cengiz
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34008 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a38f83d06b
commit
e7c91f1967
@ -5,18 +5,36 @@
|
|||||||
have lyx &&
|
have lyx &&
|
||||||
_lyx()
|
_lyx()
|
||||||
{
|
{
|
||||||
local cur
|
local cur g last
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ $COMP_CWORD > 1 ]]; then
|
||||||
|
last=${COMP_WORDS[$(($COMP_CWORD - 1))]}
|
||||||
|
else
|
||||||
|
last=''
|
||||||
|
fi
|
||||||
|
|
||||||
|
# turn on extglob
|
||||||
|
shopt -q extglob && g=1
|
||||||
|
test $g -eq 0 && shopt -s extglob
|
||||||
|
|
||||||
|
if [[ $last == +(--export|-e) ]]; then #'+(--export|-e)'
|
||||||
|
_filedir '+(pdf[1234]|PDF[1234]|pdf|PDF|ps|PS|xhtml|XHTML)'
|
||||||
|
else
|
||||||
|
case "$cur" in
|
||||||
|
-*)
|
||||||
COMPREPLY=( $( compgen -W '-help -userdir -sysdir \
|
COMPREPLY=( $( compgen -W '-help -userdir -sysdir \
|
||||||
-geometry -dbg -x --execute -e --export \
|
-geometry -dbg -x --execute -e --export \
|
||||||
-i --import -version -batch' -- $cur ) )
|
-i --import -version -batch' -- $cur ) ) ;;
|
||||||
else
|
*)
|
||||||
_filedir '@(lyx)'
|
_filedir '@(lyx)'
|
||||||
fi
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# turn it off if necessary
|
||||||
|
test $g -eq 0 && shopt -u extglob
|
||||||
|
|
||||||
}
|
}
|
||||||
[ "${have:-}" ] && complete -F _lyx $filenames lyx
|
[ "${have:-}" ] && complete -F _lyxz $filenames lyx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user