mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-16 23:02:45 +08:00
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:
parent
35baa88334
commit
9fa70d3ace
|
@ -347,7 +347,7 @@ function __fish_git_files
|
||||||
# Only do this if the filename isn't a simple child,
|
# Only do this if the filename isn't a simple child,
|
||||||
# or the current token starts with ":"
|
# or the current token starts with ":"
|
||||||
if set -ql colon[1]; or string match -q '../*' -- $file
|
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.
|
# `:` starts pathspec "magic", and the second `:` terminates it.
|
||||||
# `/` is the magic letter for "from repo root".
|
# `/` is the magic letter for "from repo root".
|
||||||
# If we didn't terminate it we'd have to escape any special chars
|
# If we didn't terminate it we'd have to escape any special chars
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function __fish_ps
|
function __fish_ps
|
||||||
switch (builtin realpath (command -v ps) | string match -r '[^/]+$')
|
switch (command -s ps | path resolve | path basename)
|
||||||
case busybox
|
case busybox
|
||||||
command ps $argv
|
command ps $argv
|
||||||
case '*'
|
case '*'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user