X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/88dc47b049d19ca62dd29ec9d594b8a8dc858f40..5432ea130bd5920174376299864988fad0e816cf:/vcsh?ds=sidebyside diff --git a/vcsh b/vcsh index 6a81343..ea74835 100755 --- a/vcsh +++ b/vcsh @@ -24,6 +24,7 @@ SELF=$(basename $0) fatal() { echo "$SELF: fatal: $1" >&2 + [ -z $2] && exit 1 exit $2 } @@ -351,6 +352,7 @@ use() { } which() { + [ -e "$VCSH_COMMAND_PARAMETER" ] || fatal "'$VCSH_COMMAND_PARAMETER' does not exist" 1 for VCSH_REPO_NAME in $(list); do for VCSH_FILE in $(get_files); do echo "$VCSH_FILE" | grep -q "$VCSH_COMMAND_PARAMETER" && echo "$VCSH_REPO_NAME: $VCSH_FILE"