From 9fa70d3ace1ecd58d4296f3fc4b80878e20ab963 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Fri, 29 Sep 2023 16:47:00 +0200 Subject: [PATCH] Remove two calls to builtin realpath path was added in 3.4, it's old enough that we can use it now. --- share/completions/git.fish | 2 +- share/functions/__fish_ps.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index ea4d0da5c..34053a8c9 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -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 diff --git a/share/functions/__fish_ps.fish b/share/functions/__fish_ps.fish index 4fa50490e..a59b937e4 100644 --- a/share/functions/__fish_ps.fish +++ b/share/functions/__fish_ps.fish @@ -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 '*'