completion script update

Pavel Sanda sanda at lyx.org
Fri Mar 25 15:56:36 UTC 2022


Hi,

per a debian bug report the bash-completion script we provide does not 
seem to work anymore due to outdated syntax.

Attaching patch to fix the situation (works on debian stable).

Anyone around actively using bash-completion to test as well?

Pavel
-------------- next part --------------
diff --git a/lib/scripts/bash_completion b/lib/scripts/bash_completion
index 868884cf13..4d7b914e2a 100644
--- a/lib/scripts/bash_completion
+++ b/lib/scripts/bash_completion
@@ -1,7 +1,7 @@
 # lyx(1) completion 
 # Copyleft 2010 Cengiz Gunay <cengique at users.sf.net>
 
-have lyx &&
+_have lyx &&
 _lyx()
 {
         local cur g last
@@ -65,5 +65,4 @@ _lyx()
 	# turn it off if necessary
 	test $g -eq 0 && shopt -u extglob
 
-}
-[ "${have:-}" ] && complete -F _lyx $filenames lyx
+} && complete -F _lyx $filenames lyx


More information about the lyx-devel mailing list