--- keychain 2002-12-01 09:50:17.000000000 -0800 +++ keychain.lholden 2002-12-23 16:03:09.000000000 -0800 @@ -2,11 +2,11 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # Author: Daniel Robbins <drobbins@gentoo.org> # $Header: /home/cvsroot/gentoo-src/keychain/keychain,v 1.25 2002/08/26 20:25:24 drobbins Exp $ -version=2.0.1 +version=2.0.2 PATH="/sbin:/usr/sbin:${PATH}:/usr/ucb"; export PATH; myaction="" myactionarg="" @@ -57,10 +57,24 @@ mykeys="${mykeys} $1" ;; esac shift done + +#auto-detect whether echo -e works. +unset E +if [ -z "`echo -e`" ] +then + E="-e" +fi + +BLUE="\033[34;01m" +GREEN="\033[32;01m" +OFF="\033[0m" +CYAN="\033[36;01m" + + #first, handle help. if [ "$myaction" = "help" ] then echo $E Usage: ${CYAN}${0}${OFF} [ ${GREEN}options${OFF} ] ${CYAN}sshkey${OFF} ... cat <<EOHELP @@ -216,23 +230,14 @@ echo "$0: Couldn't get lock" >&2 exit 1 fi fi -#auto-detect whether echo -e works. -unset BLUE GREEN OFF CYAN E -if [ -z "`echo -e`" ] -then - E="-e" # color variables won't be defined if --nocolor is present -fi -if [ -z "$nocolopt" ] +if [ "$nocolopt" = "yes" ] then - BLUE="\033[34;01m" - GREEN="\033[32;01m" - OFF="\033[0m" - CYAN="\033[36;01m" + unset BLUE GREEN OFF CYAN fi if [ -z "$quietopt" ] then echo
Created attachment 6711 [details, diff] Patch to fix some issues with keychains use of colors
this is fixed in our cvs, when i release a new version your fix will be included (though i modified it some)