X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=8c8152dd719721ba286f45196f7cc00f372443ed;hb=0ad23aa11d19fa800c5b4694f74226c6307d9e1d;hp=f36ba40f37417d9d49adcd3ad971f2278fca99f6;hpb=a4ebe167b1dee95f3c59c7afeb488290a52a8d0c;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index f36ba40..8c8152d 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2988,30 +2988,6 @@ plap() { 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 @@ -3206,31 +3182,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' - -} - -# function readme() { $PAGER -- (#ia3)readme* } -#f5# View all README-like files in current directory in pager -readme() { - emulate -L zsh - setopt extendedglob - local files - files=(./(#i)*(read*me|lue*m(in|)ut|lies*mich)*(NDr^/=p%)) - if (($#files)) ; then - $PAGER $files - else - print 'No README files.' - fi -} - # TODO: So, this is the third incarnation of this function!? #f5# Reload given functions refunc() {