X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=7194610f32971711b38f999bbf2da95b2193dff8;hb=77228e23895a45001ce1d06e1fd681f14c730175;hp=c1b4955b6b0083f5c20c47754acfbf40ec9d1d06;hpb=cbbf17b3f869d4c25ca45f48ca5ee336687cafd8;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index c1b4955..7194610 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2280,7 +2280,7 @@ if ! check_com asc &>/dev/null ; then fi # get top 10 shell commands: -alias top10='print -l ? ${(o)history%% *} | uniq -c | sort -nr | head -n 10' +alias top10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10' # truecrypt; use e.g. via 'truec /dev/ice /mnt/ice' or 'truec -i' if check_com -c truecrypt ; then @@ -3573,6 +3573,20 @@ purge() { fi } +#f5# show labels and uuids of disk devices +if is439 && [[ -d /dev/disk/by-id/ ]]; then + lsdisk() { + emulate -L zsh + setopt extendedglob + local -a -U disks + disks=( /dev/disk/by-id/*(@:A) ) + for dev in "$disks[@]"; do + print ${fg_bold[red]}${dev}${reset_color} /dev/disk/by-label/*(@e/'[[ ${REPLY:A} == $dev ]] && REPLY=${fg[blue]}LABEL=${REPLY:t}${reset_color}'/N) /dev/disk/by-uuid/*(@e/'[[ ${REPLY:A} == $dev ]] && REPLY=${fg[green]}UUID=${REPLY:t}${reset_color}'/N) + print -f " %s\n" /dev/disk/by-id/*(@e/'[[ ${REPLY:A} == $dev ]]'/N:t) + done + } +fi + # 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