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.
This commit is contained in:
Kurtis Rader 2017-07-27 14:34:19 -07:00
parent defdc92b57
commit 4e026588f4

View File

@ -62,7 +62,7 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
| string trim | string replace -r -a '\s+' ' ') | string trim | string replace -r -a '\s+' ' ')
end end
cd $relative_path builtin cd $relative_path
set -l new_paths set -l new_paths
for path in $paths for path in $paths
set -l expanded_path 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 set new_paths $new_paths $path
end end
end end
cd $orig_dir builtin cd $orig_dir
if test -n "$new_paths" if test -n "$new_paths"
_recursive $new_paths _recursive $new_paths