mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-22 10:11:13 -03:00
Don't resolve symlinks with cd
This switches fish to a "virtual" PWD, where it no longer uses getcwd to discover its PWD but instead synthesizes it based on normalizing cd against the $PWD variable. Both pwd and $PWD contain the virtual path. pwd is taught about -P to return the physical path, and -L the logical path (which is the default). Fixes #3350
This commit is contained in:
@@ -18,6 +18,8 @@ function mktemp
|
||||
set opts $opts d
|
||||
case -t
|
||||
set opts $opts t
|
||||
case -u
|
||||
set opts $opts u
|
||||
case --
|
||||
set -e argv[1]
|
||||
break
|
||||
@@ -69,6 +71,9 @@ function mktemp
|
||||
end
|
||||
|
||||
set -l args
|
||||
if contains u $opts
|
||||
set args $args -u
|
||||
end
|
||||
if contains d $opts
|
||||
set args $args -d
|
||||
end
|
||||
@@ -88,7 +93,7 @@ function mktemp
|
||||
end
|
||||
set args $args $template
|
||||
|
||||
command mktemp $args
|
||||
realpath (command mktemp $args)
|
||||
end
|
||||
|
||||
function _mktemp_help
|
||||
|
||||
Reference in New Issue
Block a user