# [email protected] / 2014-03-28 13:40:56 +0100: > On Fri, 28 Mar 2014 13:38:17 +0100 > Roman Neuhauser <[email protected]> wrote: > > > # [email protected] / 2014-03-25 11:32:51 +0100: > > > y2m co master ALL > > > y2m up ALL > > > > > > If you want to do it in one step you could create a new y2m command. > > > > > > Or even better (I only had the idea, but it never made it into y2m): > > > Make y2m a wrapper for any command, so something like this could > > > work: > > > > > > y2m ALL "git checkout master && git pull" > > > y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update > > > authors'" > > > > i've been thinking about this, it's not much shorter than a for */ > > loop and needs quoting. :( but yeah, we may end up with such a > > feature. > > > > y2m FAV "echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update > > authors'" > > > > vs. > > > > for d in */; do echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update > > authors'; done > > where is cd $d and cd - ?
oh crap, sorry for the brainfart... with the loop body wrapped in "(cd $d; " and ")" it's 21 characters. for d in */; do (cd $d; echo 'Jon Doe' >> AUTHORS ; git commit -a -m 'update authors'); done -- roman -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
