mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-29 07:53:55 +00:00
Simplify fish init script (#370)
This commit is contained in:
parent
302ec231ba
commit
24d21ec8ab
@ -102,20 +102,18 @@ end
|
|||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
{%- when Some with (cmd) %}
|
{%- when Some with (cmd) %}
|
||||||
|
|
||||||
# Remove definitions.
|
function {{cmd}}
|
||||||
function __zoxide_unset
|
__zoxide_z $argv
|
||||||
set --erase $argv >/dev/null 2>&1
|
|
||||||
abbr --erase $argv >/dev/null 2>&1
|
|
||||||
builtin functions --erase $argv >/dev/null 2>&1
|
|
||||||
end
|
end
|
||||||
|
abbr --erase {{cmd}}
|
||||||
__zoxide_unset {{cmd}}
|
|
||||||
alias {{cmd}}=__zoxide_z
|
|
||||||
complete -c {{cmd}} -e
|
complete -c {{cmd}} -e
|
||||||
complete -c {{cmd}} -f -a '(__zoxide_z_complete)'
|
complete -c {{cmd}} -f -a '(__zoxide_z_complete)'
|
||||||
|
|
||||||
__zoxide_unset {{cmd}}i
|
function {{cmd}}i
|
||||||
alias {{cmd}}i=__zoxide_zi
|
__zoxide_zi $argv
|
||||||
|
end
|
||||||
|
abbr --erase {{cmd}}i
|
||||||
|
complete -c {{cmd}}i -e
|
||||||
|
|
||||||
{%- when None %}
|
{%- when None %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user