From owner-cvs-all Mon Aug 30 0:15:14 1999 Delivered-To: cvs-all@freebsd.org Received: from grisu.bik-gmbh.de (grisu.bik-gmbh.de [194.233.237.82]) by hub.freebsd.org (Postfix) with ESMTP id 98A4414EA4; Mon, 30 Aug 1999 00:14:54 -0700 (PDT) (envelope-from cracauer@gilgamesch.bik-gmbh.de) Received: from gilgamesch.bik-gmbh.de (gilgamesch.bik-gmbh.de [194.233.237.194]) by grisu.bik-gmbh.de (8.8.8/8.6.9) with ESMTP id JAA00817; Mon, 30 Aug 1999 09:13:44 +0200 (MEST) Received: (from cracauer@localhost) by gilgamesch.bik-gmbh.de (8.9.3/8.7.3) id JAA91673; Mon, 30 Aug 1999 09:13:45 +0200 (MET DST) Date: Mon, 30 Aug 1999 09:13:45 +0200 From: Martin Cracauer To: Bill Fumerola Cc: "Rodney W. Grimes" , Michael Haro , 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> References: <199908282102.OAA60244@gndrsh.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Bill Fumerola on Sat, Aug 28, 1999 at 04:15:22PM -0400 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In , 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 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