dict ports suggestion

Dominic Mitchell dom at happygiraffe.net
Sat Jul 16 15:56:22 GMT 2005


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


More information about the freebsd-ports mailing list