diff --git a/README.md b/README.md index a7e0c01..f3eb36c 100644 --- a/README.md +++ b/README.md @@ -302,6 +302,16 @@ extensions. The syntax supported is [documented as part of Rust's regex library](https://doc.rust-lang.org/regex/regex/index.html#syntax). +### Shell completions + +Shell completion files are included in the release tarball for Bash, Fish, Zsh +and PowerShell. + +For **bash**, move `rg.bash-completion` to `$XDG_CONFIG_HOME/bash_completion` +or `/etc/bash_completion.d/`. + +For **fish**, move `rg.fish` to `$HOME/.config/fish/completions`. + ### Building `ripgrep` is written in Rust, so you'll need to grab a diff --git a/doc/rg.1 b/doc/rg.1 index 6ce5bd6..7b87ea4 100644 --- a/doc/rg.1 +++ b/doc/rg.1 @@ -409,3 +409,14 @@ ripgrep. Note that this must be passed to every invocation of rg. .RS .RE +.SH SHELL COMPLETION +.PP +Shell completion files are included in the release tarball for Bash, +Fish, Zsh and PowerShell. +.PP +For \f[B]bash\f[], move \f[C]rg.bash\-completion\f[] to +\f[C]$XDG_CONFIG_HOME/bash_completion\f[] or +\f[C]/etc/bash_completion.d/\f[]. +.PP +For \f[B]fish\f[], move \f[C]rg.fish\f[] to +\f[C]$HOME/.config/fish/completions\f[]. diff --git a/doc/rg.1.md b/doc/rg.1.md index 748e5aa..0bd0850 100644 --- a/doc/rg.1.md +++ b/doc/rg.1.md @@ -273,3 +273,13 @@ Project home page: https://github.com/BurntSushi/ripgrep : Clear the file type globs previously defined for TYPE. This only clears the default type definitions that are found inside of ripgrep. Note that this must be passed to every invocation of rg. + +# SHELL COMPLETION + +Shell completion files are included in the release tarball for Bash, Fish, Zsh +and PowerShell. + +For **bash**, move `rg.bash-completion` to `$XDG_CONFIG_HOME/bash_completion` +or `/etc/bash_completion.d/`. + +For **fish**, move `rg.fish` to `$HOME/.config/fish/completions`.