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
# 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
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// /_} }
*.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
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) }
# 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,
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
# 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,
# locale setup {{{
if [[ -z "$LANG" ]] ; then
- xsource "/etc/default/locale"
+ xsource "/etc/default/locale"
fi
export LANG=${LANG:-en_US.iso885915}
# 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 {{{
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}
# source another config file if present {{{
xsource "/etc/zsh/zshrc.local"
+xsource "${HOME}/.zshenv"
# }}}
# "persistent history" {{{