X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=983609a8d96778c1c0e59bc0495dffd911483f35;hb=427ed4a387437515d6f5b3e293c93f4142a6e565;hp=7d3433937421ec0f4707a2b2c6c5b28d08d610f8;hpb=e450b32aa21bafe38ddd3bf1a6d97339b8a7e622;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 7d34339..983609a 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2989,23 +2989,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}" -} - # Usage: simple-extract # Using option -d deletes the original archive file. #f5# Smart archive extractor