X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=0d8b2900b7a6beb8339fd95b6d6b57027df45770;hb=ce4346fd748ece868fd3abe3787e3b4612493e3a;hp=6c8b87e861ebf27c6d1a5a84bcbff54603ea838a;hpb=c1d89209822ed136e486b6c3c253f247e4d65ab2;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 6c8b87e..0d8b290 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2821,37 +2821,6 @@ sshot() { cd ~/shots ; sleep 5; import -window root shot_`date --iso-8601=m`.jpg } -# list images only -limg() { - local -a images - images=( *.{jpg,gif,png}(.N) ) - - if [[ $#images -eq 0 ]] ; then - print "No image files found" - else - ls "$images[@]" - fi -} - -#f5# Create PDF file from source code -makereadable() { - emulate -L zsh - output=$1 - shift - a2ps --medium A4dj -E -o $output $* - ps2pdf $output -} - -# zsh with perl-regex - use it e.g. via: -# regcheck '\s\d\.\d{3}\.\d{3} Euro' ' 1.000.000 Euro' -#f5# Checks whether a regex matches or not.\\&\quad Example: \kbd{regcheck '.\{3\} EUR' '500 EUR'} -regcheck() { - emulate -L zsh - zmodload -i zsh/pcre - pcre_compile $1 && \ - pcre_match $2 && echo "regex matches" || echo "regex does not match" -} - #f5# List files which have been accessed within the last {\it n} days, {\it n} defaults to 1 accessed() { emulate -L zsh @@ -2872,20 +2841,12 @@ modified() { # modified() was named new() in earlier versions, add an alias for backwards compatibility check_com new || alias new=modified -#f5# Grep in history -greph() { - emulate -L zsh - history 0 | grep $1 -} # 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' -#f5# Watch manpages in a stretched style -man2() { PAGER='dash -c "sed G | /usr/bin/less"' command man "$@" ; } - # 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