Commit bf52f5d5 authored by Jorge Bucaran's avatar Jorge Bucaran

fix basename polyfill

parent ed688aac
...@@ -3,12 +3,9 @@ ...@@ -3,12 +3,9 @@
# basename [-s suffix] <string> [string...] # basename [-s suffix] <string> [string...]
# #
# OVERVIEW # OVERVIEW
# osx style variable arguments basename # variable arguments basename
function basename -d "get the filename or directory part of a path" function basename -d "get the filename or directory part of a path"
if test (uname) = "Darwin"
command basename $argv
else
if set -q argv[1] if set -q argv[1]
set -l ext "" set -l ext ""
switch $argv[1] switch $argv[1]
...@@ -25,5 +22,4 @@ function basename -d "get the filename or directory part of a path" ...@@ -25,5 +22,4 @@ function basename -d "get the filename or directory part of a path"
command basename "$path" "$ext" command basename "$path" "$ext"
end end
end end
end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment