From 87a8f704a720037d0011e42d9608796b19adee74 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 30 Jul 2011 02:42:56 +0200 Subject: [PATCH] zsh: lsdisk mount and blocksize info --- etc/zsh/zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 21ece37..0e5d924 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2977,10 +2977,16 @@ if is439 && [[ -d /dev/disk/by-id/ ]]; then emulate -L zsh setopt extendedglob local -a -U disks + local -A mountinfo disks=( /dev/disk/by-id/*(@:A) ) + [[ -r /proc/mounts ]] && for cline ( "${(f)$(}/${dev:t}/size(N) ) \ + print -f " Size: %.3f GiB (%d Byte)\n" $(($(<$sysdevsize)/(2.0*1024.0*1024.0))) $(($(<$sysdevsize)*512)) + + print -f " Id: %s\n" /dev/disk/by-id/*(@e/'[[ ${REPLY:A} == $dev ]]'/N:t) done } fi -- 2.1.4