[Docs] `README.md` completion instructions are outdated and incorrect for fish
The README.md#completions section for fish shell instructs users to:
fish: Put
fd.fishin~/.config/fish/completions
I could not find the fd.fish file anywhere in the repository.
I was later informed (LLM) that the correct method is to generate the file using the binary itself, like this:
fd --gen-completions=fish
# and maybe this actually
fd --gen-completions=fish > ~/.config/fish/completions/fd.fish
I tried this command, and it successfully generated a working completion file.
Could the README.md be updated to reflect this correct, modern method?
I would be happy to open a PR for this with a go ahead from you.
I could not find the fd.fish file anywhere in the repository.
It isn't in the repository, but it is in the built packages on the releases page. For example, in https://github.com/sharkdp/fd/releases/download/v10.3.0/fd-v10.3.0-x86_64-unknown-linux-gnu.tar.gz
so I have two questions:
- should it not have been in the repository? like I don't know the conventions regarding this... but more importantly...
- should the official version to get the file not be
fd --gen-completions=fish > ~/.config/fish/completions/fd.fishirrespective of where that file is? these are genuine questions, tone is definitely not rhetorical
BTW I had installed using sudo apt install fd-find
should it not have been in the repository?
No. The repository is for the aourcecode, but thy completion script is generated
should the official version to get the file not be fd --gen-completions=fish > ~/.config/fish/completions/fd.fish irrespective of where that file is
It kind of depends on how you install fd. IIRC, the version of fd in the tarball is compiled without the --gen-completions option, but the completions are included in the tarball.
BTW I had installed using sudo apt install fd-find
Then you should already have completions in /usr/share/fish/completions