Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Command alias in non-command position
- X-seq: zsh-users 1763
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Bruce Stephens <b.stephens@xxxxxxxxx>, ZSH users mailing list <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: Command alias in non-command position
- Date: Wed, 26 Aug 1998 10:36:27 -0700
- In-reply-to: <vbk93v8zwm.fsf@xxxxxxxxxxxxxxx>
- References: <000a01bdd108$27f40910$21c9ca95@xxxxxxxxxxxxxxx> <vbk93v8zwm.fsf@xxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author