Path: utzoo!attcan!uunet!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.unix.shell Subject: Re: Multiline aliases in csh ? Message-ID: <10084@jpl-devvax.JPL.NASA.GOV> Date: 23 Oct 90 18:58:27 GMT References: Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 26 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. No, but you can often get the same effect using a program that forces multiple commands back into your input: alias patchit forceme "'"'foreach file (*.pat)'"'"\; \ forceme "'"'patch <$file'"'"\; \ forceme 'end' Won't work in a script, of course, but if you're just interested in being a lazy typist... : PS. Right answer is not "use scripts". Why not? Assuming a reasonable script language, of course... :-) : PPS. Would be nice to have functions in csh. Some would call this "throwing good money after bad". Larry Wall lwall@jpl-devvax.jpl.nasa.gov