X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/93afbd50ff6dc47b9a36d0ddf87d0aaa60084f5a..28ba04630a336adaf29c1e3206473d7848b5ac13:/vcsh diff --git a/vcsh b/vcsh index b0ffb64..1d38101 100755 --- a/vcsh +++ b/vcsh @@ -16,6 +16,9 @@ help() { enter Enter repository; spawn new $SHELL init Initialize a new repository list List all repositories + list-tracked List all files tracked by vcsh + list-tracked-by \\ + List files tracked by a repository rename \\ Rename repository run \\ @@ -208,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