X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=8e88d418ec1b3e9e6b5b9b54f14141181894c51f;hb=2550abc86968ff51ff7931aeebaf2980db428855;hp=e47b10664eb50c0f9186f5654310062217a5c32c;hpb=da48c656abbb58141937936c9e36c10327a868fc;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index e47b106..8e88d41 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -869,9 +869,53 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"." for i in Start Restart Stop Force-Reload Reload ; do eval "$i() { $SUDO /etc/init.d/\$1 ${i:l} \$2 ; }" done -# now the completion for this: + # now the completion for this: compctl -g "$(echo /etc/init.d/*(:t))" Start Restart Stop Force-Reload Reload fi + +# provide useful information on globbing + H-Glob() { + echo -e " + / directories + . plain files + @ symbolic links + = sockets + p named pipes (FIFOs) + * executable plain files (0100) + % device files (character or block special) + %b block special files + %c character special files + r owner-readable files (0400) + w owner-writable files (0200) + x owner-executable files (0100) + A group-readable files (0040) + I group-writable files (0020) + E group-executable files (0010) + R world-readable files (0004) + W world-writable files (0002) + X world-executable files (0001) + s setuid files (04000) + S setgid files (02000) + t files with the sticky bit (01000) + + print *(m-1) # Files modified up to a day ago + print *(a1) # Files accessed a day ago + print *(@) # Just symlinks + print *(Lk+50) # Files bigger than 50 kilobytes + print *(Lk-50) # Files smaller than 50 kilobytes + print **/*.c # All *.c files recursively starting in \$PWD + print **/*.c~file.c # Same as above, but excluding 'file.c' + print (foo|bar).* # Files starting with 'foo' or 'bar' + print *~*.* # All Files that do not contain a dot + chmod 644 *(.^x) # make all plain non-executable files publically readable + print -l *(.c|.h) # Lists *.c and *.h + print **/*(g:users:) # Recursively match all files that are owned by group 'users' + echo /proc/*/cwd(:h:t:s/self//) # Analogous to >ps ax | awk '{print $1}'<" + } + alias help-zshglob=H-Glob + + type -p fma &>/dev/null && alias ?='fma zshall' + # }}} # {{{ make sure our environment is clean regarding colors