Skip to main content
Sign in
Snippets Groups Projects
Commit 2448eecb authored by Richard Hartmann's avatar Richard Hartmann
Browse files

Release of 0.20111017

* Has been tested on my and other's machines for months
* Includes zsh completion
* Does not support `vcsh use`, but in a releasable state otherwise
parent 9a55a9d5
No related branches found
No related tags found
No related merge requests found
#compdef vcsh
# use\:"use/enter repo"
_arguments \
':subcommand:((
help\:"display help"
list\:"list all repos"
use\:"use/enter repo"
run\:"run command on repo"
init\:"init & clone from repo"
clone\:"clone from repo"
......
......
......@@ -27,6 +27,7 @@ verbose() {
if [ "$VCSH_DEBUG" = '1' ] || [ "$VCSH_VERBOSE" = '1' ]; then echo "$SELF: verbose: $1"; fi
}
# use <repo> Use this repository
help() {
echo "usage: $SELF <args>
......@@ -34,7 +35,6 @@ help() {
list List all repos
use <repo> Use this repository
run <repo>
<command> Use this repository
......@@ -105,24 +105,24 @@ elif [ "$1" = 'run' ]; then
verbose "run end"
exit 0
elif [ "$1" = 'use' ]; then
verbose "use begin"
if [ -n "$ZSH_VERSION" ]; then
if [ -o NO_IGNORE_EOF ]; then
export VCSH_NO_IGNORE_EOF=1
setopt IGNORE_EOF
fi
vcsh_exit() {
vcsh exit;
zle reset-prompt;
}
zle -N vcsh_exit
bindkey '^d' 'vcsh_exit'
fi
use $2
[ -n "$ZSH_VERSION" ] && [ "$USER" = richih ] && buildPS1
verbose "use end"
exit 0
#elif [ "$1" = 'use' ]; then
# verbose "use begin"
# if [ -n "$ZSH_VERSION" ]; then
# if [ -o NO_IGNORE_EOF ]; then
# export VCSH_NO_IGNORE_EOF=1
# setopt IGNORE_EOF
# fi
# vcsh_exit() {
# vcsh exit;
# zle reset-prompt;
# }
# zle -N vcsh_exit
# bindkey '^d' 'vcsh_exit'
# fi
# use $2
# [ -n "$ZSH_VERSION" ] && [ "$USER" = richih ] && buildPS1
# verbose "use end"
# exit 0
elif [ "$1" = 'clone' ]; then
verbose "clone begin"
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment