zsh-users
 help / color / mirror / code / Atom feed
From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@sunsite.dk
Subject: Re: suffix alias
Date: Thu, 11 Nov 2004 16:13:00 +0100	[thread overview]
Message-ID: <tps6j3c9v88g$.dlg@thorstenkampe.de> (raw)
In-Reply-To: <10999.1100184634@csr.com>

* Peter Stephenson (2004-11-11 15:50 +0100)
> Thorsten Kampe wrote:
>> I have a suffix alias "alias -s py=python". Now I can execute Python 
>> scripts by name that don't have a "she-bang" and aren't executable. 
>> That's great.
>> 
>> But now I noticed that I cannot execute Python scripts anymore that 
>> are placed in my path (/usr/bin for example) because zsh doesn't 
>> search the path anymore for the suffix alias.
>> 
>> Is there a solution for this problem?
> 
> exec-py () {
>         local -a files
>         files=(${^path}/$1(N))
>         (( ${#files} )) && set -- $files[1] "${(@)argv[2,-1]}"
>         python "$@"
> }
> alias -s py=exec-py

Thanks. So there is no "builtin" solution for this. I thought of
"command rst2html.py" which is a "kind of solution", too.

Could you explain a bit what your wrapping function does?

Thorsten


  reply	other threads:[~2004-11-11 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 14:28 Thorsten Kampe
2004-11-11 14:50 ` Peter Stephenson
2004-11-11 15:13   ` Thorsten Kampe [this message]
2004-11-11 15:31     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='tps6j3c9v88g$.dlg@thorstenkampe.de' \
    --to=thorsten@thorstenkampe.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).