From 28ba04630a336adaf29c1e3206473d7848b5ac13 Mon Sep 17 00:00:00 2001 From: Richard Hartmann Date: Sat, 3 Dec 2011 02:44:16 +0100 Subject: [PATCH 1/1] Make `vcsh ` a shortcut for `vcsh enter ` --- vcsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vcsh b/vcsh index 60bcc41..1d38101 100755 --- a/vcsh +++ b/vcsh @@ -211,13 +211,18 @@ elif [ "$1" = 'delete' ] || elif [ "$1" = 'list' ] || [ "$1" = 'list-tracked' ]; then export VCSH_COMMAND="$1" -elif [ -n "$1" ]; then - export VCSH_COMMAND=run +elif [ -n "$1" -a -n "$2" ]; then + export VCSH_COMMAND='run' export VCSH_REPO_NAME="$1" export GIT_DIR="$VCSH_BASE/$VCSH_REPO_NAME.git" [ -d $GIT_DIR ] || { help; exit 1; } shift 1 export VCSH_EXTERNAL_COMMAND="git $*" +elif [ -n "$1" ]; then + export VCSH_COMMAND='enter' + export VCSH_REPO_NAME="$1" + export GIT_DIR="$VCSH_BASE/$VCSH_REPO_NAME.git" + [ -d $GIT_DIR ] || { help; exit 1; } else # $1 is empty, or 'help' help && exit -- 2.39.5