]>
git.madduck.net Git - etc/zsh.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (parent:
6698a8a )
# Source repository: http://git.madduck.net/v/etc/zsh.git
#
# 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
if [ "${1:---help}" = '--help' ] || [ $# -gt 1 ]; then
echo "usage: ${0%/*} reponame" >&2
fi
export GIT_DIR="$FGIT_BASE/${1}.git"
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
export GIT_WORK_TREE="$(readlink -f $GIT_DIR/$_WORKTREE)"
unset _WORKTREE
typeset -ga precmd_functions
typeset -ga chpwd_functions
typeset -ga precmd_functions
typeset -ga chpwd_functions
+# warn on accidental creation of global variables
+setopt warn_create_global
+
alias apt-cache='noglob apt-cache'
alias locate='noglob locate'
alias apt-cache='noglob apt-cache'
alias locate='noglob locate'
-_ls_opts=(-bC --color=auto)
-ls --group-directories-first >/dev/null 2>&1 \
+typeset -a _ls_opts; _ls_opts=(-bC --color=auto)
+command ls --group-directories-first >/dev/null 2>&1 \
&& _ls_opts+=--group-directories-first
# I prefer POSIX collation for ls
alias ls="LC_COLLATE=POSIX ls $_ls_opts"
&& _ls_opts+=--group-directories-first
# I prefer POSIX collation for ls
alias ls="LC_COLLATE=POSIX ls $_ls_opts"
alias ll='ls -l'
alias l=ll
alias ll='ls -l'
alias l=ll
if [ -d "$GIT_DIR" ]; then
# poor man's replace until I find out how to do named dirs properly
# here:
if [ -d "$GIT_DIR" ]; then
# poor man's replace until I find out how to do named dirs properly
# here:
- _D="${GIT_DIR/$HOME/~}"
+ local _D="${GIT_DIR/$HOME/~}"
set -- "$_D" "$2" "${${1#$_D}%/}"
set -- "$_D" "$2" "${${1#$_D}%/}"
# Source repository: http://git.madduck.net/v/etc/zsh.git
#
# Source repository: http://git.madduck.net/v/etc/zsh.git
#
-HISTFILE=$ZVARDIR/history
+# typeset -g on this one to make warn_create_global happy
+typeset -g HISTFILE=$ZVARDIR/history
HISTSIZE=10000
SAVEHIST=$HISTSIZE
LISTMAX=1000
HISTSIZE=10000
SAVEHIST=$HISTSIZE
LISTMAX=1000
#
if [ "${PS1:-}" = '%m%# ' ]; then
#
if [ "${PS1:-}" = '%m%# ' ]; then
- _MIDDLE="%1v%(2v.|%B%2v%b|.)%(3v.%3v.)"
+ local _MIDDLE="%1v%(2v.|%B%2v%b|.)%(3v.%3v.)"
if is_root; then
_MIDDLE="%25<..<%~%<<"
if is_root; then
_MIDDLE="%25<..<%~%<<"
- _MACHINE_NAME="${_PS1_HL:=B}%m%${(L)_PS1_HL}"
+ local _MACHINE_NAME="${_PS1_HL:=B}%m%${(L)_PS1_HL}"
_MACHINE_NAME="$_MACHINE_NAME${debian_chroot:+/%S$debian_chroot%s}"
PS1="%(2L.+.)%${_MACHINE_NAME}:${_MIDDLE}%# "
_MACHINE_NAME="$_MACHINE_NAME${debian_chroot:+/%S$debian_chroot%s}"
PS1="%(2L.+.)%${_MACHINE_NAME}:${_MIDDLE}%# "
-
- unset _MACHINE_NAME
- unset _PS1_HL
- unset _MIDDLE
fi
: ${RPS1:="#%(0?..%?,)%!"}
fi
: ${RPS1:="#%(0?..%?,)%!"}
WORDCHARS="${WORDCHARS//\/}"
# report time stats when command takes longer than 5 seconds
WORDCHARS="${WORDCHARS//\/}"
# report time stats when command takes longer than 5 seconds
+# typeset -g to make warn_create_global happy
+typeset -g REPORTTIME=5