Bugzilla – Bug 1220458
After bash-completion 2.12.0 introduction software depending on are broken _split_longopt missing
Last modified: 2024-03-07 14:21:56 UTC
On tumbleweed 20240225 with bash-completion 2.12.0 installed a lot of software using bash completion are failing like cmake _split_longopt: command not found ... so the function used in bash-completion to warn about deprecated name is not working or masked by command not found.
(In reply to Bruno Friedmann from comment #0) > On tumbleweed 20240225 with bash-completion 2.12.0 installed > a lot of software using bash completion are failing like > > cmake _split_longopt: command not found ... > > so the function used in bash-completion to warn about deprecated name is not > working or masked by command not found. Then cmake bash complewtion has to be ported to latest bash-completion 2.12.0
Hi, what I apply as temporary fix was to remove the command-not-found we have in openSUSE. That make at least cmake to no more get bogus return, and use the deprecated method proposed in bash-completion 2.12. So we can close here, or at least point the problem to our own cnf implementation.
(In reply to Bruno Friedmann from comment #2) > Hi, what I apply as temporary fix was to remove the command-not-found we > have in openSUSE. > > That make at least cmake to no more get bogus return, and use the deprecated > method proposed in bash-completion 2.12. > > So we can close here, or at least point the problem to our own cnf > implementation. That is only a workaround ... I'd like to see a fixed bash completion of cmake that is use _comp__split_longopt() instead of _split_longopt() from diff -up bash-completion-2.11/ bash-completion-2.12.0/bash_completion [...] @@ -626,13 +1159,13 @@ _filedir() # this to be useful. # Returns 0 if current option was split, 1 otherwise. # -_split_longopt() +_comp__split_longopt() { if [[ $cur == --?*=* ]]; then # Cut also backslash before '=' in case it ended up there # for some reason. - prev="${cur%%?(\\)=*}" - cur="${cur#*=}" + prev=${cur%%?(\\)=*} + cur=${cur#*=} return 0 fi