From: Junio C Hamano Date: Mon, 09 May 2005 02:38:11 GMT Subject: Re: [PATCH] Add cg-printenv command. Message-ID: <7vpsw115v0.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <1115601540.8949.104.camel@pegasus> MH> Hi Steven, >> The cg-printenv command will print exported git environment variables. SC> +echo "AUTHOR_NAME="$AUTHOR_NAME SC> +echo "AUTHOR_EMAIL="$AUTHOR_EMAIL SC> +echo "AUTHOR_DATE="$AUTHOR_DATE SC> +echo "COMMIT_AUTHOR_NAME="$COMMIT_AUTHOR_NAME SC> +echo "COMMIT_AUTHOR_EMAIL="$COMMIT_AUTHOR_EMAIL MH> I like that idea. It is much more handy then using env and grep for the MH> variable names. I wonder what this command is used for? In a script to be "eval"ed? Or just interactively by the end-user? Even if it is just for human consumption, I think the echo commands I quoted above have double quotes backwards. Wouldn't it make more sense to quote the variables so shell expansion would not lose whitespaces inside of variable values, like this? echo AUTHOR_NAME="$AUTHOR_NAME" echo AUTHOR_EMAIL="$AUTHOR_EMAIL" echo AUTHOR_DATE="$AUTHOR_DATE" echo COMMIT_AUTHOR_NAME="$COMMIT_AUTHOR_NAME" echo COMMIT_AUTHOR_EMAIL="$COMMIT_AUTHOR_EMAIL" If it is for eval consumption of course they have to be much more careful.