X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/27a39552a3fad5b70b01b96c7485a6f64c501842..ae0154042ce9d31bc948df4f065ac76fa29455db:/vcsh?ds=sidebyside diff --git a/vcsh b/vcsh index fb99ffb..d742cf4 100755 --- a/vcsh +++ b/vcsh @@ -13,9 +13,11 @@ # this software will most likely follow suit. basename() { - local f; f="${1##*/}" - [ -z "$2" ] || f="${f%$2}" - echo "$f" + # Implemented in shell to avoid spawning another process + local file + file="${1##*/}" + [ -z "$2" ] || file="${file%$2}" + echo "$file" } SELF=$(basename $0)