[ale] Zsh++, and global substitutions (Re: [ale] i hate csh)

Fletch fletch at phydeaux.org
Sat Jan 26 12:27:34 EST 2002


>>>>> "hirsch" == hirsch  <hirsch at zapmedia.com> writes:

[...]

    hirsch> Another option might be zsh.  IIRC, it can be made fairly
    hirsch> csh compatible with the I_AM_A_CSH_WEENIE environment
    hirsch> variable.  I kid you not, that is it's name.  :-)

<zsh-evangelism>Zsh rules.</zsh-evangelism>


        The Z shell gives you a korn-y shell with all of the csh
history editing goodness.  And the programmable completion makes it so
that you can get a whole lot of things typed with just a couple of TAB
hits.


        Oh, and someone had mentioned doing a global substitution on a
command line (a la ^a^b, but for all occurances of a).  In zsh and csh
(and I think bash also may allow it) you can use the :gs/// modifier
on a history element (!!, !123, !-4, !?foo).  So


        !!:gs/foo/bar/


        would run the previous command, changing every `foo' to `bar',
while


        !?mv:gs/.mp3/.ogg/


        would run the last command containing mv replacing `.mp3' with
`.ogg'.


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
                      |                                               U

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list