Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.shell Subject: Re: Multiline aliases in csh ? Message-ID: <1990Oct23.050332.770@athena.mit.edu> Date: 23 Oct 90 05:03:32 GMT References: Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: comp Organization: Massachusetts Institute of Technology Lines: 29 In article , aps@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710