From 4e026588f4aaf26fc49c16657359497d90ecce38 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Thu, 27 Jul 2017 14:34:19 -0700 Subject: [PATCH] modify prev commit to use builtin cd Using the `cd` function can have undesirable side effects like mucking with the directory history. So force the use of the builtin cd. --- share/functions/__fish_print_hostnames.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_print_hostnames.fish b/share/functions/__fish_print_hostnames.fish index 0bf89e334..efa3cac4f 100644 --- a/share/functions/__fish_print_hostnames.fish +++ b/share/functions/__fish_print_hostnames.fish @@ -62,7 +62,7 @@ function __fish_print_hostnames -d "Print a list of known hostnames" | string trim | string replace -r -a '\s+' ' ') end - cd $relative_path + builtin cd $relative_path set -l new_paths for path in $paths set -l expanded_path @@ -76,7 +76,7 @@ function __fish_print_hostnames -d "Print a list of known hostnames" set new_paths $new_paths $path end end - cd $orig_dir + builtin cd $orig_dir if test -n "$new_paths" _recursive $new_paths