projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
/etc/grml/lsb-functions: put log_end_msg exactly one char to the left
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
3b6d6de
..
4f41604
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-3,7
+3,7
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change:
Mon Jul 02 18:17:08
CEST 2007 [mika]
+# Latest change:
Sam Jul 07 10:56:20
CEST 2007 [mika]
################################################################################
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
################################################################################
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
@@
-11,8
+11,8
@@
#
# Global Order: zshenv, zprofile, zshrc, zlogin
################################################################################
#
# Global Order: zshenv, zprofile, zshrc, zlogin
################################################################################
-#
-# zsh-refcard-tag documentation:
+
+# zsh-refcard-tag documentation:
{{{
# You may notice strange looking comments in the zshrc (and ~/.zshrc as
# well). These are there for a purpose. grml's zsh-refcard can now be
# automatically generated from the contents of the actual configuration
# You may notice strange looking comments in the zshrc (and ~/.zshrc as
# well). These are there for a purpose. grml's zsh-refcard can now be
# automatically generated from the contents of the actual configuration
@@
-20,7
+20,7
@@
# and what lines of code to take into account (and for what purpose).
#
# Here is what they mean:
# and what lines of code to take into account (and for what purpose).
#
# Here is what they mean:
-#
{{{
+#
# List of tags (comment types) used:
# #a# Next line contains an important alias, that should
# be included in the grml-zsh-refcard.
# List of tags (comment types) used:
# #a# Next line contains an important alias, that should
# be included in the grml-zsh-refcard.
@@
-235,7
+235,6
@@
export MAIL=${MAIL:-/var/mail/$USER}
# if we don't set $SHELL then aterm, rxvt,.. will use /bin/sh or /bin/bash :-/
export SHELL='/bin/zsh'
export MAIL=${MAIL:-/var/mail/$USER}
# if we don't set $SHELL then aterm, rxvt,.. will use /bin/sh or /bin/bash :-/
export SHELL='/bin/zsh'
- [[ -f ~/.terminfo/m/mostlike ]] && MYLESS='LESS=C TERMINFO=~/.terminfo TERM=mostlike less' || MYLESS='less'
[ -x $(which dircolors) ] && eval `dircolors -b`
# Search path for the cd command
[ -x $(which dircolors) ] && eval `dircolors -b`
# Search path for the cd command
@@
-567,6
+566,7
@@
fi
setopt auto_pushd # make cd push the old directory onto the directory stack.
setopt nonomatch # try to avoid the 'zsh: no matches found...'
setopt nobeep # avoid "beep"ing
setopt auto_pushd # make cd push the old directory onto the directory stack.
setopt nonomatch # try to avoid the 'zsh: no matches found...'
setopt nobeep # avoid "beep"ing
+ setopt pushd_ignore_dups # don't push the same dir twice.
MAILCHECK=30 # mailchecks
REPORTTIME=5 # report about cpu-/system-/user-time of command if running longer than 5 seconds
MAILCHECK=30 # mailchecks
REPORTTIME=5 # report about cpu-/system-/user-time of command if running longer than 5 seconds
@@
-601,7
+601,7
@@
fi
# dirstack handling {{{
DIRSTACKSIZE=20
if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]]; then
# dirstack handling {{{
DIRSTACKSIZE=20
if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]]; then
- dirstack=( ${(
u
f)"$(< ~/.zdirs)"} )
+ dirstack=( ${(f)"$(< ~/.zdirs)"} )
# "cd -" won't work after login by just setting $OLDPWD, so
[[ -d $dirstack[0] ]] && cd $dirstack[0] && cd $OLDPWD
fi
# "cd -" won't work after login by just setting $OLDPWD, so
[[ -d $dirstack[0] ]] && cd $dirstack[0] && cd $OLDPWD
fi
@@
-790,7
+790,7
@@
${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# "
alias ...='cd ../../'
# generate alias named "$KERNELVERSION-reboot" so you can use boot with kexec:
alias ...='cd ../../'
# generate alias named "$KERNELVERSION-reboot" so you can use boot with kexec:
- if [ -x /sbin/kexec ] ; then
+ if [ -x /sbin/kexec
-a -r /proc/cmdline
] ; then
alias "$(uname -r)-reboot"="kexec -l --initrd=/boot/initrd.img-"$(uname -r)" --command-line=\"$(cat /proc/cmdline)\" /boot/vmlinuz-"$(uname -r)""
fi
alias "$(uname -r)-reboot"="kexec -l --initrd=/boot/initrd.img-"$(uname -r)" --command-line=\"$(cat /proc/cmdline)\" /boot/vmlinuz-"$(uname -r)""
fi
@@
-838,6
+838,13
@@
${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# "
# I like clean prompt, so provide simple way to get that
alias 0 &>/dev/null || functions 0 &>/dev/null || alias 0='return 0'
# I like clean prompt, so provide simple way to get that
alias 0 &>/dev/null || functions 0 &>/dev/null || alias 0='return 0'
+# for really lazy people like mika:
+ type S &>/dev/null || alias S='screen'
+ type s &>/dev/null || alias s='ssh'
+
+# get top 10 shell commands:
+ alias top10='print -l ? ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
+
# truecrypt; use e.g. via 'truec /dev/ice /mnt/ice' or 'truec -i'
if [ -x $(which truecrypt) ] ; then
if isutfenv ; then
# truecrypt; use e.g. via 'truec /dev/ice /mnt/ice' or 'truec -i'
if [ -x $(which truecrypt) ] ; then
if isutfenv ; then
@@
-915,8
+922,8
@@
Enjoy your grml system with the zsh!$reset_color"
salias ag="apt-get upgrade"
#a3# Execute \kbd{apt-get update}
salias au="apt-get update"
salias ag="apt-get upgrade"
#a3# Execute \kbd{apt-get update}
salias au="apt-get update"
- #a3# Execute \kbd{aptitude update ; aptitude upgrade}
- salias -a up="aptitude update ; aptitude upgrade"
+ #a3# Execute \kbd{aptitude update ; aptitude
safe-
upgrade}
+ salias -a up="aptitude update ; aptitude
safe-
upgrade"
#a3# Execute \kbd{dpkg-buildpackage}
alias dbp='dpkg-buildpackage'
#a3# Execute \kbd{grep-excuses}
#a3# Execute \kbd{dpkg-buildpackage}
alias dbp='dpkg-buildpackage'
#a3# Execute \kbd{grep-excuses}
@@
-1145,7
+1152,7
@@
grmlstuff() {
# people should use 'grml-x'!
startx() {
if [ -e /etc/X11/xorg.conf ] ; then
# people should use 'grml-x'!
startx() {
if [ -e /etc/X11/xorg.conf ] ; then
- [ -x /usr/bin/startx ] && /usr/bin/startx
|| /usr/X11R6/bin/startx
+ [ -x /usr/bin/startx ] && /usr/bin/startx
"$@" || /usr/X11R6/bin/startx "$@"
else
echo "Please use the script \"grml-x\" for starting the X Window System
because there does not exist /etc/X11/xorg.conf yet.
else
echo "Please use the script \"grml-x\" for starting the X Window System
because there does not exist /etc/X11/xorg.conf yet.
@@
-1247,6
+1254,7
@@
If you want to use xinit anyway please call \"/usr/bin/xinit\"."
else
manzsh() { /usr/bin/man zshall | vim -c "se ft=man| se hlsearch" +/"$1" - ; }
# manzsh() { /usr/bin/man zshall | most +/"$1" ; }
else
manzsh() { /usr/bin/man zshall | vim -c "se ft=man| se hlsearch" +/"$1" - ; }
# manzsh() { /usr/bin/man zshall | most +/"$1" ; }
+ # [[ -f ~/.terminfo/m/mostlike ]] && MYLESS='LESS=C TERMINFO=~/.terminfo TERM=mostlike less' || MYLESS='less'
# manzsh() { man zshall | $MYLESS -p $1 ; }
fi
# manzsh() { man zshall | $MYLESS -p $1 ; }
fi
@@
-1255,11
+1263,13
@@
If you want to use xinit anyway please call \"/usr/bin/xinit\"."
dchange() {
if [ -r /usr/share/doc/${1}/changelog.Debian.gz ] ; then
most /usr/share/doc/${1}/changelog.Debian.gz
dchange() {
if [ -r /usr/share/doc/${1}/changelog.Debian.gz ] ; then
most /usr/share/doc/${1}/changelog.Debian.gz
+ elif [ -r /usr/share/doc/${1}/changelog.gz ] ; then
+ most /usr/share/doc/${1}/changelog.gz
else
if type -p aptitude &>/dev/null ; then
echo "No changelog for package $1 found, using aptitude to retrieve it."
if isgrml ; then
else
if type -p aptitude &>/dev/null ; then
echo "No changelog for package $1 found, using aptitude to retrieve it."
if isgrml ; then
- aptitude -t unstable changelog
tsclient
+ aptitude -t unstable changelog
${1}
else
aptitude changelog ${1}
fi
else
aptitude changelog ${1}
fi