From f151e820ce60aea405d88f8885addeca7aae7764 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Thu, 1 Apr 2010 09:40:33 +0000 Subject: [PATCH] Fix bug #4753, thanks Cengiz Gunay. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34001 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/Makefile.am | 1 + lib/scripts/bash_completion | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 lib/scripts/bash_completion diff --git a/lib/Makefile.am b/lib/Makefile.am index 02f7f4b9cc..fa7ad3f792 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 index 0000000000..35981ac3f6 --- /dev/null +++ b/lib/scripts/bash_completion @@ -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 -- 2.39.5