From db88d9d2536c7ea4596d5d6f473ed6218b1f5984 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 17 Mar 2007 20:13:32 +0100 Subject: [PATCH] /etc/zsh/zshrc: added aliases for better iso<->utf handling --- debian/changelog | 10 ++++++++++ etc/zsh/zshrc | 17 ++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5d43ee2..cb04c20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +grml-etc-core (0.2.35) unstable; urgency=low + + * /etc/zsh/zshrc: added aliases for better iso<->utf handling: + - term2iso + - term2utf + - utf2iso + - iso2utf + + -- Michael Prokop Sat, 17 Mar 2007 20:12:40 +0100 + grml-etc-core (0.2.34) unstable; urgency=low * /etc/grml/lsb-functions: set RC_NOCOLOR if nocolor string is diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 4515b9d..4ef8f95 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mit Mär 14 15:48:34 CET 2007 [mika] +# Latest change: Sam Mär 17 20:12:26 CET 2007 [mika] ################################################################################ # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, @@ -577,6 +577,21 @@ ${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# " alias rd='rmdir' alias md='mkdir' + # see http://www.cl.cam.ac.uk/~mgk25/unicode.html#term for details + alias term2iso="echo 'Setting terminal to iso mode' ; echo -e '%@'" + alias term2utf="echo 'Setting terminal to utf-8 mode'; echo -e '%G'" + + alias utf2iso='if isutfenv ; then + for ENV in `env | grep UTF` ; do + eval export "$(echo $ENV | sed 's/UTF-8/iso885915/')" + done + fi' + alias iso2utf='if isutfenv ; then + for ENV in `env | grep '\.iso'` ; do + eval export "$(echo $ENV | sed 's/iso.*/UTF-8/')" + done + fi' + # set up software synthesizer via speakup alias swspeak=' aumix -w 90 -v 90 -p 90 -m 90 -- 2.1.4