[Bug 417755] New: yast2 autocompletion exits shell
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
https://bugzilla.novell.com/show_bug.cgi?id=417755 Summary: yast2 autocompletion exits shell Product: openSUSE 11.0 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: jsrain@novell.com ReportedBy: suse-beta@cboltz.de QAContact: jsrain@novell.com Found By: Community User Yast2 autocompletion exits the shell when pressing tab after -i. This is probably a side effect of the fix for bug 341706. Reproducer: # yast2 -i <tab> Running with "set -x" shows what happens: # yast2 -i <tab> + local cur prevprev prev len idx mod MODOPTS line opt rest + MODOPTS=() + test 0 = 0 + YAST_MODLIST=($(LC_ALL=C $YAST -l| grep '^[a-z]' | grep -v "Available")) ++ LC_ALL=C ++ /sbin/yast -l ++ grep --color=auto '^[a-z]' ++ grep --color=auto -v Available + [[ 3 -gt 4 ]] + cur= + prev=-i + [[ 3 -ge 3 ]] + prevprev=yast2 + [[ '' == \- ]] + '[' -i = -i -o yast2 = -i -o -i = --install -o yast2 = --install -o -i = --remove -o yast2 = --remove -o -i = --update -o yast2 = --update ']' + exit 0 exit -> Using "exit 0" in a autocompletion function is not a good idea ;-) The following patch will fix this issue and simply return nothing if "yast2 -i" is given: --- yast2-completion.sh_ORIG 2008-08-15 20:55:01.000000000 +0200 +++ yast2-completion.sh 2008-08-15 20:55:16.000000000 +0200 @@ -32,6 +32,6 @@ -o "$prev" = "--remove" -o "$prevprev" = "--remove" \ -o "$prev" = "--update" -o "$prevprev" = "--update" ]; then - exit 0; + return 0; fi # iterate through all yast modules -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
https://bugzilla.novell.com/show_bug.cgi?id=417755
User jsrain@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=417755#c1
Jiri Srain
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
https://bugzilla.novell.com/show_bug.cgi?id=417755
User office@weberhofer.at added comment
https://bugzilla.novell.com/show_bug.cgi?id=417755#c2
Johannes Weberhofer
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
https://bugzilla.novell.com/show_bug.cgi?id=417755
User suse-beta@cboltz.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=417755#c3
Christian Boltz
participants (1)
-
bugzilla_noreply@novell.com