From dc0d039be284d07e245beee51162bfb25e3c4cf4 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Thu, 12 Sep 2024 04:43:06 +0530 Subject: [PATCH] fish: use cd from data_dir --- templates/fish.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/fish.txt b/templates/fish.txt index a7e9554..8b349dc 100644 --- a/templates/fish.txt +++ b/templates/fish.txt @@ -19,11 +19,7 @@ end # A copy of fish's internal cd function. This makes it possible to use # `alias cd=z` without causing an infinite loop. if ! builtin functions --query __zoxide_cd_internal - if builtin functions --query cd - builtin functions --copy cd __zoxide_cd_internal - else - alias __zoxide_cd_internal='builtin cd' - end + string replace --regex -- '^function cd' 'function __zoxide_z_internal' <$__fish_data_dir/functions/cd.fish | source end # cd + custom logic based on the value of _ZO_ECHO.