I maintain a CLI tool built on click and just had a user report issues with completion on bash 4.2 on a CentOS box.
It seems that nosort was added as an option in bash 4.4. There's even a comment in the completer source about this.
I think it would make sense for the completer to check for BASH_VERSION showing a value below 4.4 and not use nosort in that case. If BASH_VERSION is not set, it's probably safe to assume that nosort is permissible -- I'd rather not degrade environments with a modern bash version but which (for whatever reason) are not showing that env var.
I'm okay with click closing this as a wontfix (old version, not supported), but I want to document the issue and discuss the workaround. If I were to work out the necessary code for this, would there be an appetite for reviewing and merging it?
I maintain a CLI tool built on
clickand just had a user report issues with completion on bash 4.2 on a CentOS box.It seems that
nosortwas added as an option in bash 4.4. There's even a comment in the completer source about this.I think it would make sense for the completer to check for
BASH_VERSIONshowing a value below 4.4 and not usenosortin that case. IfBASH_VERSIONis not set, it's probably safe to assume thatnosortis permissible -- I'd rather not degrade environments with a modern bash version but which (for whatever reason) are not showing that env var.I'm okay with
clickclosing this as a wontfix (old version, not supported), but I want to document the issue and discuss the workaround. If I were to work out the necessary code for this, would there be an appetite for reviewing and merging it?