Skip to content
Myr

Merge pull request #1877 from littleKitchen/docs/update-completions-readme

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thayne McCombs · committed by GitHub · parents bf81fb9, 4410dda · Browse files · 1 file+27 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • docs: update shell completions instructions in README

Diff stats

1 file+27 added−6 removed

  • other:+27 added−6 removed

1 file+27 added−6 removed

modified:README.md+27 added-6 removed
745 unmodified lines
746```747748### Completions749750Tab completions for several shells are included in the "autocomplete" directory. To use these completions put the file in an appropriate location for your shell, and depending on751your shell, you may need to source the file as well:750#### From Release Archives751753- bash: you will need to source the fd.bash file in your ~/.bashrc file. Or put it in a directory of files that are all sourced.754- zsh: move the "_fd" file to somewhere on your fpath755- fish: Put fd.fish in ~/.config/fish/completions756- powershell: Source the _fd.ps1 file from one of the files in the [profile scripts locations](https://learn.microsoft.com/en-us/powershell/scripting/learn/shell/creating-profiles?view=powershell-7.5).752Pre-built completion files are included in the release archives (`.tar.gz`/`.zip`) on the753[Releases page](https://github.com/sharkdp/fd/releases), in the `autocomplete` directory.754To use these completions:755756- **bash**: Source the `fd.bash` file in your `~/.bashrc`, or place it in a directory that gets sourced automatically.757- **zsh**: Move `_fd` to a directory in your `fpath` (e.g., `~/.zfunc`).758- **fish**: Copy `fd.fish` to `~/.config/fish/completions/`.759- **powershell**: Source `_fd.ps1` from one of your [profile scripts](https://learn.microsoft.com/en-us/powershell/scripting/learn/shell/creating-profiles?view=powershell-7.5).760761#### Generate from fd762763You can also generate completions directly using `fd --gen-completions <shell>`:764765```bash766# Bash767fd --gen-completions bash > ~/.local/share/bash-completion/completions/fd768769# Zsh (ensure ~/.zfunc is in your fpath)770fd --gen-completions zsh > ~/.zfunc/_fd771772# Fish773fd --gen-completions fish > ~/.config/fish/completions/fd.fish774775# PowerShell776fd --gen-completions powershell >> $PROFILE777```778779## Maintainers780781- [sharkdp](https://github.com/sharkdp)782- [tmccombs](https://github.com/tmccombs)
7 unmodified lines