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

[BUG] - complete: nosort: invalid option name #1407

Closed
1 task done
daniejstriata opened this issue Oct 23, 2023 · 7 comments · Fixed by #1472
Closed
1 task done

[BUG] - complete: nosort: invalid option name #1407

daniejstriata opened this issue Oct 23, 2023 · 7 comments · Fixed by #1472
Labels

Comments

@daniejstriata
Copy link

Checks

  • I have read the troubleshooting section and still think this is a bug.

Describe the bug you encountered:

Using bash completion on older distros like Amazon Linux 2(EOL: 2025-06-30) causes an error message when logging in:
./fd.bash: line 170: complete: nosort: invalid option name

image

I removed -o nosort but unsure how it would affect the indented functionality of the shell completion.

Describe what you expected to happen:

No response

What version of fd are you using?

fd 8.7.1

Which operating system / distribution are you on?

Unix: Linux 5.15.133-86.144.amzn2.x86_64 x86_64

cat /etc/os-release 
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
SUPPORT_END="2025-06-30"
@daniejstriata
Copy link
Author

Same will happen on Centos 7.

@tmccombs
Copy link
Collaborator

Removing that should be fine. It just means the completion results will be sorted.

@tavianator
Copy link
Collaborator

nosort is from bash 4.4 which is from 2016-09-15. Since it's still popular (and hey, macOS is still on bash 3), I think this is worth reporting upstream: https://github.com/clap-rs/clap/issues

@RobertAKARobin
Copy link

macOS user here, and this is indeed occurring for me too. :)

@sharkdp
Copy link
Owner

sharkdp commented Nov 29, 2023

this has been reported in clap-rs/clap#5190, but not fixed yet

@henry-hsieh
Copy link

henry-hsieh commented Jan 3, 2024

I made a PR to fix this. The issue should be resolved after next release of clap-rs.
See clap-rs/clap#5278

@henry-hsieh
Copy link

I think the clap-rs v4.4.13 released today is including the change.

tmccombs added a commit to tmccombs/fd that referenced this issue Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants