diff --git a/vcsh b/vcsh index fb99ffb46b953e9fec026c3286c98a3b8bff6e94..d742cf44cae8c27aeeaa1c796954e0b26bb1a437 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)