bug#5926: feature request: mv -p to create missing target dir

2010-04-26 Thread Stefano Lattarini
Just a few obsevations on side issues... Bob Proulx writes: Rodolfo Borges wrote: cat EOF ~/.bashrc function mv() { local target=${!#} local dir if [[ $target =~ '/$' ]]; then dir=$target else dir=$(dirname $target) fi test -d $dir ||

bug#5926: feature request: mv -p to create missing target dir

2010-04-26 Thread Andreas Schwab
Stefano Lattarini stefano.lattar...@gmail.com writes: Just a few obsevations on side issues... Bob Proulx writes: Rodolfo Borges wrote: cat EOF ~/.bashrc function mv() { local target=${!#} local dir if [[ $target =~ '/$' ]]; then dir=$target else

bug#5926: feature request: mv -p to create missing target dir

2010-04-26 Thread Jim Meyering
Stefano Lattarini wrote: Just a few obsevations on side issues... Bob Proulx writes: Rodolfo Borges wrote: cat EOF ~/.bashrc function mv() { local target=${!#} local dir if [[ $target =~ '/$' ]]; then dir=$target else dir=$(dirname $target)

bug#5970: regex won't do lazy matching

2010-04-26 Thread Jim Meyering
a g wrote: thanks for everyone's help. I agree this can be closed, but not for the reasons mentioned (though I appreciate them and they gave me the info I needed to find the answer: osdir.com/ml/lib.gnulib.bugs/2005-04/msg00027.html). Off to try emacs' regex.c instead. It would be nice if

bug#5970: regex won't do lazy matching

2010-04-26 Thread Andreas Schwab
Jim Meyering j...@meyering.net writes: Because of expr? Its use of regexp is tightly specified by POSIX, so we cannot change it without a very good reason. In the OP's use of regexp POSIX defines nothing. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7

bug#5926: feature request: mv -p to create missing target dir

2010-04-26 Thread Andreas Schwab
Jim Meyering j...@meyering.net writes: Using env is the most portable, at the expense of a fork (compared to bash's command): Note that command is also part of the POSIX shell. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B

bug#5926: feature request: mv -p to create missing target dir

2010-04-26 Thread Stefano Lattarini
At Monday 26 April 2010, Jim Meyering j...@meyering.net wrote: Using env is the most portable, at the expense of a fork (compared to bash's command): env mv $@ Generally, this is true. But Rodolfo was assuming bash as his shell anyway, and in this case the use of well-estabilished bash

bug#5926: feature request: mv -p to create missing target dir

2010-04-26 Thread Stefano Lattarini
At Monday 26 April 2010, Andreas Schwab sch...@linux-m68k.org wrote: I think that's needed because otherwise the shell function would end up calling itself recursively, since it's named `mv' too. You use command mv for that. Good point, I forgot about that. And it works for shell