+vcsh.1
*.patch
*.swp
.swp
Thomas Ferris Nicolaisen <tfnico@gmail.com>
martin f. krafft <madduck@madduck.net>
Alessandro Ghedini <alessandro@ghedini.me>
+Thorsten Glaser <tg@mirbsd.org>
+G.raud <graud@gmx.com>
Mikhail Gusarov <dottedmag@dottedmag.net>
Valentin Haenel <valentin.haenel@gmx.de>
Richard Hartmann <richih@debian.org>
-PREFIX=/usr
+PREFIX?=/usr
DOCDIR_PREFIX=$(PREFIX)/share/doc
DOCDIR=$(DOCDIR_PREFIX)/$(self)
ZSHDIR=$(PREFIX)/share/zsh/vendor-completions
self=vcsh
manpages=$(self).1
-all=test
+all=test manpages
all: $(all)
(( CURRENT == 2 )) && __vcsh_repositories
}
+function _vcsh-list-untracked () {
+ _nothing
+}
+
function _vcsh-pull () {
_nothing
}
fi
}
+function _vcsh-status () {
+ (( CURRENT == 2 )) && __vcsh_repositories
+}
+
function _vcsh-upgrade () {
(( CURRENT == 2 )) && __vcsh_repositories
}
subcommands=(
"clone:clone an existing repository"
+ "commit:commit in all repositories"
"delete:delete an existing repository"
"enter:enter repository; spawn new <\$SHELL>"
"help:display help"
"list:list all local vcsh repositories"
"list-tracked:list all files tracked by vcsh"
"list-tracked-by:list files tracked by a repository"
+ "list-untracked:list all files not tracked by vcsh"
"pull:pull from all vcsh remotes"
+ "push:push to vcsh remotes"
"rename:rename a repository"
"run:run command with <\$GIT_DIR> and <\$GIT_WORK_TREE> set"
+ "status:show statuses of all/one vcsh repositories"
"upgrade:upgrade repository to currently recommended settings"
"version:print version information"
"which:find <substring> in name of any tracked file"
+2014-10-09 Richard Hartmann <richih.mailinglist@gmail.com>
+
+ * Display full paths in list-tracked*
+ * Lots of help improvements
+
+2014-05-08 Richard Hartmann <richih.mailinglist@gmail.com>
+
+ * Revert "Introduce static manpage as part of normal repo"
+
+2014-05-07 Richard Hartmann <richih.mailinglist@gmail.com>
+
+ * Increase portability
+ * Improve hooks
+ * Improve docs
+ * Various minor improvements
+
2014-03-13 Richard Hartmann <richih.mailinglist@gmail.com>
* Release 1.20140313 -- the "Git won a prize" edition
`vcsh` was designed with [myrepos][myrepos], a tool to manage Multiple
Repositories, in mind and the two integrate very nicely. The myrepos tool
(`mr`) has native support for `vcsh` repositories and the configuration for
-myrepos is just another set of files that you cat track with `vcsh` like any
+myrepos is just another set of files that you can track with `vcsh` like any
other. This makes setting up any new machine a breeze. It can take literally
less than five minutes to go from standard installation to fully set up system.
proposed system that follows. For instance, you can use
[myrepos][myrepos] to track repositories in home such as `.emacs.d`,
which `mr` can clone and update for you automatically. To do this,
-just add a `mr` configuration file to `availabile.d` with a `checkout`
+just add a `mr` configuration file to `available.d` with a `checkout`
command to clone the repo, and set the [title] to the desired
location, e.g. `$HOME/.emacs.d`. Try the `mr register` command in an
existing repository, then view `~/.mrconfig` for an example.
vcsh will check if any file it would want to create exists. If it exists, vcsh
will throw a warning and exit. Move away your old config and try again.
Optionally, merge your local and your global configs afterwards and push with
-`vcsh foo push`.
+`vcsh repo_name push`.
## Moving into a New Host
And then create your own stuff:
- vcsh init foo
- vcsh foo add bar baz quux
- vcsh foo remote add origin git://quuux
- vcsh foo commit
- vcsh foo push
- cp $XDG_CONFIG_HOME/mr/available.d/mr.vcsh $XDG_CONFIG_HOME/mr/available.d/foo.vcsh
- vim $XDG_CONFIG_HOME/mr/available.d/foo.vcsh # add your own repo
+ vcsh init repo_name
+ vcsh repo_name add bar baz quux
+ vcsh repo_name remote add origin git://quuux
+ vcsh repo_name commit
+ vcsh repo_name push
+
+ cp $XDG_CONFIG_HOME/mr/available.d/mr.vcsh $XDG_CONFIG_HOME/mr/available.d/repo_name.vcsh
+ vim $XDG_CONFIG_HOME/mr/available.d/repo_name.vcsh # add your own repo
Done!
After you have made some changes, for which you would normally use `git add`
and `git commit`, use the vcsh wrapper (like above):
- vcsh foo add bar baz quux
- vcsh foo commit
- vcsh foo push
+ vcsh repo_name add bar baz quux
+ vcsh repo_name commit
+ vcsh repo_name push
### Using vcsh without myrepos
`vcsh` list
-`vcsh` list-tracked
+`vcsh` list-tracked [<rpoe>]
-`vcsh` list-tracked-by <repo>
+`vcsh` list-untracked [<-r>] [<repo>]
`vcsh` pull
* list-tracked:
List all files tracked by vcsh.
+ If you want to list files tracked by a specific repository, simply
+ append the repository's name last.
+
* list-tracked-by:
List files tracked by a repository.
+ This is a legacy command; you should use `list-tracked <repo>` instead.
+
+* list-untracked:
+ List all files NOT tracked by vcsh.
+
+ By default, the file list is shallow and stops at directory levels where
+ possible. If you prefer to get a list of all files, append `-r` for
+ recursive mode.
+
+ If you want to list files not tracked by a specific repository, simply
+ append the repository's name last.
+
* pull:
Pull from all vcsh remotes.
If you need more, vcsh is trivial to patch, but please let upstream know so
we can ship them by default.
+## OVERLAY SYSTEM
+
+`vcsh` also provides an overlay system. Similar to hooks, the recommended
+locations are <$XDG_CONFIG_HOME/vcsh/overlays-available> and
+<$XDG_CONFIG_HOME/vcsh/overlays-enabled>.
+
+Overlays follow the same rules as hooks and you are free to overwrite any
+and all functions. Same as hooks, you can use global or repository-specific
+overlays by using either <$VCSH_OVERLAY_D/$VCSH_COMMAND> or
+<$VCSH_OVERLAY_D/$VCSH_REPO_NAME.$VCSH_COMMAND>.
+
+Please note that nothing stops you from, e.g. overwriting `status()` in
+<$VCSH_OVERLAY_D/commit>. As the overlays will be sourced and you are
+replacing arbitrary functions, any and all features may stop working, or you
+may even lose data.
+
+You have been warned.
+
## DETAILED HOWTO AND FURTHER READING
Manpages are often short and sometimes useless to glean best practices from.
# If '.git-HEAD' is appended to the version, you are seeing an unreleased
# version of vcsh; the master branch is supposed to be clean at all times
# so you can most likely just use it nonetheless
-VERSION='1.20140313'
+VERSION='1.20141009'
SELF=$(basename $0)
fatal() {
echo "$SELF: fatal: $1" >&2
+ [ -z $2] && exit 1
exit $2
}
# Read defaults
: ${VCSH_REPO_D:="$XDG_CONFIG_HOME/vcsh/repo.d"}
: ${VCSH_HOOK_D:="$XDG_CONFIG_HOME/vcsh/hooks-enabled"}
+: ${VCSH_OVERLAY_D:="$XDG_CONFIG_HOME/vcsh/overlays-enabled"}
: ${VCSH_BASE:="$HOME"}
: ${VCSH_GITIGNORE:=exact}
: ${VCSH_GITATTRIBUTES:=none}
help Display this help text
init <repo> Initialize a new repository
list List all repositories
- list-tracked List all files tracked by vcsh
- list-tracked-by \\
- <repo> List files tracked by a repository
+ list-tracked \\
+ [<repo>] List all files tracked all or one repositories
+ list-untracked \\
+ [<-r>] [<repo>] List all files not tracked by all or one repositories
pull Pull from all vcsh remotes
push Push to vcsh remotes
rename <repo> \\
git remote add origin "$GIT_REMOTE"
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
- if [ $(git ls-remote origin master 2> /dev/null | wc -l ) -lt 1 ]; then
- info "remote is empty, not merging anything"
- exit
+ VCSH_CLONE_ERROR=$(git ls-remote origin master 2>&1)
+ if [ -n "$VCSH_CLONE_ERROR" ]; then
+ rm -rf "$GIT_DIR"
+ fatal "$VCSH_CLONE_ERROR" 1
fi
git fetch
hook pre-merge
done
[ x"$VCSH_CONFLICT" = x'1' ]) &&
fatal "will stop after fetching and not try to merge!
- Once this situation has been resolved, run 'vcsh run $VCSH_REPO_NAME git pull' to finish cloning." 17
+ Once this situation has been resolved, run 'vcsh $VCSH_REPO_NAME pull' to finish cloning." 17
git merge origin/master
hook post-merge
hook post-clone
}
list_tracked() {
- for VCSH_REPO_NAME in $(list); do
- get_files
- done | sort -u
+ VCSH_REPO_NAME=$2; export VCSH_REPO_NAME
+ if [ -n "$VCSH_REPO_NAME" ]; then
+ get_files | list_tracked_helper
+ else
+ for VCSH_REPO_NAME in $(list); do
+ get_files
+ done | list_tracked_helper
+ fi
+}
+
+list_tracked_helper() {
+ sed "s,^,$(printf '%s\n' "$VCSH_BASE/" | sed 's/[,\&]/\\&/g')," | sort -u
}
list_tracked_by() {
- use
- git ls-files | sort -u
+ list_tracked $2
+}
+
+list_untracked() {
+ command -v 'comm' >/dev/null 2>&1 || fatal "Could not find 'comm'"
+
+ temp_file_others=$(mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX") || fatal 'Could not create temp file'
+ temp_file_untracked=$(mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX") || fatal 'Could not create temp file'
+ temp_file_untracked_copy=$(mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX") || fatal 'Could not create temp file'
+
+ # Hack in support for `vcsh list-untracked -r`...
+ directory_opt="--directory"
+ shift 1
+ while getopts "r" flag; do
+ if [ x"$1" = x'-r' ]; then
+ unset directory_opt
+ fi
+ shift 1
+ done
+ # ...and parse for a potential parameter afterwards. As we shifted things out of $* in during getops, we need to look at $1
+ VCSH_REPO_NAME=$1; export VCSH_REPO_NAME
+
+ if [ -n "$VCSH_REPO_NAME" ]; then
+ list_untracked_helper $VCSH_REPO_NAME
+ else
+ for VCSH_REPO_NAME in $(list); do
+ list_untracked_helper $VCSH_REPO_NAME
+ done
+ fi
+ cat $temp_file_untracked
+
+ unset directory_opt directory_component
+ rm -f $temp_file_others $temp_file_untracked $temp_file_untracked_copy || fatal 'Could not delete temp files'
+}
+
+list_untracked_helper() {
+ export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"
+ git ls-files --others "$directory_opt" | (
+ while read line; do
+ echo "$line"
+ directory_component=${line%%/*}
+ [ -d "$directory_component" ] && printf '%s/\n' "$directory_component"
+ done
+ ) | sort -u > $temp_file_others
+ if [ -z "$ran_once" ]; then
+ ran_once=1
+ cp $temp_file_others $temp_file_untracked || fatal 'Could not copy temp file'
+ fi
+ cp $temp_file_untracked $temp_file_untracked_copy || fatal 'Could not copy temp file'
+ comm -12 --nocheck-order $temp_file_others $temp_file_untracked_copy > $temp_file_untracked
}
pull() {
hook pre-pull
for VCSH_REPO_NAME in $(list); do
- printf "$VCSH_REPO_NAME: "
+ printf '%s: ' "$VCSH_REPO_NAME"
GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
use
git pull
push() {
hook pre-push
for VCSH_REPO_NAME in $(list); do
- printf "$VCSH_REPO_NAME: "
+ printf '%s: ' "$VCSH_REPO_NAME"
GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
use
git push
status() {
if [ -n "$VCSH_REPO_NAME" ]; then
- GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
- use
- git status --short --untracked-files='no'
- VCSH_COMMAND_RETURN_CODE=$?
+ status_helper $VCSH_REPO_NAME
else
for VCSH_REPO_NAME in $(list); do
echo "$VCSH_REPO_NAME:"
- GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
- use
- remote_tracking_branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2> /dev/null) && {
- commits_behind=$(git log ..${remote_tracking_branch} --oneline | wc -l)
- commits_ahead=$(git log ${remote_tracking_branch}.. --oneline | wc -l)
- [ ${commits_behind} -ne 0 ] && echo "Behind $remote_tracking_branch by $commits_behind commits"
- [ ${commits_ahead} -ne 0 ] && echo "Ahead of $remote_tracking_branch by $commits_ahead commits"
- }
- git status --short --untracked-files='no'
- VCSH_COMMAND_RETURN_CODE=$?
+ status_helper $VCSH_REPO_NAME
echo
done
fi
}
+status_helper() {
+ GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
+ use
+ remote_tracking_branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2> /dev/null) && {
+ commits_behind=$(git log ..${remote_tracking_branch} --oneline | wc -l)
+ commits_ahead=$(git log ${remote_tracking_branch}.. --oneline | wc -l)
+ [ ${commits_behind} -ne 0 ] && echo "Behind $remote_tracking_branch by $commits_behind commits"
+ [ ${commits_ahead} -ne 0 ] && echo "Ahead of $remote_tracking_branch by $commits_ahead commits"
+ }
+ git status --short --untracked-files='no'
+ VCSH_COMMAND_RETURN_CODE=$?
+}
+
upgrade() {
hook pre-upgrade
# fake-bare repositories are not bare, actually. Set this to false
}
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"
elif [ x"$VCSH_COMMAND" = x'commit' ] ||
[ x"$VCSH_COMMAND" = x'list' ] ||
[ x"$VCSH_COMMAND" = x'list-tracked' ] ||
+ [ x"$VCSH_COMMAND" = x'list-untracked' ] ||
[ x"$VCSH_COMMAND" = x'pull' ] ||
[ x"$VCSH_COMMAND" = x'push' ]; then
:
verbose "$VCSH_COMMAND begin"
VCSH_COMMAND=$(echo "$VCSH_COMMAND" | sed 's/-/_/g'); export VCSH_COMMAND
+
+# source overlay functions
+for overlay in "$VCSH_OVERLAY_D/$VCSH_COMMAND"* "$VCSH_OVERLAY_D/$VCSH_REPO_NAME.$VCSH_COMMAND"*; do
+ [ -r "$overlay" ] || continue
+ info "sourcing '$overlay'"
+ . "$overlay"
+done
+
hook pre-command
$VCSH_COMMAND "$@"
hook post-command
+++ /dev/null
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "VCSH" "1" "March 2014" "" ""
-.
-.SH "NAME"
-\fBvcsh\fR \- Version Control System for $HOME \- multiple Git repositories in $HOME
-.
-.SH "SYNOPSIS"
-\fBvcsh\fR [\fIoptions\fR] \fIcommand\fR
-.
-.P
-\fBvcsh\fR clone \fIurl\fR [\fIrepo\fR]
-.
-.P
-\fBvcsh\fR delete \fIrepo\fR
-.
-.P
-\fBvcsh\fR enter \fIrepo\fR
-.
-.P
-\fBvcsh\fR help
-.
-.P
-\fBvcsh\fR init \fIrepo\fR
-.
-.P
-\fBvcsh\fR list
-.
-.P
-\fBvcsh\fR list\-tracked
-.
-.P
-\fBvcsh\fR list\-tracked\-by \fIrepo\fR
-.
-.P
-\fBvcsh\fR pull
-.
-.P
-\fBvcsh\fR push
-.
-.P
-\fBvcsh\fR rename \fIrepo\fR \fInewname\fR
-.
-.P
-\fBvcsh\fR run \fIrepo\fR \fIshell command\fR
-.
-.P
-\fBvcsh\fR status [\fIrepo\fR]
-.
-.P
-\fBvcsh\fR upgrade \fIrepo\fR
-.
-.P
-\fBvcsh\fR version
-.
-.P
-\fBvcsh\fR which \fIsubstring\fR
-.
-.P
-\fBvcsh\fR write\-gitignore \fIrepo\fR
-.
-.P
-\fBvcsh\fR \fIrepo\fR \fIgit command\fR
-.
-.P
-\fBvcsh\fR \fIrepo\fR
-.
-.SH "DESCRIPTION"
-\fBvcsh\fR allows you to have several \fBgit\fR(1) repositories, all maintaining their working trees in $HOME without clobbering each other\. That, in turn, means you can have one repository per config set (zsh, vim, ssh, etc), picking and choosing which configs you want to use on which machine\.
-.
-.P
-\fBvcsh\fR is using a technique called fake bare Git repositories, keeping \fI$GIT_DIR\fR in a different directory from \fI$GIT_WORK_TREE\fR which is pointed to \fI$HOME\fR\.
-.
-.P
-The use of symlinks is not needed in this setup, making for a cleaner setup\.
-.
-.P
-\fBvcsh\fR was designed with \fBmr\fR(1) in mind so you might want to install it alongside vcsh\. That being said, you can easily use \fBvcsh\fR without \fBmr\fR if you prefer\.
-.
-.P
-A sample configuration for \fBvcsh\fR and \fBmr\fR can be found at \fIhttps://github\.com/RichiH/vcsh_mr_template\fR and used with \fBvcsh clone https://github\.com/RichiH/vcsh_mr_template mr\fR\.
-.
-.P
-Please note that you can always use a path instead of a name for \fIrepo\fR\. This is needed to support mr and other scripts properly and of no concern to an interactive user\.
-.
-.SH "OPTIONS"
-.
-.TP
-\-c
-Source \fIfile\fR prior to other configuration files
-.
-.TP
-\-d
-Enable debug mode
-.
-.TP
-\-v
-Enable verbose mode
-.
-.SH "COMMANDS"
-.
-.TP
-clone
-Clone an existing repository\.
-.
-.IP
-If you need to clone a bundle of repositories, look into the \fBpost\-clone\-retired\fR hook\.
-.
-.TP
-commit
-Commit in all repositories
-.
-.TP
-delete
-Delete an existing repository\.
-.
-.TP
-enter
-Enter repository; spawn new \fI$SHELL\fR\.
-.
-.TP
-help
-Display help\.
-.
-.TP
-init
-Initialize an empty repository\.
-.
-.TP
-list
-List all local vcsh repositories\.
-.
-.TP
-list\-tracked
-List all files tracked by vcsh\.
-.
-.TP
-list\-tracked\-by
-List files tracked by a repository\.
-.
-.TP
-pull
-Pull from all vcsh remotes\.
-.
-.TP
-push
-Push to all vcsh remotes\.
-.
-.TP
-rename
-Rename a repository\.
-.
-.TP
-run
-Run command with \fI$GIT_DIR\fR and \fI$GIT_WORK_TREE\fR set\. Allows you to run any and all commands without any restrictions\. Use with care\.
-.
-.IP
-Please note that there is a somewhat magic feature for run\. Instead of \fIrepo\fR it accepts \fIpath\fR, as well\. Anything that has a slash in it will be assumed to be a path\. \fBvcsh run\fR will then operate on this directory instead of the one normally generated from the repository\'s name\. This is needed to support mr and other scripts properly and of no concern to an interactive user\.
-.
-.TP
-status
-Show statuses of all/one vcsh repositories\.
-.
-.TP
-upgrade
-Upgrade repository to currently recommended settings\.
-.
-.TP
-version
-Print version information\.
-.
-.TP
-which \fIsubstring\fR
-Find \fIsubstring\fR in name of any tracked file\.
-.
-.TP
-write\-gitignore
-Write \.gitignore\.d/\fIrepo\fR via \fBgit ls\-files\fR\.
-.
-.TP
-\fIrepo\fR \fIgitcommand\fR
-Shortcut to run \fBvcsh\fR on a repo\. Will prepend \fBgit\fR to \fIcommand\fR\.
-.
-.TP
-\fIrepo\fR
-Shortcut to run \fBvcsh enter <repo>\fR\.
-.
-.SH "ENVIRONMENT"
-As noted earlier, \fBvcsh\fR will set \fI$GIT_DIR\fR and \fI$GIT_WORK_TREE\fR to the appropriate values for fake bare Git repositories\.
-.
-.SH "CONFIG"
-There are several ways to turn the various knobs on \fBvcsh\fR\. In order of ascending precedence, they are:
-.
-.IP "\(bu" 4
-\fBVARIABLE=foo vcsh\fR
-.
-.IP "\(bu" 4
-</etc/vcsh/config>
-.
-.IP "\(bu" 4
-<$XDG_CONFIG_HOME/vcsh/config>
-.
-.IP "\(bu" 4
-\fBvcsh \-c <file>\fR
-.
-.IP "" 0
-.
-.P
-Please note that those files are sourced\. Any and all commands will be executed in the context of your shell\.
-.
-.P
-Interesting knobs you can turn:
-.
-.TP
-\fI$VCSH_GITATTRIBUTES\fR
-Can be \fInone\fR, or any other value\.
-.
-.IP
-\fInone\fR will not maintain Git attributes in a special location\.
-.
-.IP
-If set to any other value, repo\-specific gitattributes files will be maintained\.
-.
-.IP
-Defaults to \fInone\fR\.
-.
-.TP
-\fI$VCSH_GITIGNORE\fR
-Can be \fIexact\fR, \fInone\fR, or \fIrecursive\fR\.
-.
-.IP
-\fIexact\fR will seed the repo\-specific ignore file with all file and directory names which \fBgit ls\-files\fR returns\.
-.
-.IP
-\fInone\fR will not write any ignore file\.
-.
-.IP
-\fIrecursive\fR will descend through all directories recursively additionally to the above\.
-.
-.IP
-Defaults to \fIexact\fR\.
-.
-.TP
-\fI$VCSH_VCSH_WORKTREE\fR
-Can be \fIabsolute\fR, or \fIrelative\fR\.
-.
-.IP
-\fIabsolute\fR will set an absolute path; defaulting to \fI$HOME\fR\.
-.
-.IP
-\fIrelative\fR will set a path relative to \fI$GIT_DIR\fR\.
-.
-.IP
-Defaults to \fIabsolute\fR\.
-.
-.P
-Less interesting knobs you could turn:
-.
-.TP
-\fI$VCSH_DEBUG\fR
-Enter debug mode\.
-.
-.TP
-\fI$XDG_CONFIG_HOME\fR
-As specified in the \'XDG Base Directory Specification\', see \fIhttp://standards\.freedesktop\.org/basedir\-spec/basedir\-spec\-latest\.html\fR
-.
-.IP
-Defaults to <$HOME/\.config>\.
-.
-.TP
-\fI$VCSH_REPO_D\fR
-The directory where repositories are read from and stored\.
-.
-.IP
-Defaults to <$XDG_CONFIG_HOME/vcsh/repo\.d>\.
-.
-.TP
-\fI$VCSH_HOOK_D\fR
-The directory where hooks are read from\.
-.
-.IP
-Defaults to <$XDG_CONFIG_HOME/vcsh/hooks\-enabled>\.
-.
-.TP
-\fI$VCSH_BASE\fR
-The directory where repositories are checked out to\.
-.
-.IP
-Defaults to \fI$HOME\fR\.
-.
-.SH "HOOK SYSTEM"
-\fBvcsh\fR provides a hook system\. Hook scripts must be executable and should be placed in <$XDG_CONFIG_HOME/vcsh/hooks\-available>\. From there, they can be soft\-linked into <$XDG_CONFIG_HOME/vcsh/hooks\-enabled>; \fBvcsh\fR will only execute hooks that are in this directory\.
-.
-.P
-Hooks follow a simple format\. \fIpre\-run\fR will be run before anything is run\. If you want to have more than one script for a certain hook, just append any kind of string to order them\. A system of \fIpre\-run\fR, <pre\-run\.10>, <pre\-run\.20> etc is suggested; other options would be \fIpre\-run\-10\fR or <pre\-run\.sh>\. A dot after the hook name is optional\.
-.
-.P
-If you want to create hooks for a specific \fIvcsh\fR repository, simply prepend the repository\'s name, followed by a dot, i\.e\. <zsh\.pre\-run>\. Otherwise, the same rules as above apply\. The dot between the repository\'s name and the hook is mandatory, though\.
-.
-.P
-Available hooks are \fIpre\-clone\fR, \fIpost\-clone\fR, \fIpost\-clone\-retired\fR, \fIpre\-command\fR, \fIpost\-command\fR, \fIpre\-enter\fR, \fIpost\-enter\fR, \fIpre\-init\fR, \fIpost\-init\fR, \fIpre\-pull\fR, \fIpost\-pull\fR, \fIpre\-push\fR, \fIpost\-push\fR, \fIpre\-run\fR, \fIpost\-run\fR, \fIpre\-upgrade\fR, and \fIpost\-upgrade\fR\. If you need more, vcsh is trivial to patch, but please let upstream know so we can ship them by default\.
-.
-.SH "DETAILED HOWTO AND FURTHER READING"
-Manpages are often short and sometimes useless to glean best practices from\. While the author tried to avoid this in this case, manpages can not cover detailed howtos\.
-.
-.P
-This software also comes with a file called <README\.md>\. It contains various approaches to setting up and using vcsh\. You can view the file it as plain text or render it into various other formats via Markdown\.
-.
-.P
-On Debian\-based systems, this file can be found in </usr/share/doc/vcsh>\.
-.
-.SH "SECURITY CONSIDERATIONS"
-\fBvcsh\fR allows you to execute arbitrary commands via \fBvcsh run\fR\. For example, adding a \fBsudo\fR(8) rule for \fBvcsh\fR would be pretty stupid\.
-.
-.P
-Additionally, vcsh will source, i\.e\. execute, all files listed in \fICONFIG\fR\. You can put any and all commands into these config files and they will be executed\.
-.
-.SH "BUGS"
-None are known at this time, but reports and/or patches are more than welcome\.
-.
-.SH "INTEROPERABILITY"
-If you rely on \fBgit submodule\fR use \fBgit\fR 1\.7\.12 or later\. Earlier versions do not clean internal variables properly before descending into submodules, resulting in unhappy end users\.
-.
-.SH "HISTORY"
-Like most people, the author initially made do with a single repository for all config files, all of which were soft\-linked into \fI$HOME\fR\.
-.
-.P
-Martin F\. Krafft aka madduck came up with the concept of fake bare Git repositories\.
-.
-.P
-vcsh was initally written by madduck\. This version is a re\-implementation from scratch with a lot more features\. madduck graciously agreed to let the author take over the name\.
-.
-.SH "AUTHOR"
-This manpage and \fBvcsh\fR itself were written by Richard "RichiH" Hartmann\.
-.
-.SH "COPYRIGHT"
-Copyright 2011\-2013 Richard Hartmann \fIrichih@debian\.org\fR
-.
-.P
-Licensed under the GNU GPL version 2 or higher\.
-.
-.P
-https://github\.com/RichiH/vcsh
-.
-.SH "SEE ALSO"
-\fBgit\fR(1), \fBmr\fR(1)