Re: zsh: alias oder function mit Parameter?

From: Manfred Lotz <manfred.lotz(at)web.de>
Date: Wed, 18 Jun 2003 06:15:21 +0200

On Tuesday 17 June 2003 23:12, Oliver Fromme wrote:
> Manfred Lotz <manfred.lotz(at)web.de> wrote:
> > On Tuesday 17 June 2003 21:21, Oliver Fromme wrote:
> > > $ lsd_func() { ls -ld ${~@}(/); }
> > > $ alias lsd="noglob lsd_func"
> > > $ lsd t* b*
> > > drwxr-xr-x 2 olli olli 2560 Apr 28 01:47 bin
> > > drwxr-xr-x 3 olli olli 512 Mar 25 2002 tex
> > > drwxr-xr-x 5 olli olli 512 May 29 00:40 tmp
> > > drwxr-xr-x 6 olli olli 512 May 30 21:21 txt
> > > $
> >
> > [...]
> > Eine kleine Unschärfe habe ich aber gerade noch entdeckt. Gibt es in
> > deinem Beispiel auch eine Datei bimbo, so wird bei lsd b* t* diese auch
> > angezeigt; bei lsd t* b* funktioniert es. (/) müsste irgendwie jedem
> > Parameter verabreicht werden.
>
> Ahja. Ich vergaß eine Kleinigkeit.
>
> Es hat bei mir durchaus funktioniert, und ich hatte in dem
> Testverzeichnis mehrere Plain-files herumliegen, die mit b
> und t anfangen. Allerdings habe ich in meiner ~/.zshenv
>
> setopt rc_expand_param
>
> drinstehen (neben diversen anderen setopts). Gib einfach
> mal obigen setopt manuell ein, und teste dann das »lsd«
> nochmal.

Ja, das war's. Jetzt geht's.

Ich bin bisher ein zsh newbie. Vielen Dank für deine Lecture in zsh. Ich werde
das mal alles studieren.

Manfred

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Wed 18 Jun 2003 - 06:15:37 CEST

search this site