From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6347 invoked from network); 26 Aug 1998 17:42:20 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 26 Aug 1998 17:42:20 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id NAA13920; Wed, 26 Aug 1998 13:35:26 -0400 (EDT) Resent-Date: Wed, 26 Aug 1998 13:35:20 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980826103628.ZM21060@candle.brasslantern.com> Date: Wed, 26 Aug 1998 10:36:27 -0700 In-Reply-To: Comments: In reply to Bruce Stephens "Re: Command alias in non-command position" (Aug 26, 5:35pm) References: <000a01bdd108$27f40910$21c9ca95@ao13.mow.sni.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Bruce Stephens , ZSH users mailing list Subject: Re: Command alias in non-command position MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"BT1IH2.0.wO3.OT4vr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1763 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 26, 5:35pm, Bruce Stephens wrote: } Subject: Re: Command alias in non-command position } } > sudo vi ... } > } > The /usr/bin/vi is started instead of elvis. } > } > Is there any easy way to use my lovely aliases in this case? } } Could I define sudo somehow, to say that its first argument ought to } be expanded as if it were in the command position? Yes: alias sudo='sudo ' The trailing space in the sudo alias tells zsh to also apply alias expansion again to the next word that follows it. } I already think I ought to be able to change how spell-correction } works, to say that some words just don't correspond to files (like the } first argument to tar), and possibly to say that some words ought to } correspond to non-existent files. Programmable spelling correction would be the next logical step after programmable completion, I suppose. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com