Bugzilla – Bug 382098
zypper bash completion broken
Last modified: 2008-04-22 18:32:50 UTC
(text copied from Bug 382097) I discovered some weird behaviour with bash completion: Scenario 1: - Start new bash - type "yast <tab><tab>" -> you will get a list of all yast modules - type "zypper <tab>" -> you will get "zypper add-on" huh? Scenatio 2: - Start new bash - type "zypper <tab><tab>" -> you will get a list of all zypper commands - type "yast2 <tab><tab>" -> you will still get a list of all zypper commands huh²? So I grepped around a bit in /etc/bash_completion.d and found out: zypper.sh and yast2_completion.sh share a variable and do NOT declare it as local, the variable is "MODLIST" Also, zypper.sh does initialize "MODLIST" as yast2-completion.sh does. Fix: 1. yast2_completion.sh - move "MODLIST=()" inside the function and declare as local 2. zypper.sh - add "MODLIST=()" inside the function and declare as local Both work fine with this fix, but I'm not 100% sure if that's the correct solution (not familiar with bash completion scripts)
*** This bug has been marked as a duplicate of bug 382097 ***