From: Richard Hartmann Date: Sun, 19 Oct 2014 06:34:09 +0000 (+0200) Subject: vcsh: Make `vcsh which dontexist` exit 1 X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/d946b07817ffe6e156c159e7fc6270322413e530?ds=inline vcsh: Make `vcsh which dontexist` exit 1 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760882 --- diff --git a/vcsh b/vcsh index 6a81343..0b4c452 100755 --- a/vcsh +++ b/vcsh @@ -351,6 +351,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"