tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

commit b07c8ae67c20858d09d6c3516f2da0cc11b04cec
parent 1af4c42749f10f25d9deb5f7bf6ddbffeabb7799
Author: boyska <piuttosto@logorroici.org>
Date:   Tue, 17 Jan 2012 16:38:47 +0100

FIX --no-color works again (see #78 )

now _msg complies with zsh way of doing colors

Diffstat:
Msrc/tomb | 19+++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/tomb b/src/tomb @@ -51,8 +51,8 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin function _msg() { local command="print -P" - local progname="%{%F{magenta}%}${TOMBEXEC##*/}%{%f%}" - local message="%{%F{normal}%}${2}%{%f%}" + local progname="$fg[magenta]${TOMBEXEC##*/}$fg[reset_color]" + local message="$fg_bold[normal]$fg_no_bold[normal]${2}$fg[reset_color]" local -i returncode case "$1" in @@ -60,19 +60,19 @@ function _msg() { command+=" -n"; pchars=" > "; pcolor="yellow" ;; message) - pchars=" . "; pcolor="green" + pchars=" . "; pcolor="white"; message="$fg_no_bold[$pcolor]${2}$fg[reset_color]" ;; verbose) pchars="[D]"; pcolor="blue" ;; success) - pchars="(*)"; pcolor="green"; message="%{%F{$pcolor}%}${2}%{%f%}" + pchars="(*)"; pcolor="green"; message="$fg_no_bold[$pcolor]${2}$fg[reset_color]" ;; warning) - pchars="[W]"; pcolor="yellow"; message="%{%F{$pcolor}%}${2}%{%f%}" + pchars="[W]"; pcolor="yellow"; message="$fg_no_bold[$pcolor]${2}$fg[reset_color]" ;; failure) - pchars="[E]"; pcolor="red"; message="%{%F{$pcolor}%}${2}%{%f%}" + pchars="[E]"; pcolor="red"; message="$fg_no_bold[$pcolor]${2}$fg[reset_color]" returncode=1 ;; *) @@ -81,7 +81,7 @@ function _msg() { returncode=127 ;; esac - ${=command} "${progname} %{%B%F{$pcolor}%}$pchars%{%f%b%} ${message}" + ${=command} "${progname} $fg_bold[$pcolor]$pchars$fg[reset_color] ${message}$color[reset_color]" return $returncode } function _message say() @@ -1354,11 +1354,6 @@ list_tombs() { print "$fg_bold[white]$tombfs $tombfsopts" print -n "$fg_no_bold[green]$tombname" - print -n "$fg_no_bold[white] cipher ${tombstat}" - print -n "keysize $tombstat[1]" - print "mounted via $tombstat[2]" - - print -n "$fg_no_bold[green]$tombname" print -n "$fg_no_bold[white] open since " print "$fg_bold[white]$tombsince$fg_no_bold[white]"