X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.zshrc;h=630272e486cd204eb4b3b74385c856be2169f4f9;hb=e2207cdcaa24da681907bc27f86aa56a296eb1bb;hp=247e271edc5dec53e6bfb882c14ee1453a5e474c;hpb=0597c709c459299c8c944728f0eba9889ab871f1;p=grml-etc-core.git diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index 247e271..630272e 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -24,6 +24,9 @@ if [[ -z "$ZSHRC_GLOBAL_HAS_BEEN_READ" ]] ; then print 'Warning: global zsh config has not been read.' >&2 print ' prepare for possible errors!' >&2 + print '' >&2 + print 'See our refcard for info on how to get the complete configuration:' >&2 + print ' ' >&2 fi # }}} @@ -596,6 +599,7 @@ show-archive() { *.tgz) tar -ztf $1 ;; *.zip) unzip -l $1 ;; *.bz2) bzless $1 ;; + *.deb) dpkg-deb --fsys-tarfile $1 | tar -tf - -- ;; *) echo "'$1' Error. Please go away" ;; esac else @@ -619,6 +623,22 @@ readme() { fi } +# function ansi-colors() +#f5# Display ANSI colors +ansi-colors() { + typeset esc="\033[" line1 line2 + echo " _ _ _40 _ _ _41_ _ _ _42 _ _ 43_ _ _ 44_ _ _45 _ _ _ 46_ _ _ 47_ _ _ 49_ _" + for fore in 30 31 32 33 34 35 36 37; do + line1="$fore " + line2=" " + for back in 40 41 42 43 44 45 46 47 49; do + line1="${line1}${esc}${back};${fore}m Normal ${esc}0m" + line2="${line2}${esc}${back};${fore};1m Bold ${esc}0m" + done + echo -e "$line1\n$line2" + done +} + # suidfind() { ls -latg $path | grep '^...s' } #f5# Find all files in \$PATH with setuid bit set suidfind() { ls -latg $path/*(sN) } @@ -874,17 +894,22 @@ git-get-commit() { } #f5# Get specific git diff -git-get-plaindiff() { +git-get-plaindiff () { if [[ -z $GITTREE ]] ; then - GITTREE='linux/kernel/git/torvalds/linux-2.6.git' + GITTREE='linux/kernel/git/torvalds/linux-2.6.git' fi - if ! [[ -z $1 ]] ; then - wget "http://kernel.org/git/?p=$GITTREE;a=commitdiff_plain;h=$1" -O $1.diff + if [[ -z $1 ]] ; then + echo 'Usage: git-get-plaindiff ' else - echo 'Usage: git-get-plaindiff ' + echo -n "Downloading $1.diff ... " + # avoid "generating ..." stuff from kernel.org server: + wget --quiet "http://kernel.org/git/?p=$GITTREE;a=commitdiff_plain;h=$1" -O /dev/null + wget --quiet "http://kernel.org/git/?p=$GITTREE;a=commitdiff_plain;h=$1" -O $1.diff \ + && echo done || echo failed fi } + # http://strcat.de/blog/index.php?/archives/335-Software-sauber-deinstallieren...html #f5# Log 'make install' output mmake() {