fish: clear existing completions before defining aliases

Fish ships with built-in completions for common commands like `j` (share/completions/j.fish for autojump). These override zoxide's completions when using `--cmd j`. Clear them before defining aliases.
This commit is contained in:
Simon Olofsson 2026-01-29 10:59:13 +01:00 committed by GitHub
parent f00fe0f0ae
commit d22f251cfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -117,9 +117,11 @@ end
{%- when Some with (cmd) %}
abbr --erase {{cmd}} &>/dev/null
complete --erase --command {{cmd}}
alias {{cmd}}=__zoxide_z
abbr --erase {{cmd}}i &>/dev/null
complete --erase --command {{cmd}}i
alias {{cmd}}i=__zoxide_zi
{%- when None %}