Remove two calls to builtin realpath

path was added in 3.4, it's old enough that we can use it now.
This commit is contained in:
Fabian Boehm 2023-09-29 16:47:00 +02:00
parent 35baa88334
commit 9fa70d3ace
2 changed files with 2 additions and 2 deletions

View File

@ -347,7 +347,7 @@ function __fish_git_files
# Only do this if the filename isn't a simple child,
# or the current token starts with ":"
if set -ql colon[1]; or string match -q '../*' -- $file
set -l fromroot (builtin realpath -- $file 2>/dev/null)
set -l fromroot (path resolve -- $file 2>/dev/null)
# `:` starts pathspec "magic", and the second `:` terminates it.
# `/` is the magic letter for "from repo root".
# If we didn't terminate it we'd have to escape any special chars

View File

@ -1,5 +1,5 @@
function __fish_ps
switch (builtin realpath (command -v ps) | string match -r '[^/]+$')
switch (command -s ps | path resolve | path basename)
case busybox
command ps $argv
case '*'