X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/2ee05f31013b1bbd5f0d9415e4ec2ee1b91f62b7..f0b495419c6525676fb852053381f191ce3b2d9b:/vcsh 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)