Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alias -s doesn't friendly deal with programs having an extension
- X-seq: zsh-workers 23506
- From: Maddi Kopfermann <matthi@xxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: alias -s doesn't friendly deal with programs having an extension
- Date: Fri, 1 Jun 2007 12:50:36 +0200
- Cc: Zsh-Workers <zsh-workers@xxxxxxxxxx>
- In-reply-to: <200706011029.l51ATZbo008613@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20070601095747.GA23444@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <200706011029.l51ATZbo008613@xxxxxxxxxxxxxx>
On Fri, Jun 01, 2007 at 11:29:35AM +0100, Peter Stephenson:
>
> More generally, you could write a shell function to do this.
>
> pathfind() {
> local dir
> for dir in $path; do
> if [[ -f $dir/$2 ]]; then
> $1 $dir/$2 "${(@)argv[3,-1]}"
> return
> fi
> done
> print pathfind: file not found in path: $2
> return 255
> }
> alias -s pl='pathfind perl'
nice idea. could that be something for zsh-mime-setup ?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author