X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=d93f43cf576ef96312148040ca6fc2b6fd8a5633;hb=9f620447815eceef8a316044536d527f2495260e;hp=f9d8f0b20e249149c935a772e01b3ff85f3fb2c1;hpb=4a06f86fa4341014dc84c4c5194543782a7a21a5;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index f9d8f0b..d93f43c 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2976,35 +2976,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}" -} - # Usage: simple-extract # Using option -d deletes the original archive file. #f5# Smart archive extractor