mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 10:30:28 +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,
|
||||
# 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
|
||||
|
|
|
@ -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 '*'
|
||||
|
|
Loading…
Reference in New Issue
Block a user