mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 01:36:39 +08:00
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:
parent
defdc92b57
commit
4e026588f4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user