]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #4753, thanks Cengiz Gunay.
authorPavel Sanda <sanda@lyx.org>
Thu, 1 Apr 2010 09:40:33 +0000 (09:40 +0000)
committerPavel Sanda <sanda@lyx.org>
Thu, 1 Apr 2010 09:40:33 +0000 (09:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34001 a592a061-630c-0410-9148-cb99ea01b6c8

lib/Makefile.am
lib/scripts/bash_completion [new file with mode: 0644]

index 02f7f4b9cc9f9c25e8ae1b1062a040d0c7876259..fa7ad3f79243abf16cd8128b11ec674f61ed4e62 100644 (file)
@@ -1181,6 +1181,7 @@ scriptsdir = $(pkgdatadir)/scripts
 # Note that we "chmod 755" manually these files in install-data-hook.
 dist_scripts_PYTHON = \
        scripts/TeXFiles.py \
+       scripts/bash_completion \
        scripts/clean_dvi.py \
        scripts/csv2lyx.py \
        scripts/convertDefault.py \
diff --git a/lib/scripts/bash_completion b/lib/scripts/bash_completion
new file mode 100644 (file)
index 0000000..35981ac
--- /dev/null
@@ -0,0 +1,22 @@
+# lyx(1) completion 
+# Modified inkscape template of allali@univ-mlv.fr
+# by cengique@users.sf.net
+
+have lyx &&
+_lyx()
+{
+        local cur
+
+        COMPREPLY=()
+        cur=${COMP_WORDS[COMP_CWORD]}
+
+        if [[ "$cur" == -* ]]; then
+                COMPREPLY=( $( compgen -W '-help -userdir -sysdir \
+                               -geometry -dbg -x --execute -e --export \
+                               -i --import -version' -- $cur ) ) 
+        else
+                _filedir '@(lyx)'
+        fi
+
+}
+[ "${have:-}" ] && complete -F _lyx $filenames lyx