Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 1999 09:13:45 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        Bill Fumerola <billf@jade.chc-chimes.com>
Cc:        "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>, Michael Haro <mharo@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/bin/mkdir mkdir.1 mkdir.c
Message-ID:  <19990830091345.B90785@cons.org>
In-Reply-To: <Pine.BSF.4.10.9908281611370.32074-100000@jade.chc-chimes.com>; from Bill Fumerola on Sat, Aug 28, 1999 at 04:15:22PM -0400
References:  <199908282102.OAA60244@gndrsh.dnsmgr.net> <Pine.BSF.4.10.9908281611370.32074-100000@jade.chc-chimes.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In <Pine.BSF.4.10.9908281611370.32074-100000@jade.chc-chimes.com>, Bill Fumerola wrote: 
> On Sat, 28 Aug 1999, Rodney W. Grimes wrote:
> 
> > >   Log:
> > >   add verbose flag
> > 
> > Why????   Are you planning to add this to every command.  What purpose
> > does this serve, or what problem does it work around?
> 
> Do all commits have to work around problems? Are we so stuck in our ways
> that we can't just add functionality?
> 
> Though traditionalists and anti-bloat people will have difficulty
> swallowing these commits, it does help debugging and it does help in
> scripting. There have been a number of PRs requesting this functionality. 

It doesn't. `sh -x` is a far better way to do what people are trying
to do here. How will a portable script using the -v flag look like?
`sh -x` is just what you need here.

This is a typical addition requested by people who didn't learn shell
programming. And in addition don't realize that just echoing the
argument without printing the command will make nothing than a mess
for a whole script's run. Escpecially if you keep in mind that you
need some whay to tell output from verbose commands from explicit
pirntings in the script. This is just what `sh -x` does.

The vflag should be local to main() and explicitly initialized to zero
to be consistent with the initialization of omode and pflag. Why
doesn't the `v` work together with the `m` flag? Is it useful just to
print the directory name in that case. Shouldn't the mode be echoed as
well? Isn't `sh -x` just what you need here?

What we are doing here is more than bloating our toolchain. We
obfuscate the need for proper shell programming even more, until we
need to replace every shell option and buildtin with a standalone
tool, each with an option for every shell option.

Other changes in that line should not be committed until the
discussion about the first is resolved.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer/
BSD User Group Hamburg, Germany     http://www.bsdhh.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990830091345.B90785>