doc: Mention XDG_DATA_HOME

Ref: [bash-completion](89aa18b154/README.md (L153-L161))
This commit is contained in:
PRO 2025-05-09 13:50:50 +08:00 committed by GitHub
parent fbd7d9b938
commit 15a7672dde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1816,7 +1816,7 @@ When in doubt, you can discuss this in [#14520](https://github.com/rust-lang/car
### How to use native-completions feature:
- bash:
Add `source <(CARGO_COMPLETE=bash cargo +nightly)` to `~/.local/share/bash-completion/completions/cargo`.
Add `source <(CARGO_COMPLETE=bash cargo +nightly)` to `$XDG_DATA_HOME/bash-completion/completions/cargo`, or `~/.local/share/bash-completion/completions/cargo` if `XDG_DATA_HOME` is not set.
- zsh:
Add `source <(CARGO_COMPLETE=zsh cargo +nightly)` to your `.zshrc`.