[pass] Pass on Maemo

Matthieu Weber mweber at free.fr
Sun Apr 20 19:54:56 CEST 2014


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 - mweber at free.fr              (~._.~)
  ( ? )                http://weber.fi.eu.org/                    ( ? ) 
 ()- -()          public key id : 0x85CB340EFCD5E0B3             ()- -()
 (_)-(_) "Humor ist, wenn man trotzdem lacht (Otto J. Bierbaum)" (_)-(_)


More information about the Password-Store mailing list