mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
improve realpath.fish comments
This commit is contained in:
parent
ce1c9f3a65
commit
94aeb47f63
1 changed files with 8 additions and 5 deletions
|
@ -2,10 +2,12 @@
|
|||
# as a command. If a realpath command is available simply pass all arguments thru to it. If not
|
||||
# fallback to alternative solutions.
|
||||
|
||||
# The following is slightly subtle. The first time `realpath` is invoked this script will be read.
|
||||
# If we see that there is an external command by that name we just return. That will cause fish to
|
||||
# run the external command. On the other hand, if an external command isn't found we define a
|
||||
# function that will provide fallback behavior.
|
||||
# The following is slightly subtle. The first time `realpath` is invoked by autoloading this script
|
||||
# will be read. If we see that there is an external realpath command we just return. That will cause
|
||||
# fish to run the external command. Or, if there is a grealpath, we alias it.
|
||||
# On the other hand, if an external command isn't found we provide a function that will facilitate
|
||||
# fallback behavion through our builtin.
|
||||
|
||||
if not command -s realpath >/dev/null
|
||||
|
||||
if command -s grealpath >/dev/null
|
||||
|
@ -19,7 +21,8 @@ if not command -s realpath >/dev/null
|
|||
echo " resolves files as absolute paths without symlinks"
|
||||
return 1
|
||||
end
|
||||
|
||||
|
||||
# loop over arguments - allow our realpath to work on more than one path per invocatgon like gnu/bsd realpath.
|
||||
for arg in $argv
|
||||
switch $arg
|
||||
# These - no can do our realpath
|
||||
|
|
Loading…
Reference in a new issue