On Sat 19.04.2014 at 11:56:14PM +0200, Jason A. Donenfeld wrote: > I'm not going make mkdir into a $MKDIR, most likely, but I would consider a > platform file with something like this in it: > > mkdir() { local args=( ); for i in "$@"; do [[ $i != "-v" && $i != > "--verbose" ]] && args+=( "$i" ); done; "$(which mkdir)" "$args"; return > $?; }
Except that wouldn't work on busybox, since the "args=( )" syntax is not supported. But instead of shadowing an external command with a shell function (I thought of it too, but it is definitely dirty), why not define a "verbose_mkdir()" function (or a "create_directories()" if you prefer) that does exactly what its name says, and that can in turn be implemented in two different ways depending on the shell? Matthieu -- (~._.~) Matthieu Weber - mwe...@free.fr (~._.~) ( ? ) http://weber.fi.eu.org/ ( ? ) ()- -() public key id : 0x85CB340EFCD5E0B3 ()- -() (_)-(_) "Humor ist, wenn man trotzdem lacht (Otto J. Bierbaum)" (_)-(_) _______________________________________________ Password-Store mailing list Password-Store@lists.zx2c4.com http://lists.zx2c4.com/mailman/listinfo/password-store