Add shopt -s extglob progcomp
Bug #439827 reported by
Jari Aalto
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash completion generator for bzr |
Fix Released
|
Medium
|
Martin von Gagern |
Bug Description
The "shopt -s extglob progcomp" is not the default setting in Bash.
Please add that line to the generated shell script, possibly testing the BASH version before using the command.
Changed in bzr-bash-completion: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Setting progcomp at the top level makes sense. I'll introduce that.
Dealing with extgob is a bit more tricky. It has to be set inside the function, and if I wanted to not pollute the user's environment, I'd have to restore the previous state before returning. As there are three places where the function possibly returns, this might turn out to be a bit ugly.
I would assume that people seriously using bash completion were using the alioth bash-completion project as well. There are a lot of functions in there that require extglob but simply assume it's set. I would welcome a proper solution to this at the level of the bash-completion project, and have suggested such a solution to upstream: alioth. debian. org/tracker/ index.php? func=detail& aid=311628& group_id= 100114& atid=413095
http://
Unfortunately, it seems they haven't even looked at my suggestion. So waiting on bash-completion might take too long. And always requiring bash-completion might be bad, too. Therefore I might include some support for proper extglob handling in my script. I'll think about it.