# Source repository: http://git.madduck.net/v/etc/zsh.git
#
-FGIT_BASE="$HOME/.fgits"
+local FGIT_BASE="$HOME/.fgits"
if [ "${1:---help}" = '--help' ] || [ $# -gt 1 ]; then
- echo "usage: ${0%/*} reponame" >&2
- echo "usage: ${0%/*} -l" >&2
+ echo "usage: ${0##*/} reponame" >&2
+ echo "usage: ${0##*/} -l" >&2
[ "$1" = '--help' ]
return $?
fi
export GIT_DIR="$FGIT_BASE/${1}.git"
-_WORKTREE="$(git config --get core.worktree)"
+local _WORKTREE="$(git config --get core.worktree)"
export GIT_WORK_TREE="$(readlink -f $GIT_DIR/$_WORKTREE)"
unset _WORKTREE
git status
-PS1="%S{VCSH:$1}%s$PS1" $SHELL -i
+PS1="%S{${0##*/}:$1}%s$PS1" $SHELL -i