merged
authorMichael Gebetsroither <michael.geb@gmx.at>
Fri, 1 Aug 2008 11:43:03 +0000 (13:43 +0200)
committerMichael Gebetsroither <michael.geb@gmx.at>
Fri, 1 Aug 2008 11:43:03 +0000 (13:43 +0200)
debian/changelog
etc/skel/.zshrc
etc/zsh/zshenv
etc/zsh/zshrc

index 7f0972c..ed7af87 100644 (file)
@@ -1,8 +1,19 @@
 grml-etc-core (0.3.51) unstable; urgency=low
 
+  [ Frank Terbeck ]
   * zshrc: Add persistent dirstack support for shells older than 4.2.0
+  * zshrc: Make ',.' abbreviation optional [Closes: issue445]
 
- -- Frank Terbeck <ft@grml.org>  Wed, 26 Mar 2008 13:57:12 +0100
+  [ Michael Prokop ]
+  * zshrc:
+    - Add support for ${HOME}/.zshenv.
+    - Add new function ansi-colors() [via harnir]
+    - Support .deb in show-archive() [via harnir]
+    - Fix wrong placed comments for debbug vs. debbugm.
+      Thanks to Dennis Schreiber for pointing out.
+  * zshenv: set $PATH on Solaris/SunOS.
+
+ -- Michael Prokop <mika@grml.org>  Thu, 17 Jul 2008 21:29:56 +0200
 
 grml-etc-core (0.3.50) unstable; urgency=low
 
index 3d008a1..93e8fcd 100644 (file)
@@ -258,7 +258,7 @@ fi
 # searching
 #f4# Search for newspostings from authors
 agoogle() { ${=BROWSER} "http://groups.google.com/groups?as_uauthors=$*" ; }
-#f4# Search Debian Bug Tracking System by BugID in mbox format
+#f4# Search Debian Bug Tracking System
 debbug()  { 
     setopt localoptions extendedglob
     if [[ $# -eq 1 ]]; then
@@ -278,7 +278,7 @@ debbug()  {
         return 1
     fi
 }
-#f4# Search Debian Bug Tracking System
+#f4# Search Debian Bug Tracking System by BugID in mbox format
 debbugm() { bts show --mbox $1 } # provide bugnummer as "$1"
 #f4# Search DMOZ
 dmoz()    { ${=BROWSER} http://search.dmoz.org/cgi-bin/search\?search=${1// /_} }
@@ -599,6 +599,7 @@ show-archive() {
             *.tgz)         tar -ztf $1 ;;
             *.zip)         unzip -l $1 ;;
             *.bz2)         bzless $1 ;;
+            *.deb)         dpkg-deb --fsys-tarfile $1 | tar -tf - -- ;;
             *)             echo "'$1' Error. Please go away" ;;
         esac
     else
@@ -622,6 +623,22 @@ readme() {
     fi
 }
 
+# function ansi-colors()
+#f5# Display ANSI colors
+ansi-colors() {
+    typeset esc="\033[" line1 line2
+    echo " _ _ _40 _ _ _41_ _ _ _42 _ _ 43_ _ _ 44_ _ _45 _ _ _ 46_ _ _ 47_ _ _ 49_ _"
+    for fore in 30 31 32 33 34 35 36 37; do
+        line1="$fore "
+        line2="   "
+        for back in 40 41 42 43 44 45 46 47 49; do
+            line1="${line1}${esc}${back};${fore}m Normal ${esc}0m"
+            line2="${line2}${esc}${back};${fore};1m Bold   ${esc}0m"
+        done
+        echo -e "$line1\n$line2"
+    done
+}
+
 # suidfind() { ls -latg $path | grep '^...s' }
 #f5# Find all files in \$PATH with setuid bit set
 suidfind() { ls -latg $path/*(sN) }
index 4285f4f..7dbc7bc 100644 (file)
@@ -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.
-# Latest change: Sat Mar 22 00:37:25 CET 2008 [mika]
+# Latest change: Sam Mai 17 22:59:29 CEST 2008 [mika]
 ################################################################################
 # This file is sourced on all invocations of the shell.
 # It is the 1st file zsh reads; it's read for every shell,
@@ -70,13 +70,13 @@ else
     fi
 fi
 
-# Solaris 
-case $(uname 2>/dev/null) in
-  SunOS)
-#      PATH="/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/sfw/bin:/opt/sfw/bin:/opt/bin:/usr/local/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ucb:/usr/proc/bin:~/bin"
-     # LD_LIBRARY_PATH="/opt/csw/lib:/opt/sfw/lib:/usr/lib:/usr/local/lib:/usr/ccs/lib:/usr/openwin/lib:/usr/ucb/lib"
-     # MANPATH="$MANPATH:/opt/csw/man:/usr/man:/usr/share/man:/usr/local/man:/opt/sfw/man"
-#esac
+# Solaris
+case $(uname 2>/dev/null) in
+  SunOS)
+     PATH="/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/ucb:/usr/sfw/bin:/usr/gnu/bin:/usr/openwin/bin:/opt/csw/bin:/opt/swf/bin:/sbin:/usr/sbin:~/bin"
+     # LD_LIBRARY_PATH="/opt/csw/lib:/opt/sfw/lib:/usr/lib:/usr/local/lib:/usr/ccs/lib:/usr/openwin/lib:/usr/ucb/lib"
+     # MANPATH="$MANPATH:/opt/csw/man:/usr/man:/usr/share/man:/usr/local/man:/opt/sfw/man"
+esac
 
 # less (:=pager) options:
 #  export LESS=C
index 3554d99..2e60119 100644 (file)
@@ -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.
-# Latest change: Mon Feb 11 18:00:55 CET 2008 [mika]
+# Latest change: Sam Mai 17 22:52:34 CEST 2008 [mika]
 ################################################################################
 # This file is sourced only for interactive shells. It
 # should contain commands to set up aliases, functions,
@@ -352,7 +352,7 @@ zrcautoload is-at-least || is-at-least() { return 1 }
 
 # locale setup {{{
 if [[ -z "$LANG" ]] ; then
-    xsource "/etc/default/locale"
+   xsource "/etc/default/locale"
 fi
 
 export LANG=${LANG:-en_US.iso885915}
@@ -502,6 +502,24 @@ bindkey '^Xi' insert-unicode-char
 #  bindkey . rationalise-dot
 
 #  bindkey '\eq' push-line-or-edit
+
+## toggle the ,. abbreviation feature on/off
+# NOABBREVIATION: default abbreviation-state
+#                 0 - enabled (default)
+#                 1 - disabled
+NOABBREVIATION=${NOABBREVIATION:-0}
+
+grml_toggle_abbrev() {
+    if (( ${NOABBREVIATION} > 0 )) ; then
+        NOABBREVIATION=0
+    else
+        NOABBREVIATION=1
+    fi
+}
+
+zle -N grml_toggle_abbrev
+bindkey '^xA' grml_toggle_abbrev
+
 # }}}
 
 # a generic accept-line wrapper {{{
@@ -729,6 +747,12 @@ abk=(
 
 globalias() {
     local MATCH
+
+    if (( NOABBREVIATION > 0 )) ; then
+        LBUFFER="${LBUFFER},."
+        return 0
+    fi
+
     matched_chars='[.-|_a-zA-Z0-9]#'
     LBUFFER=${LBUFFER%%(#m)[.-|_a-zA-Z0-9]#}
     LBUFFER+=${abk[$MATCH]:-$MATCH}
@@ -2043,6 +2067,7 @@ for color in BLUE RED GREEN CYAN WHITE ; unset $color
 
 # source another config file if present {{{
 xsource "/etc/zsh/zshrc.local"
+xsource "${HOME}/.zshenv"
 # }}}
 
 # "persistent history" {{{