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