X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=0cafc3eab5f69f70abbe7342331355fb40761ed8;hb=cc1840a8fd17bb909345c234abb8769f52dfcbd2;hp=3e0257077230fcc8391c404df836a70dfddf0bce;hpb=f1005a112b5cb847d70593235f65f3901a23f48c;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 3e02570..0cafc3e 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2944,13 +2944,6 @@ if is439 && [[ -d /dev/disk/by-id/ ]]; then } fi -#f5# run command or function in a list of directories -rundirs() { - local d CMD STARTDIR=$PWD - CMD=$1; shift - ( for d ($@) {cd -q $d && { print cd $d; ${(z)CMD} ; cd -q $STARTDIR }} ) -} - # Translate DE<=>EN # 'translate' looks up fot a word in a file with language-to-language # translations (field separator should be " : "). A typical wordlist looks @@ -2977,42 +2970,6 @@ trans() { esac } -#f5# List all occurrences of programm in current PATH -plap() { - emulate -L zsh - if [[ $# = 0 ]] ; then - echo "Usage: $0 program" - echo "Example: $0 zsh" - echo "Lists all occurrences of program in the current PATH." - else - ls -l ${^path}/*$1*(*N) - fi -} - -# Found in the mailinglistarchive from Zsh (IIRC ~1996) -#f5# Select items for specific command(s) from history -selhist() { - emulate -L zsh - local TAB=$'\t'; - (( $# < 1 )) && { - echo "Usage: $0 command" - return 1 - }; - cmd=(${(f)"$(grep -w $1 $HISTFILE | sort | uniq | pr -tn)"}) - print -l $cmd | less -F - echo -n "enter number of desired command [1 - $(( ${#cmd[@]} - 1 ))]: " - local answer - read answer - print -z "${cmd[$answer]#*$TAB}" -} - -# Use vim to convert plaintext to HTML -#f5# Transform files to html with highlighting -2html() { - emulate -L zsh - vim -u NONE -n -c ':syntax on' -c ':so $VIMRUNTIME/syntax/2html.vim' -c ':wqa' $1 &>/dev/null -} - # Usage: simple-extract # Using option -d deletes the original archive file. #f5# Smart archive extractor @@ -3207,17 +3164,6 @@ show-archive() { fi } -# It's shameless stolen from -#f5# Use \kbd{vim} as your manpage reader -vman() { - emulate -L zsh - if (( ${#argv} == 0 )); then - printf 'usage: vman \n' - return 1 - fi - man "$@" | col -b | view -c 'set ft=man nomod nolist' - -} - # TODO: So, this is the third incarnation of this function!? #f5# Reload given functions refunc() {