From e97b873d69223aba03e12fd05cdbd0adb41a1635 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Mon, 20 Jul 2026 17:16:58 +0530 Subject: [PATCH] fix exit code handling --- templates/fish.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/templates/fish.txt b/templates/fish.txt index 7285110..bf5bdf1 100644 --- a/templates/fish.txt +++ b/templates/fish.txt @@ -101,12 +101,11 @@ function __zoxide_z_complete # If the last argument is empty, use interactive selection. set -l query $tokens[2..-1] set -l result (command zoxide query --exclude (__zoxide_pwd) --interactive -- $query 2>/dev/null) - if test $status -eq 130 - builtin commandline --function repaint - return - else + if test $status -eq 0 builtin commandline --replace -- "{{ cmd.unwrap_or("cd") }} "(string escape -- $result) builtin commandline --function repaint execute + else + builtin commandline --function repaint end end end