Date: Sat, 16 Jul 2005 16:56:19 +0100 From: dom@happygiraffe.net (Dominic Mitchell) To: h <h@erathia.be> Cc: ports@freebsd.org, Dima Dorfman <dd@freebsd.org> Subject: Re: dict ports suggestion Message-ID: <20050716155619.GA26563@ppe.happygiraffe.net> In-Reply-To: <200507161559.07864.h@erathia.be> References: <200507152118.29557.h@erathia.be> <200507161124.25731.h@erathia.be> <20050716093052.GA20040@trit.org> <200507161559.07864.h@erathia.be>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 16, 2005 at 03:59:06PM +0200, h wrote: > On Saturday 16 July 2005 11:30, Dima Dorfman wrote: > > In csh, you can do this: > > > > ? alias dict '\dict \!* | more' > > i was told to try > > dict() { dict "$@" | less; } > > but when trying it it acted like a fork bomb. you can't stuff @'s in bash > aliases, so i wonder how to translate that command line alias You need to arrange for the dict inside the function to not refer to itself. There are two ways to do this: dict() { /usr/local/bin/dict "$@" | less; } or dict() { command dict "$@" | less; } The "command" command is a bash builtin that suppresses function lookup. -Dom
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050716155619.GA26563>