projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add proper bindings for history-beginning-search-{forward,backward}
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
08940c6
..
b864606
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-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.
# 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 Dez 22 19:17:27 CET 2007
[mika]
+# Latest change:
Mon Feb 11 18:00:55 CET 2008
[mika]
################################################################################
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
################################################################################
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
@@
-194,7
+194,7
@@
xcat() {
# setup files. This should be called at the end of .zshrc.
xunfunction() {
local -a funcs
# setup files. This should be called at the end of .zshrc.
xunfunction() {
local -a funcs
- funcs=(
check_com
salias xcat xsource xunfunction zrcautoload)
+ funcs=(salias xcat xsource xunfunction zrcautoload)
for func in $funcs ; do
[[ -n ${functions[$func]} ]] \
for func in $funcs ; do
[[ -n ${functions[$func]} ]] \
@@
-289,6
+289,11
@@
is43(){
return 1
}
return 1
}
+# Use is-at-least, if you need to check more precisely.
+# Note that this test will *always* fail, if the is-at-least
+# function could not be marked for autoloading.
+zrcautoload is-at-least || is-at-least() { return 1 }
+
#f1# Checks whether or not you're running grml
isgrml(){
[[ -f /etc/grml_version ]] && return 0
#f1# Checks whether or not you're running grml
isgrml(){
[[ -f /etc/grml_version ]] && return 0
@@
-369,7
+374,7
@@
else
fi
#v#
fi
#v#
-(( ${+PAGER} )) || export PAGER="less"
+export PAGER=${PAGER:-less}
#v#
export MAIL=${MAIL:-/var/mail/$USER}
#v#
export MAIL=${MAIL:-/var/mail/$USER}
@@
-381,7
+386,7
@@
export SHELL='/bin/zsh'
check_com -c dircolors && eval $(dircolors -b)
# set width of man pages to 80 for more convenient reading
check_com -c dircolors && eval $(dircolors -b)
# set width of man pages to 80 for more convenient reading
-#
(( ${+MANWIDTH} )) || export MANWIDTH=80
+#
export MANWIDTH=${MANWIDTH:-80}
# Search path for the cd command
# cdpath=(.. ~)
# Search path for the cd command
# cdpath=(.. ~)
@@
-441,7
+446,9
@@
bindkey '\e[1~' beginning-of-line # home
bindkey '\e[4~' end-of-line # end
bindkey '\e[A' up-line-or-search # cursor up
bindkey '\e[B' down-line-or-search # <ESC>-
bindkey '\e[4~' end-of-line # end
bindkey '\e[A' up-line-or-search # cursor up
bindkey '\e[B' down-line-or-search # <ESC>-
-bindkey '^x' history-beginning-search-backward # alternative ways of searching the shell history
+
+bindkey '^xp' history-beginning-search-backward
+bindkey '^xP' history-beginning-search-forward
# bindkey -s '^L' "|less\n" # ctrl-L pipes to less
# bindkey -s '^B' " &\n" # ctrl-B runs it in the background
# if terminal type is set to 'rxvt':
# bindkey -s '^L' "|less\n" # ctrl-L pipes to less
# bindkey -s '^B' " &\n" # ctrl-B runs it in the background
# if terminal type is set to 'rxvt':
@@
-871,6
+878,7
@@
setopt extended_glob # in order to use #, ~ and ^ for filename generation
# grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) ->
# -> searches for word not in compressed files
# don't forget to quote '^', '~' and '#'!
# grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) ->
# -> searches for word not in compressed files
# don't forget to quote '^', '~' and '#'!
+setopt longlistjobs # display PID when suspending processes as well
setopt notify # report the status of backgrounds jobs immediately
setopt hash_list_all # Whenever a command completion is attempted, make sure \
# the entire command path is hashed first.
setopt notify # report the status of backgrounds jobs immediately
setopt hash_list_all # Whenever a command completion is attempted, make sure \
# the entire command path is hashed first.
@@
-1356,7
+1364,11
@@
if [[ -r /etc/debian_version ]] ; then
fi
}
fi
}
- isgrmlcd && alias su="sudo -s" # get a root shell
+ # get a root shell as normal user in live-cd mode:
+ if isgrmlcd && [[ $UID -ne 0 ]] ; then
+ alias su="sudo su"
+ fi
+
#a1# Take a look at the syslog: \kbd{\$PAGER /var/log/syslog}
alias llog="$PAGER /var/log/syslog" # take a look at the syslog
#a1# Take a look at the syslog: \kbd{tail -f /var/log/syslog}
#a1# Take a look at the syslog: \kbd{\$PAGER /var/log/syslog}
alias llog="$PAGER /var/log/syslog" # take a look at the syslog
#a1# Take a look at the syslog: \kbd{tail -f /var/log/syslog}