mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
@@ -25,7 +25,7 @@ function realpath -d "return an absolute path without symlinks"
|
||||
set -l options 'h/help' 'q/quiet' 'V-version' 's/strip' 'N-no-symlinks' 'z/zero'
|
||||
set -a options 'e/canonicalize-existing' 'm/canonicalize-missing' 'L/logical' 'P/physical'
|
||||
set -a options 'R-relative-to=' 'B-relative-base='
|
||||
argparse -n realpath --min-args=1 $options -- $argv
|
||||
argparse -n realpath $options -- $argv
|
||||
or return
|
||||
|
||||
if set -q _flag_help
|
||||
@@ -42,6 +42,11 @@ function realpath -d "return an absolute path without symlinks"
|
||||
return 1
|
||||
end
|
||||
|
||||
if not set -q argv[1]
|
||||
printf (_ "%ls: Expected at least %d args, got only %d\n") realpath 1 0
|
||||
return 1
|
||||
end
|
||||
|
||||
for path in $argv
|
||||
builtin realpath $path
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user