X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=703f531136cc33aeff95d4635217075888ccfa25;hb=6949abcdc44fabc9d292c935ac685da1f81ea992;hp=efd21cfec75129b70bf0705d8984217795036e34;hpb=32adff6575bdbd1f2975ddc69541559b512965e8;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index efd21cf..703f531 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -860,7 +860,7 @@ abk=( 'co' './configure && make && sudo make install' ) -globalias() { +zleiab() { emulate -L zsh setopt extendedglob local MATCH @@ -875,8 +875,8 @@ globalias() { LBUFFER+=${abk[$MATCH]:-$MATCH} } -zle -N globalias -bindkey ",." globalias +zle -N zleiab +bindkey ",." zleiab # autoloading zrcautoload zmv # who needs mmv or rename? @@ -2149,19 +2149,6 @@ deswap() { print 'Finished, running "swapoff -a; swapon -a" may also be useful.' } -# spawn a minimally set up mksh - useful if you want to umount /usr/. -minimal-shell() { - emulate -L zsh - local shell="/bin/mksh" - - if [[ ! -x ${shell} ]]; then - printf '`%s'\'' not available, giving up.\n' ${shell} >&2 - return 1 - fi - - exec env -i ENV="/etc/minimal-shellrc" HOME="$HOME" TERM="$TERM" ${shell} -} - # a wrapper for vim, that deals with title setting # VIM_OPTIONS # set this array to a set of options to vim you always want @@ -2317,8 +2304,6 @@ alias md='mkdir -p' alias rmcdir='cd ..; rmdir $OLDPWD || cd $OLDPWD' # console stuff -#a2# Execute \kbd{mplayer -vo fbdev} -alias cmplayer='mplayer -vo fbdev' #a2# Execute \kbd{mplayer -vo fbdev -fs -zoom} alias fbmplayer='mplayer -vo fbdev -fs -zoom' #a2# Execute \kbd{links2 -driver fb} @@ -2378,9 +2363,10 @@ cd() { } #f5# Create Directoy and \kbd{cd} to it -mcd() { +mkcd() { mkdir -p "$@" && cd "$@" } + #f5# Create temporary directory and \kbd{cd} to it cdt() { local t @@ -2423,13 +2409,6 @@ inplaceMkDirs() { #k# mkdir -p from string under cursor or marked area zle -N inplaceMkDirs && bindkey '^XM' inplaceMkDirs -#f5# Make screenshot -sshot() { - [[ ! -d ~/shots ]] && mkdir ~/shots - #cd ~/shots ; sleep 5 ; import -window root -depth 8 -quality 80 `date "+%Y-%m-%d--%H:%M:%S"`.png - cd ~/shots ; sleep 5; import -window root shot_`date --iso-8601=m`.jpg -} - #f5# List files which have been accessed within the last {\it n} days, {\it n} defaults to 1 accessed() { emulate -L zsh @@ -2453,8 +2432,6 @@ check_com new || alias new=modified # use colors when GNU grep with color-support #a2# Execute \kbd{grep -{}-color=auto} (grep --help 2>/dev/null |grep -- --color) >/dev/null && alias grep='grep --color=auto' -#a2# Execute \kbd{grep -i -{}-color=auto} -alias GREP='grep -i --color=auto' # Translate DE<=>EN # 'translate' looks up fot a word in a file with language-to-language @@ -2697,11 +2674,6 @@ allulimit() { ulimit -t unlimited } -# highlight important stuff in diff output, usage example: hg diff | hidiff -#m# a2 hidiff \kbd{histring} oneliner for diffs -check_com -c histring && \ - alias hidiff="histring -fE '^Comparing files .*|^diff .*' | histring -c yellow -fE '^\-.*' | histring -c green -fE '^\+.*'" - #f5# Change the xterm title from within GNU-screen xtrename() { emulate -L zsh