Skip to content

Commit

Permalink
vcsh: Rename where() to base()
Browse files Browse the repository at this point in the history
As per #115 (comment) :

Is where a good name? Maybe use base instead? Rationale being that base
is already used internally in $VCSH_BASE.
  • Loading branch information
RichiH committed Oct 25, 2014
1 parent 7d6a314 commit 86f39f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions doc/vcsh.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ vcsh(1) - Version Control System for $HOME - multiple Git repositories in $HOME

## SYNOPSIS

`vcsh` base

`vcsh` [<options>] <command>

`vcsh` clone <url> [<repo>]
Expand Down Expand Up @@ -37,8 +39,6 @@ vcsh(1) - Version Control System for $HOME - multiple Git repositories in $HOME

`vcsh` version

`vcsh` where

`vcsh` which <substring>

`vcsh` write-gitignore <repo>
Expand Down Expand Up @@ -84,6 +84,10 @@ an interactive user.

## COMMANDS

* base:

Print base <$VCSH_BASE> and config <$XDG_CONFIG_HOME> variables.

* clone:
Clone an existing repository.

Expand Down Expand Up @@ -142,7 +146,7 @@ an interactive user.
cloning the template.

`vcsh` will detect the configuration from any directory below the
setup directory. Use `vcsh where` to verify the above settings.
setup directory. Use `vcsh base` to verify the above settings.

* status:
Show statuses of all/one vcsh repositories.
Expand All @@ -153,10 +157,6 @@ an interactive user.
* version:
Print version information.

* where:

Print base <$VCSH_BASE> and config <$XDG_CONFIG_HOME> variables.

* which <substring>:
Find <substring> in name of any tracked file.

Expand Down
12 changes: 6 additions & 6 deletions vcsh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ help() {
-v Enable verbose mode
commands:
base Print base and config directories
clone <remote> \\
[<repo>] Clone from an existing repository
commit Commit in all repositories
Expand All @@ -134,7 +135,6 @@ help() {
status [<repo>] Show statuses of all/one vcsh repositories
upgrade <repo> Upgrade repository to currently recommended settings
version Print version information
where Print base and config directories
which <substring> Find substring in name of any tracked file
write-gitignore \\
<repo> Write .gitignore.d/<repo> via git ls-files
Expand Down Expand Up @@ -373,7 +373,7 @@ use() {
export VCSH_DIRECTORY="$VCSH_REPO_NAME"
}

where() {
base() {
echo "\$VCSH_BASE is $VCSH_BASE"
echo "\$XDG_CONFIG_HOME is $XDG_CONFIG_HOME"
}
Expand Down Expand Up @@ -440,6 +440,7 @@ fi
export VCSH_COMMAND="$1"

case "$VCSH_COMMAND" in
bas|ba) VCSH_COMMAND=base;;
clon|clo|cl) VCSH_COMMAND=clone;;
commi|comm|com|co) VCSH_COMMAND=commit;;
delet|dele|del|de) VCSH_COMMAND=delete;;
Expand All @@ -454,7 +455,6 @@ case "$VCSH_COMMAND" in
statu|stat|sta|st) VCSH_COMMAND=status;;
upgrad|upgra|upgr|up) VCSH_COMMAND=upgrade;;
versio|versi|vers|ver|ve) VCSH_COMMAND=version;;
where|whe) VCSH_COMMAND=where;;
which|whi) VCSH_COMMAND=which;;
write|writ|wri|wr) VCSH_COMMAND=write-gitignore;;
esac
Expand Down Expand Up @@ -492,12 +492,12 @@ elif [ "$VCSH_COMMAND" = 'delete' ] ||
[ "$VCSH_COMMAND" = 'rename' ] && { export VCSH_REPO_NAME_NEW="$3";
export GIT_DIR_NEW="$VCSH_REPO_D/$VCSH_REPO_NAME_NEW.git"; }
[ "$VCSH_COMMAND" = 'run' ] && shift 2
elif [ "$VCSH_COMMAND" = 'commit' ] ||
elif [ "$VCSH_COMMAND" = 'base' ] ||
[ "$VCSH_COMMAND" = 'commit' ] ||
[ "$VCSH_COMMAND" = 'list' ] ||
[ "$VCSH_COMMAND" = 'list-tracked' ] ||
[ "$VCSH_COMMAND" = 'pull' ] ||
[ "$VCSH_COMMAND" = 'push' ] ||
[ "$VCSH_COMMAND" = 'where' ]; then
[ "$VCSH_COMMAND" = 'push' ]; then
:
elif [ "$VCSH_COMMAND" = 'status' ]; then
export VCSH_REPO_NAME="$2"
Expand Down

0 comments on commit 86f39f4

Please sign in to comment.