X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/f208e3d44c625878a2fafbf7037ab6350432b83c..0554f58886a62ee654998cc656d923fe86246cd7:/vcsh diff --git a/vcsh b/vcsh index 11370f8..e339cde 100755 --- a/vcsh +++ b/vcsh @@ -425,10 +425,14 @@ use() { } which() { - [ -e "$VCSH_COMMAND_PARAMETER" ] || fatal "'$VCSH_COMMAND_PARAMETER' does not exist" 1 - for VCSH_REPO_NAME in $(list); do + output=$(for VCSH_REPO_NAME in $(list); do get_files | grep -- "$VCSH_COMMAND_PARAMETER" | sed "s/^/$VCSH_REPO_NAME: /" - done | sort -u + done | sort -u) + if [ -z "$output" ]; then + fatal "'$VCSH_COMMAND_PARAMETER' does not exist" 1 + else + echo "$output" + fi } write_gitignore() {