❯ fish --version
fish, version 3.1.2-1798-g4dae10691
❯ echo $version
3.1.2-1798-g4dae10691
Glad to see a -s (--no-symlinks) option is added to realpath in 568f903. But there are currently two issues with realpath:
share/functions/realpath.fish isn't updated along with the builtin, so one can't just use realpath -s, they have to type builtin realpath -s instead.
- While the above is a minor issue, the main problem this issue is about is
realpath -s doesn't resolve to absolute path at all.
❯ pwd
/Users/kid
❯ ls -l .cache
lrwxr-xr-x 1 kid staff 14 Dec 5 11:29 .cache -> Library/Caches
❯ builtin realpath -s ~/.cache
/Users/kid/.cache
❯ builtin realpath -s .cache
.cache
But I expect .cache to be resolved to the absolute path /Users/kid/.cache.
I noticed the -s flag calls normalize_path internally, but the function seems to only deal with . and .., and it doesn't resolve to a absolute path. So is realpath -s's behavior intended? Or is this just a implementation flaw?
Glad to see a
-s(--no-symlinks) option is added torealpathin 568f903. But there are currently two issues withrealpath:share/functions/realpath.fishisn't updated along with the builtin, so one can't just userealpath -s, they have to typebuiltin realpath -sinstead.realpath -sdoesn't resolve to absolute path at all.But I expect
.cacheto be resolved to the absolute path/Users/kid/.cache.I noticed the
-sflag callsnormalize_pathinternally, but the function seems to only deal with.and.., and it doesn't resolve to a absolute path. So isrealpath -s's behavior intended? Or is this just a implementation flaw?