jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.87k stars 283 forks source link

bash completion generates "nosort" error on macOS with Bash v3 #2700

Closed dgholz closed 3 weeks ago

dgholz commented 4 weeks ago

Describe the bug

This is a dupe of #883. I see this error when opening a new Terminal window on macOS:

-bash: complete: nosort: invalid option name

I see in the original ticket:

[the Bash completion code] is generated (currently, I have some plans to change this) by clap_complete

clap_complete was removed in 87141bc6f8913c53cd1cf98ebd8b5dab3cb2c0a2, and I see in the diff that the workaround it provided for older versions of Bash was not preserved. https://github.com/jdx/mise/blob/d9b8e9e69de50f2dc0de9fc4e0f5418075f85680/completions/mise.bash#L5044-L5048

DO you think it could be added back in?

jdx commented 4 weeks ago

targeting 20+ year old bash is not high on my priority list, just upgrade it

dgholz commented 3 weeks ago

I can for myself, but I'm planning to make mise the preferred way to manage developer tools for the project I work on. And some of the other developers might have more friction on updating their version of Bash.

I think this only affects completions, I certainly haven't noticed any issues with mise itself.

dgholz commented 3 weeks ago

I see the Bash completions are generated by jdx/usage, I think this issue is in the wrong place.