X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=7bfdf4d057f4815fd39f8c818d1240078f86230f;hb=d2ac1657a6592f05cc3084654a61ffaacd679b2a;hp=1813b3d2f675adcee1766b1ef74d9f5dbed1068a;hpb=006fc86da47ff8808b433ce0bdb0fac2dc400f21;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 1813b3d..7bfdf4d 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2769,41 +2769,6 @@ zle -N inplaceMkDirs && bindkey '^XM' inplaceMkDirs memusage() { ps aux | awk '{if (NR > 1) print $5; if (NR > 2) print "+"} END { print "p" }' | dc } -#f5# Show contents of gzipped tar file -shtar() { - emulate -L zsh - gunzip -c $1 | tar -tf - -- | $PAGER -} -#f5# Show contents of zip file -shzip() { - emulate -L zsh - unzip -l $1 | $PAGER -} -#f5# Unified diff -udiff() { - emulate -L zsh - diff -urd $* | egrep -v "^Only in |^Binary files " -} -#f5# (Mis)use \kbd{vim} as \kbd{less} -viless() { - emulate -L zsh - vim --cmd 'let no_plugin_maps = 1' -c "so \$VIMRUNTIME/macros/less.vim" "${@:--}" -} - -# Function Usage: uopen $URL/$file -#f5# Download a file and display it locally -uopen() { - emulate -L zsh - if ! [[ -n "$1" ]] ; then - print "Usage: uopen \$URL/\$file">&2 - return 1 - else - FILE=$1 - MIME=$(curl --head $FILE | grep Content-Type | cut -d ' ' -f 2 | cut -d\; -f 1) - MIME=${MIME%$'\r'} - curl $FILE | see ${MIME}:- - fi -} # Function Usage: doc packagename #f5# \kbd{cd} to /usr/share/doc/\textit{package} @@ -2821,18 +2786,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# List files which have been accessed within the last {\it n} days, {\it n} defaults to 1 accessed() { emulate -L zsh