Multiline aliases in csh ?
Jonathan I. Kamens
jik at athena.mit.edu
Tue Oct 23 15:03:32 AEST 1990
In article <APS.90Oct23053623 at kaarne.tut.fi>, aps at tut.fi (Suntioinen Ari) writes:
|> Is there any way to define multi line alias in csh ?
|> What I mean is (for example) if-else or foreach loop
|> as a part of alias. I tried it some time and just
|> couldn't make it work.
In a word, no.
There are ways to get around it for if-else, for example checking the
condition for every statement in the if. If you have this in a shell script:
if (foo) then
bar
baz
else
frelt
endif
Then you can have an alias that does this:
if (foo) bar; if (foo) baz; if (! foo) frelt
I don't think there's any way to get around it for foreach.
--
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8085 Home: 617-782-0710
More information about the Comp.unix.shell
mailing list