[nylug-talk] hey bash! stop smushing my commands

Paul Robbins robbins.paul at gmail.com
Thu Apr 5 12:01:09 EDT 2007


If you hit UP (to bring back the last command typed) then hit ESCAPE and
then ;v (semicolon v) it will take you into a vi editor for the last
command.  May not be the prettiest solution, but at least makes it easier to
type a for loop again if you realized you forgot a variable, etc

On 4/5/07, Chandhee Thala <cthala at gmail.com> wrote:
>
> Question for you bash gurus,
>
> In Z Shell, I can do multi-line, command line editing, i.e. the following
> command:
>
> for i in `find /usr -type d  -maxdepth 2 -mmin -60`
> do
>     for k in `find $i -maxdepth 2 -type f -mtime -10`
>     do
>         echo $k
>     done
> done
>
> (that was a totally random example pulled out of my ass) and if i run that
> command and later pull it up from history, it looks exactly the way I type
> it.
>
> In bash however, that same command ends up looking smushed, i.e.:
>
> for i in `find /usr -type d  -maxdepth 2 -mmin -60`; do for k in `find $i
> -maxdepth 2 -type f -mtime -10`;  do echo $k;     done; done
>
> How can I get bash to preserve the indentation?
>
> C
>
> _____________________________________________________________________________
> Hire expert Linux talent by posting jobs here :: http://jobs.nylug.org
> The nylug-talk mailing list is at nylug-talk at nylug.org
> The list archive is at http://nylug.org/pipermail/nylug-talk
> To subscribe or unsubscribe: http://nylug.org/mailman/listinfo/nylug-talk
>


More information about the nylug-talk mailing list