/bin/sh or /bin/bash. :-/
- add a space character in some abbreviation expansions
so it's better readable.
+ * /etc/skel/.zshrc:
+ - added function ytdl (download video from youtube)
+ - work around non utf8 capable software in utf environment
+ using aliases for mrxvt, aterm and centericq
+ * /etc/zsh/*: improved documentation about startup of zsh
-- Michael Prokop <mika@grml.org> Sat, 24 Feb 2007 17:30:11 +0100
# 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: Son Dez 17 14:50:06 CET 2006 [mika]
+# Latest change: Sam Feb 24 19:21:35 CET 2007 [mika]
################################################################################
# source ~/.zshrc.global {{{
# check whether Debian's package management (dpkg) is running
alias check_dpkg_running="$SUDO dpkg_running"
+
+# work around non utf8 capable software in utf environment
+ if [ -x /usr/bin/mrxvt ] ; then
+ isutfenv && [ -n "$LANG" ] && alias mrxvt="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} mrxvt"
+ fi
+
+ if [ -x /usr/bin/aterm ] ; then
+ isutfenv && [ -n "$LANG" ] && alias aterm="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} aterm"
+ fi
+
+ if [ -x /usr/bin/centericq ] ; then
+ isutfenv && [ -n "$LANG" ] && alias centericq="LANG=${LANG/(#b)(*)[.@]*/$match[1].iso885915} centericq"
+ fi
# }}}
## useful functions {{{
which google &>/dev/null && gex () { google "\"[ $1]\" $*" } # exact search at google
+ # download video from youtube
+ ytdl() {
+ if ! [ -n "$2" ] ; then
+ print "Usage: ydtl http://youtube.com/watch?v=.... outputfile.flv">&2
+ return 1
+ else
+ wget -O${2} "http://youtube.com/get_video?"${${${"$(wget -o/dev/null -O- "${1}" | grep -e watch_fullscreen)"}##*watch_fullscreen\?}%%\&fs=*}
+ fi
+ }
+
+
# Function Usage: doc packagename
doc() { cd /usr/share/doc/$1 && ls }
_doc() { _files -W /usr/share/doc -/ }
# 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: Die Nov 16 13:25:04 CET 2004 [mika]
+# Latest change: Sam Feb 24 19:05:18 CET 2007 [mika]
################################################################################
# This file is sourced only for login shells. It
# should contain commands that should be executed only
# in login shells. It should be used to set the terminal
# type and run a series of external commands (fortune,
# msgs, from, etc.)
+# Note that using zprofile and zlogin, you are able to
+# run commands for login shells before and after zshrc.
#
# Global Order: zshenv, zprofile, zshrc, zlogin
################################################################################
# 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: Son Nov 26 10:30:13 CET 2006 [mika]
+# Latest change: Sam Feb 24 19:06:14 CET 2007 [mika]
################################################################################
+# Shutdown files (.zlogout and zlogout) are run, when a login shell exits.
# make sure screen is empty on exit
clear
# 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: Fri Nov 11 00:08:57 CET 2005 [mika]
+# Latest change: Sam Feb 24 18:59:47 CET 2007 [mika]
################################################################################
# This file is sourced only for login shells (i.e. shells
# invoked with "-" as the first character of argv[0], and
-# shells invoked with the -l flag.)
+# shells invoked with the -l flag). It's read after zshenv.
#
# Global Order: zshenv, zprofile, zshrc, zlogin
################################################################################
# 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: Sam Feb 24 17:32:18 CET 2007 [mika]
+# Latest change: Sam Feb 24 18:59:11 CET 2007 [mika]
################################################################################
# This file is sourced on all invocations of the shell.
-# If the -f flag is present or if the NO_RCS option is
-# set within this file, all other initialization files
-# are skipped.
+# It is the 1st file zsh reads; it's read for every shell,
+# even if started with -f (setopt NO_RCS), all other
+# initialization files are skipped.
#
# This file should contain commands to set the command
# search path, plus other important environment variables.
# This file should not contain commands that produce
# output or assume the shell is attached to a tty.
#
+# Notice: .zshenv is the same, execpt that it's not read
+# if zsh is started with -f
+#
# Global Order: zshenv, zprofile, zshrc, zlogin
################################################################################
# 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: Sam Feb 24 17:32:43 CET 2007 [mika]
+# Latest change: Sam Feb 24 19:06:28 CET 2007 [mika]
################################################################################
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,