From b85f7763d07f98c54ed39a8799a9b61f7f99555f Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Sun, 16 May 2021 22:15:26 +0800 Subject: [PATCH] Improve Fish's completions --- templates/fish.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/fish.txt b/templates/fish.txt index 7af58b8..939a0cd 100644 --- a/templates/fish.txt +++ b/templates/fish.txt @@ -98,6 +98,10 @@ end __zoxide_unset {{cmd}} alias {{cmd}}="__zoxide_z" +# Add completions. +complete -c {{cmd}} -f -a '(__fish_complete_directories (commandline -t) "")' +complete -c {{cmd}} -n "test -n (commandline -t)" -a "(zoxide query -l -- (commandline -t))" -k + __zoxide_unset {{cmd}}i alias {{cmd}}i="__zoxide_zi"