Hi Bruno,
* Bruno Haible wrote on Wed, Sep 14, 2005 at 10:53:53PM CEST:
> Ralf Wildenhues wrote:
> > This patch makes $dry_run obsolete in favor of using $dry only. This
> > way, the repeated and error-prone setting of the latter is eliminated.
>
> Thanks for the patch. I plan to fix this problem, alongside with the
> need for different echo messages in the real case vs. dry-run case
> ("Copying some/file" in the real case vs. "Copy some/file" in the
> dry-run case), by using a variable $dry whose value is either ':' or 'false'.
> So that one case write
> $dry && echo something
> but also
> if $dry; then dosomething; fi
Hmm. This way forces you to write
if $dry; then
echo do something
else
do something
fi
in many current usage cases or use yet another variable again, whereas
with my patch you can just do
$dry do something
but still can do
test -n "$dry" && dosometing_which_is_not_echoed
or even
test "$dry" && ...
and the semantics should still be rather obvious to the reader.
Cheers,
Ralf
_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib