isgrmlsmall() { return 1 }
fi
+ # are we running within an utf environment?
+ isutfenv() {
+ case "$LANG $CHARSET $LANGUAGE" in
+ *utf*) return 0 ;;
+ *) return 1 ;;
+ esac
+ }
+
# check for user, if not running as root set $SUDO to sudo
(( EUID != 0 )) && SUDO='sudo' || SUDO=''
# }}}
# {{{ set some important options
- umask 022
+ # umask 022
+ umask 002
# history:
setopt append_history # append history list to the history file (important for multiple parallel zsh sessions!)
# truecrypt; use e.g. via 'truec /dev/ice' /mnt/ice' or 'truec -i'
if [ -x /usr/sbin/truecrypt ] ; then
- alias truec='truecrypt --mount-options "rw,sync,dirsync,users,uid=1000,gid=users,umask=077" '
+ if isutfenv ; then
+ alias truec='truecrypt --mount-options "rw,sync,dirsync,users,uid=1000,gid=users,umask=077,utf8" '
+ else
+ alias truec='truecrypt --mount-options "rw,sync,dirsync,users,uid=1000,gid=users,umask=077" '
+ fi
fi
zsh-help(){print "$bg[white]$fg[black]
and /etc/skel/.zshrc which is copied to \$HOME/.zshrc once.
The files are part of the package grml-etc-core, if you want to
use them on a non-grml-system just get the tar.gz from
-http://grml.org/repos/ or get the files from the mercurial
+http://deb.grml.org/ or get the files from the mercurial
repository:
http://hg.grml.org/grml-etc-core/raw-file/tip/etc/skel/.zshrc
# shell functions {{{
setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility
freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done }
- manzsh() { /usr/bin/man zshall | vim -c "se ft=man| se hlsearch" +/"$1" - ; }
-# manzsh() { /usr/bin/man zshall | most +/"$1" ; }
-# manzsh() { man zshall | $MYLESS -p $1 ; }
+
+ # fast manual access
+ if type -p qma &>/dev/null ; then
+ manzsh() { qma zshall "$1" }
+ else
+ manzsh() { /usr/bin/man zshall | vim -c "se ft=man| se hlsearch" +/"$1" - ; }
+ # manzsh() { /usr/bin/man zshall | most +/"$1" ; }
+ # manzsh() { man zshall | $MYLESS -p $1 ; }
+ fi
# use "dchange <package-name>" to view Debian's changelog of the package:
dchange() {
most /usr/share/doc/${1}/changelog.Debian.gz
else
if [ -r /usr/share/doc/${1}/changelog.gz ] ; then
- most /usr/share/doc/${1}/changelog.gz
+ most /usr/share/doc/${1}/changelog.gz
else
- echo "No changelog for package $1 found, sorry."
- return 1
+ echo "No changelog for package $1 found, sorry."
+ return 1
fi
fi
}
}
alias help-zshglob=H-Glob
- type -p fma &>/dev/null && alias ?='fma zshall'
+ type -p qma &>/dev/null && alias ?='qma zshall'
# grep for running process, like: 'any vim'
any() {