diff --git a/AUTHORS b/CONTRIBUTORS
similarity index 67%
rename from AUTHORS
rename to CONTRIBUTORS
index e6c3f11e2553c66b4a828e88e9ee405a55a2d50e..76741599431da3da7b45a26a2af09ada3ecd7960 100644
--- a/AUTHORS
+++ b/CONTRIBUTORS
@@ -1,8 +1,12 @@
 Alphabetical list of everyone who ever committed to this repository
 
 Vincent Demeester <vincent@demeester.fr>
+martin f. krafft <madduck@madduck.net>
 Valentin Haenel <valentin.haenel@gmx.de>
 Richard Hartmann <richih.mailinglist@gmail.com>
+mek-apelsin <mek@pels.in>
 Dieter Plaetinck <dieter@plaetinck.be>
 Corey Quinn <corey@sequestered.net>
 Gernot Schulz <post@gernot-schulz.com>
+Jonathan Sternberg <jonathansternberg@gmail.com>
+Frank Terbeck <ft@bewatermyfriend.org>
diff --git a/INSTALL.md b/INSTALL.md
index 0df294d222eadbae5384f71912f3da16fe1a88ff..29c9889194866fd66a256374e406a799cdd2dd7b 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,26 +1,33 @@
 # Pre-requisites #
 
-If you want to build the manpage, you will need ronn. Newer versions of Debian come with a package:
+If you want to build the manpage, you will need [ronn] [1].
+Debian 7.0 and above come with a package, so do most Debian clones.
 
-    apt-get install ruby-ronn
+To install ronn on your Debian-based system, simply run
+
+	apt-get install ruby-ronn
+
+There are no other dependencies other than `git`, `ronn` and a POSIX shell.
 
 
 # Installing #
 
-    sudo make install
+	sudo make install
 
 
 # Uninstalling #
 
-    sudo make uninstall
+	sudo make uninstall
 
-There is another, more thorough, version. Just make sure you are not running this when you have installed to an important directory which is empty, otherwise.
+There is another, more thorough, version. Just make sure you are not running
+this when you have installed to an important directory which is empty,
+otherwise.
 
-**THIS WILL DELETE /usr/local IF YOU INSTALLED THERE AND IT'S EMPTY, OTHERWISE**
+**THIS WILL DELETE /usr/local IF YOU INSTALLED THERE AND IT BECOMES EMPTY**
 
-    sudo make purge
+	sudo make purge
 
-**THIS WILL DELETE /usr/local IF YOU INSTALLED THERE AND IT'S EMPTY, OTHERWISE**
+**THIS WILL DELETE /usr/local IF YOU INSTALLED THERE AND IT BECOMES EMPTY**
 
 This is not in the default behaviour of `make uninstall` for obvious reasons.
 
@@ -29,8 +36,10 @@ This is not in the default behaviour of `make uninstall` for obvious reasons.
 
 To clean up the generated manpage, run
 
-    make clean
+	make clean
 
 and if you are bored, I suggest
 
-    make moo
+	make moo
+
+[1]: http://rtomayko.github.io/ronn/
diff --git a/PACKAGING b/PACKAGING.md
similarity index 60%
rename from PACKAGING
rename to PACKAGING.md
index 92c1dd50d0d0bcddad814852b492fc55dd67570e..b93b17cd351536ee710eff0867c575a3dd667c61 100644
--- a/PACKAGING
+++ b/PACKAGING.md
@@ -11,15 +11,27 @@ the upstream repository
 
 Ubuntu imports Debian's package automagically.
 
+
 # Mac OS X
 
 Homebrew does not require any packaging information within this repository.
 A separate branch with a statically compiled manpage and release tags is
-provided to ease packaging. The static manpage because Homebrew lacks Ronn;
+provided to ease packaging. The static manpage because Homebrew lacks ronn;
 the tag so github generates tarballs Homebrew can be pointed at.
 
-# Anything else
+
+# Additional notes
+
+## Static manpage
+
+In case you can not build the manpage because you are missing ronn please
+contact the author. The "debian-squeeze" branch carries a quilt patchset with
+a pre-compiled manpage and the "homebrew" one carries a static manpage. If you
+need, or want, to build your packages against a static version in your own
+branch this can be done.
+
+## Other systems
 
 If you are maintaining a package for a different distribution, please get
 in touch so your work can be included in another branch, thus allowing others
-to adapt it to their needs or to improve it.
+to adapt it to their needs or to improve upon it.
diff --git a/README.md b/README.md
index 66db1106b82582cc3e0b4bf50b97ddbb1a551c35..f641ce970ec90dca176a267deca33f1c06b7a085 100644
--- a/README.md
+++ b/README.md
@@ -15,55 +15,64 @@ community around the general idea of version controlling your (digital) life.
 
 * IRC: #vcs-home on irc.oftc.net
 
-* Mailing list: http://lists.madduck.net/listinfo/vcs-home
+* Mailing list: [http://lists.madduck.net/listinfo/vcs-home][vcs-home-list]
 
-* Pull requests or issues on https://github.com/RichiH/vcsh
+* Pull requests or issues on [https://github.com/RichiH/vcsh][vcsh]
 
 # 2 Introduction #
 
-vcsh allows you to have several git 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.
-
-vcsh was designed with [mr] [1] in mind so you might want to install that, as
+[vcsh][vcsh] allows you to maintain several git repositories in one single
+directory. They all maintain their working trees without clobbering each other
+or interfering otherwise. By default, all git repositories maintained via
+`vcsh` are stored in <$HOME> but you can override this setting if you want to.
+All that means that you can have one repository per application or application
+family, i.e. `zsh`, `vim`, `ssh`, etc. This, in turn, allows you to clone
+custom sets of configurations onto different machines or even for different
+users; picking and mixing which configurations you want to use where.
+For example, you may not need to have your `mplayer` configuration on a server
+or available to root and you may want to maintain different configuration for
+`ssh` on your personal and your work machines.
+
+`vcsh` was designed with [mr][mr] in mind so you might want to install that, as
 well.
 
-Read INSTALL.md for detailed setup instructions.
+Read <INSTALL.md> and <PACKAGING.md> for instructions specific to your operating
+system.
 
 The following overview will try to give you an idea of the use cases and
-advantages of vcsh. See sections 3 and 4 for detailed instructions and
+advantages of `vcsh`. See sections 3 and 4 for detailed instructions and
 examples.
 
 ## 2.1 Talks ##
 
-Some people found it useful to look at slides and videos explaining how vcsh works.
-They can all be found at [here](http://richardhartmann.de/talks/).
+Some people found it useful to look at slides and videos explaining how `vcsh`
+works.
+They can all be found [on the author's talk page][talks].
 
 # 3 Overview
 
 ## 3.1 Comparison to Other Solutions ##
 
 Most people who decide to put their dotfiles under version control start with a
-**single repository in $HOME**, adding all their dotfiles (and possibly more)
+single repository in <$HOME>, adding all their dotfiles (and possibly more)
 to it. This works, of course, but can become a nuisance as soon as you try to
 manage more than one host.
 
 The next logical step is to create single-purpose repositories in, for example,
-~/.dotfiles and to create **symbolic links in $HOME**. This gives you the
+<~/.dotfiles> and to create symbolic links into <$HOME>. This gives you the
 flexibility to check out only certain repositories on different hosts. The
 downsides of this approach are the necessary manual steps of cloning and
-symlinking the individual repositories. It will probably become a nuisance when
-you try to manage more than two hosts.
+symlinking the individual repositories.
 
-**vcsh** takes this second approach one step further. It expects
-**single-purpose repositories** and stores them in a hidden directory (similar
-to ~/.dotfiles). However, it does not create symbolic links in $HOME; it puts
-the **actual files right into $HOME**.
+`vcsh` takes this second approach one step further. It expects
+single-purpose repositories and stores them in a hidden directory (similar
+to <~/.dotfiles>). However, it does not create symbolic links in <$HOME>; it
+puts the actual files right into <$HOME>.
 
-Furthermore, by making use of [mr] [1], it makes it very easy to enable/disable
-and clone a large number of repositories. The use of mr is technically optional
-(see 4.3), but it will be an integral part of the proposed system that follows.
+Furthermore, by making use of [mr][mr], it makes it very easy to enable/disable
+and clone a large number of repositories. The use of `mr` is technically
+optional (see section 4.3), but it will be an integral part of the proposed
+system that follows.
 
 ## 3.2 Default Directory Layout ##
 
@@ -373,8 +382,8 @@ manually. Alternatively, you could try something like this:
         vcsh run $repo git pull;
     done
 
-----------
-
-mr can be found at: [http://kitenet.net/~joey/code/mr/][1]
 
-[1]: http://kitenet.net/~joey/code/mr/ (http://kitenet.net/~joey/code/mr/)
+[mr]: http://kitenet.net/~joey/code/mr/
+[talks]: http://richardhartmann.de/talks/
+[vcsh]: https://github.com/RichiH/vcsh
+[vcs-home-list]: http://lists.madduck.net/listinfo/vcs-home
diff --git a/_vcsh b/_vcsh
index 89588e4b23c5dc389f94dd827ab80cebbd781551..2367fb44c9f513741ae9776fc62f3c3e0bf952e2 100644
--- a/_vcsh
+++ b/_vcsh
@@ -1,18 +1,127 @@
 #compdef vcsh
 
-_arguments \
-	':subcommand:((
-		clone\:"clone from repo"
-		help\:"display help"
-		delete\:"delete repo"
-		enter\:"Enter repo; spawn new \$SHELL"
-		init\:"init & clone from repo"
-		list\:"list all repos"
-		list-tracked\:"list all files tracked by vcsh"
-		list-tracked-by\:"list files tracked by a repo"
-		rename\:"rename repo"
-		run\:"run command on repo"
-		setup\:"set up repo with recommended settings"
-		write-gitignore\:"write .gitignore.d/foo via git ls-files"
-		\<REPO\>\:"Run git command directly"
-	))'
+function __vcsh_repositories () {
+	local expl
+	local -a repos
+	repos=( ${(f)"$(command vcsh list)"} )
+	_describe -t repos 'repositories' repos
+}
+
+function __vcsh_not_implemented_yet () {
+	_message "Subcommand completion '${1#*-}': not implemented yet"
+}
+
+function _vcsh-clone () {
+	__vcsh_not_implemented_yet "$0" #TODO
+}
+
+function _vcsh-delete () {
+	(( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-enter () {
+	(( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-help () {
+	_nothing
+}
+
+function _vcsh-init () {
+	_nothing
+}
+
+function _vcsh-list () {
+	_nothing
+}
+
+function _vcsh-list-tracked () {
+	_nothing
+}
+
+function _vcsh-list-tracked-by () {
+	(( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-rename () {
+	(( CURRENT == 2 )) && __vcsh_repositories
+	(( CURRENT == 3 )) && _message "new repository name"
+	(( CURRENT > 3 )) && _nothing
+}
+
+function _vcsh-run () {
+	(( CURRENT == 2 )) && __vcsh_repositories
+	if (( CURRENT >= 3 )); then
+		words=( "${(@)words[3,-1]}" )
+		(( CURRENT -= 2 ))
+		_complete
+	fi
+}
+
+function _vcsh-upgrade () {
+	(( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh-version () {
+	_nothing
+}
+
+function _vcsh-which () {
+	_files
+}
+
+function _vcsh-write-gitignore () {
+	(( CURRENT == 2 )) && __vcsh_repositories
+}
+
+function _vcsh () {
+	local curcontext="${curcontext}"
+	local state vcshcommand
+	local -a args subcommands
+
+	subcommands=(
+		"clone:clone an existing repository"
+		"delete:delete an existing repository"
+		"enter:enter repository; spawn new <\$SHELL>"
+		"help:display help"
+		"init:initialize an empty repository"
+		"list:list all local vcsh repositories"
+		"list-tracked:list all files tracked by vcsh"
+		"list-tracked-by:list files tracked by a repository"
+		"rename:rename a repository"
+		"run:run command with <\$GIT_DIR> and <\$GIT_WORK_TREE> set"
+		"upgrade:upgrade repository to currently recommended settings"
+		"version:print version information"
+		"which:find <substring> in name of any tracked file"
+		"write-gitignore:write .gitignore.d/<repo> via git ls-files"
+	)
+
+	args=(
+		'-c[source <file> prior to other configuration files]:config files:_path_files'
+		'-d[enable debug mode]'
+		'-v[enable verbose mode]'
+		'*:: :->subcommand_or_options_or_repo'
+	)
+
+	_arguments -C ${args} && return
+
+	if [[ ${state} == "subcommand_or_options_or_repo" ]]; then
+		if (( CURRENT == 1 )); then
+			_describe -t subcommands 'vcsh sub-commands' subcommands
+			__vcsh_repositories
+		else
+			vcshcommand="${words[1]}"
+			if ! (( ${+functions[_vcsh-$vcshcommand]} )); then
+				# There is no handler function, so this is probably the name
+				# of a repository. Act accordingly.
+				_message "git sub-command"
+				#TODO and now we need to complete on git subcommands
+			else
+				curcontext="${curcontext%:*:*}:vcsh-${vcshcommand}:"
+				_call_function ret _vcsh-${vcshcommand}
+			fi
+		fi
+	fi
+}
+
+_vcsh "$@"
diff --git a/changelog b/changelog
index 12e32088102ba5aae813c5767ab4aa842b55e127..98d5074dce324649ea8b965e48e58589403fb353 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,13 @@
+2013-05-27  Richard Hartmann <richih.mailinglist@gmail.com>
+
+	* Release 1.3
+	* Hide hook execution unless verbose is set
+	* Ancher ignore file to root of Git repo
+	* Implemented basename() to save one process spawn
+	* Improve packaged Zsh completion
+	* Renamed `vcsh setup` to `vcsh upgrade`
+	* Various documentation and spelling improvements
+
 2013-04-21  Richard Hartmann <richih.mailinglist@gmail.com>
 
 	* Release 1.2
@@ -22,7 +32,6 @@
 	* Make `vcsh list` more resilient
 	* Lots of doc improvements
 
-
 2012-02-27  Richard Hartmann <richih.mailinglist@gmail.com>
 
 	* Refactor Makefile
diff --git a/debian/changelog b/debian/changelog
index 9ee031bc6f43d15ebc39015173d8d8bf768ec826..623f59ec435e0b42b16448be91c214fcfa509477 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+vcsh (1.3-1) unstable; urgency=low
+
+  * New upstream release
+    + Hide hook execution unless verbose is set
+    + Ancher ignore file to root of Git repo
+    + Implemented basename() to save one process spawn
+    + Improve packaged Zsh completion
+    + Renamed `vcsh setup` to `vcsh upgrade`
+    + Various documentation and spelling improvements
+
+ -- Richard Hartmann <richih.mailinglist@gmail.com>  Mon, 27 May 2013 23:40:08 +0200
+
 vcsh (1.2-3~bpo70+1) wheezy-backports; urgency=low
 
   * Rebuild for wheezy-backports.
diff --git a/debian/gbp.conf b/debian/gbp.conf
index b84d782661293797dd3cc330cdcf80bb800dab89..a26b79618d3bd99afddfe85ab2a77d2904455bb8 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -3,3 +3,8 @@ upstream-branch = master
 debian-branch = debian-wheezy
 upstream-tag = v%(version)s
 debian-tag = debian/%(version)s
+
+postbuild = lintian $GBP_CHANGES_FILE
+color = on
+compression = xz
+compression-level = 9
diff --git a/debian/watch b/debian/watch
index a731db3c0dd34524dfde3a736af05a89e735fde8..2e73b0e7a9b1c3d3016ac292463b91eb7afb8243 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,5 @@
-# The Debian package is just a branch in the upstream repo.
-# At the moment, I don't see a need for debian/watch.
-# This file exists solely to make lintian happy.
+version=3
+opts=uversionmangle=s/^((?:\d+\.)*\d+-\d+-bpo\d+\+\d+)$/0.0.$1/;s/^(1\.2-homebrew)$/0.0.$1/;s/^((?:\d+\.)*\d+-\d+)$/0.0.$1/ \
+https://github.com/RichiH/vcsh/tags \
+.*/archive/(?:upstream/)?(?:v||version-|release-|X|R|r)(\d\S*)\.tar\.gz
+# Bart Martens <bartm@debian.org>  Tue, 07 May 2013 19:38:25 +0000
diff --git a/doc/hooks b/doc/hooks
index 036e2dc6a28ca6e76e4a4a504b8a224abee7a21f..5547131cddc8c625e095bf13789833ac403a7fd6 100644
--- a/doc/hooks
+++ b/doc/hooks
@@ -5,5 +5,5 @@ pre-enter
 post-enter
 pre-run
 post-run
-pre-setup
-post-setup
+pre-upgrade
+post-upgrade
diff --git a/doc/vcsh.1.ronn b/doc/vcsh.1.ronn
index e12cf1599c175ee5c8c3be9b12a845a5e28a70e8..adcd69a7a2771fc6a0af2f5f77675256c6701524 100644
--- a/doc/vcsh.1.ronn
+++ b/doc/vcsh.1.ronn
@@ -1,4 +1,4 @@
-vcsh(1) - manage config files in $HOME via fake bare git repositories
+vcsh(1) - manage config files in $HOME via fake bare Git repositories
 =====================================================================
 
 ## SYNOPSIS
@@ -25,7 +25,7 @@ vcsh(1) - manage config files in $HOME via fake bare git repositories
 
 `vcsh` run <repo> <shell command>
 
-`vcsh` setup <repo>
+`vcsh` upgrade <repo>
 
 `vcsh` version
 
@@ -45,7 +45,7 @@ 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.
 
-`vcsh` is using a technique called fake bare git repositories, keeping <$GIT_DIR>
+`vcsh` is using a technique called fake bare Git repositories, keeping <$GIT_DIR>
 in a different directory from <$GIT_WORK_TREE> which is pointed to <$HOME>.
 
 The use of symlinks is not needed in this setup, making for a cleaner setup.
@@ -112,8 +112,8 @@ an interactive user.
   This is needed to support mr and other scripts properly and of no concern to
   an interactive user.
 
-* setup:
-  Set up repository with recommended settings.
+* upgrade:
+  Upgrade repository to currently recommended settings.
 
 * version:
   Print version information.
@@ -122,7 +122,7 @@ an interactive user.
   Find <substring> in name of any tracked file.
 
 * write-gitignore:
-  Write .gitignore.d/<repo> via git ls-files.
+  Write .gitignore.d/<repo> via `git ls-files`.
 
 * <repo> <gitcommand>:
   Shortcut to run `vcsh` on a repo. Will prepend `git` to <command>.
@@ -133,7 +133,7 @@ an interactive user.
 ## ENVIRONMENT
 
 As noted earlier, `vcsh` will set <$GIT_DIR> and <$GIT_WORK_TREE> to the
-appropriate values for fake bare git repositories.
+appropriate values for fake bare Git repositories.
 
 ## CONFIG
 
@@ -207,7 +207,7 @@ same rules as above apply. The dot between the repository's name and the hook
 is mandatory, though.
 
 Available hooks are <pre-enter>, <post-enter>, <pre-run>, <post-run>,
-<pre-setup>, and <post-setup>. If you need more, vcsh is trivial to patch,
+<pre-upgrade>, and <post-upgrade>. If you need more, vcsh is trivial to patch,
 but please let upstream know so we can ship them by default.
 
 ## DETAILED HOWTO AND FURTHER READING
@@ -246,7 +246,7 @@ resulting in unhappy end users.
 Like most people, the author initially made do with a single repository for all
 config files, all of which were soft-linked into <$HOME>.
 
-Martin F. Krafft aka madduck came up with the concept of fake bare git
+Martin F. Krafft aka madduck came up with the concept of fake bare Git
 repositories.
 
 vcsh was initally written by madduck. This version is a re-implementation from
diff --git a/tools/list_AUTHORS b/tools/list_CONTRIBUTORS
similarity index 100%
rename from tools/list_AUTHORS
rename to tools/list_CONTRIBUTORS
diff --git a/vcsh b/vcsh
index c446fb981ce89e4561f2bace26036a7cfb869da3..2509b66cbde0f954aa7329f97752f9458409dacc 100755
--- a/vcsh
+++ b/vcsh
@@ -1,18 +1,30 @@
 #!/bin/sh
 
 # This program is licensed under the GNU GPL version 2 or later.
-# (c) Richard "RichiH" Hartmann <richih.mailinglist@gmail.com>, 2011-2012
+# (c) Richard "RichiH" Hartmann <richih.mailinglist@gmail.com>, 2011-2013
 # For details, see LICENSE. To submit patches, you have to agree to
 # license your code under the GNU GPL version 2 or later.
 
 # While the following is not legally binding, the author would like to
 # explain the choice of GPLv2+ over GPLv3+.
 # The author prefers GPLv3+ over GPLv2+ but feels it's better to maintain
-# full compability with git. In case git ever changes its licensing terms,
+# full compatibility's with git. In case git ever changes its licensing terms,
+# which is admittedly extremely unlikely to the point of being impossible,
 # this software will most likely follow suit.
 
+# This should always be the first line of code to facilitate debugging
+[ -n "$VCSH_DEBUG" ] && set -vx
+
+basename() {
+	# Implemented in shell to avoid spawning another process
+	local file
+	file="${1##*/}"
+	[ -z "$2" ] || file="${file%$2}"
+	echo "$file"
+}
+
 SELF=$(basename $0)
-VERSION='1.2'
+VERSION='1.3'
 
 fatal() {
 	echo "$SELF: fatal: $1" >&2
@@ -22,12 +34,14 @@ fatal() {
 # We need to run getops as soon as possible so we catch -d and other
 # options that will modify our behaviour.
 # Commands are handled at the end of this script.
-while getopts  "c:dv" flag; do
+while getopts "c:dv" flag; do
 	if [ "$1" = '-d' ] || [ "$1" = '--debug' ]; then
 		set -vx
 		VCSH_DEBUG=1
+		echo "$SELF $VERSION"
 	elif [ "$1" = '-v' ];then
 		VCSH_VERBOSE=1
+		echo "$SELF $VERSION"
 	elif [ "$1" = '-c' ];then
 		VCSH_OPTION_CONFIG=$OPTARG
 	fi
@@ -90,7 +104,7 @@ help() {
           <newname>     Rename repository
    run <repo> \\
        <command>        Use this repository
-   setup <repo>         Set up repository with recommended settings
+   upgrade <repo>       Upgrade repository to currently recommended settings
    version              Print version information
    which <substring>    Find substring in name of any tracked file
    write-gitignore \\
@@ -170,7 +184,7 @@ git_dir_exists() {
 hook() {
 	for hook in $VCSH_HOOK_D/$1* $VCSH_HOOK_D/$VCSH_REPO_NAME.$1*; do
 		[ -x "$hook" ] || continue
-		info "executing '$hook'"
+		verbose "executing '$hook'"
 		"$hook"
 	done
 }
@@ -181,7 +195,7 @@ init() {
 	mkdir -p "$GIT_WORK_TREE" || fatal "could not create '$GIT_WORK_TREE'" 50
 	cd "$GIT_WORK_TREE" || fatal "could not enter '$GIT_WORK_TREE'" 11
 	git init
-	setup
+	upgrade
 }
 
 list() {
@@ -220,14 +234,14 @@ run() {
 	hook post-run
 }
 
-setup() {
-	hook pre-setup
+upgrade() {
+	hook pre-upgrade
 	use
 	git config core.worktree     "$GIT_WORK_TREE"
 	git config core.excludesfile ".gitignore.d/$VCSH_REPO_NAME"
 	git config vcsh.vcsh         'true'
 	[ -e "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME" ] && git add -f "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME"
-	hook post-setup
+	hook post-upgrade
 }
 
 use() {
@@ -257,9 +271,9 @@ write_gitignore() {
 	tempfile=$(mktemp) || fatal "could not create tempfile" 51
 	echo '*' > "$tempfile" || fatal "could not write to '$tempfile'" 57
 	for gitignore in $gitignores; do
-		echo "$gitignore" | sed 's/^/!/' >> "$tempfile" || fatal "could not write to '$tempfile'" 57
+		echo "$gitignore" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57
 		if [ x$VCSH_GITIGNORE = x'recursive' ] && [ -d "$gitignore" ]; then
-			{ echo "$gitignore/*" | sed 's/^/!/' >> "$tempfile" || fatal "could not write to '$tempfile'" 57; }
+			{ echo "$gitignore/*" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57; }
 		fi
 	done
 	if diff -N "$tempfile" "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME" > /dev/null; then
@@ -300,7 +314,7 @@ elif [ "$1" = 'delete' ]           ||
      [ "$1" = 'list-tracked-by' ]  ||
      [ "$1" = 'rename' ]           ||
      [ "$1" = 'run' ]              ||
-     [ "$1" = 'setup' ]            ||
+     [ "$1" = 'upgrade' ]          ||
      [ "$1" = 'write-gitignore' ]; then
 	[ -z $2 ]                      && fatal "$1: please specify repository to work on" 1
 	[ "$1" = 'rename' -a -z "$3" ] && fatal "$1: please specify a target name" 1