Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dgholz opened this issue Oct 3, 2024 · 3 comments
Closed

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

dgholz opened this issue Oct 3, 2024 · 3 comments
Labels

Comments

@dgholz
Copy link

dgholz commented Oct 3, 2024

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 87141bc, and I see in the diff that the workaround it provided for older versions of Bash was not preserved.

mise/completions/mise.bash

Lines 5044 to 5048 in d9b8e9e

if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
complete -F _mise -o nosort -o bashdefault -o default mise
else
complete -F _mise -o bashdefault -o default mise
fi

DO you think it could be added back in?

@dgholz dgholz added the bug label Oct 3, 2024
@jdx
Copy link
Owner

jdx commented Oct 3, 2024

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

@dgholz
Copy link
Author

dgholz commented Oct 4, 2024

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
Copy link
Author

dgholz commented Oct 4, 2024

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

@dgholz dgholz closed this as completed Oct 4, 2024
@dgholz dgholz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants