From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8688 invoked from network); 11 Nov 2004 15:13:27 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Nov 2004 15:13:27 -0000 Received: (qmail 90807 invoked from network); 11 Nov 2004 15:13:20 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Nov 2004 15:13:20 -0000 Received: (qmail 11717 invoked by alias); 11 Nov 2004 15:13:12 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8199 Received: (qmail 11675 invoked from network); 11 Nov 2004 15:13:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Nov 2004 15:13:10 -0000 Received: (qmail 89745 invoked from network); 11 Nov 2004 15:13:10 -0000 Received: from main.gmane.org (80.91.229.2) by a.mx.sunsite.dk with SMTP; 11 Nov 2004 15:13:08 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CSGdI-0006xf-00 for ; Thu, 11 Nov 2004 16:13:08 +0100 Received: from isi-dial-142-216.isionline-dialin.de ([195.158.142.216]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Nov 2004 16:13:07 +0100 Received: from thorsten by isi-dial-142-216.isionline-dialin.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Nov 2004 16:13:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: Thorsten Kampe Subject: Re: suffix alias Date: Thu, 11 Nov 2004 16:13:00 +0100 Message-ID: References: <1bvxo3gxze39v$.dlg@thorstenkampe.de> <10999.1100184634@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: isi-dial-142-216.isionline-dialin.de User-Agent: 40tude_Dialog/2.0.14.1de Sender: news X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.9 required=6.0 tests=BAYES_10 autolearn=no version=2.63 X-Spam-Hits: -0.9 * 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