Re: Aliasing zsh builtins w/o infinite regress?

From: Bill Marcum (bmarcum_at_iglou.com.urgent)
Date: 12/17/04


Date: Fri, 17 Dec 2004 11:53:09 -0500

On Fri, 17 Dec 2004 16:02:49 +0000 (UTC), bill
  <please_post@nomail.edu> wrote:
>
>
> Suppose foo is a zsh built-in, and that I always call foo with the
> -bar switches/flags; I'd like to alias foo to "foo -bar". Defining
>
> function foo {
> foo -bar "$@"
> }
>
> leads to an infinite regress. Is there any way refer to the foo
> built-in within the definition of the foo function so as to avoid
> the infinite regress?
>
builtin foo -bar "$@"

-- 
"Cow fault??? Have you progressed from BSD to BSE?"
cowsay -b "Prepare to be assimoolated! "


Relevant Pages

  • Re: Will "renames" increase program size?
    ... I fail to see how finalization could have nothing to do with the contents. ... X: T renames Foo; ... function Foo return T is -- This copies ... parameter passing does in fact do a copy, then there is a semantic effect ...
    (comp.lang.ada)
  • Re: Dynamic "PARAMETER" statement
    ... real function Foo() ... real function Bar() ... end module DynParams ...
    (comp.lang.fortran)
  • Re: Python from Wise Guys Viewpoint
    ... Yes, the overhead is more than in, ... As John Thingstad wrote in his reply, there is a dictionary lookup ... Define function bar, that calls function foo. ...
    (comp.lang.python)
  • Re: Python from Wise Guys Viewpoint
    ... Yes, the overhead is more than in, ... As John Thingstad wrote in his reply, there is a dictionary lookup ... Define function bar, that calls function foo. ...
    (comp.lang.lisp)
  • Re: flet vars
    ... ??>> evaluate, say, 'foo you create symbol: ... In theory you could write a compiler which would recognize as a variable access, but then it would be incompatible with CL. ... It would also recognize (function foo) as a form that must return function object. ... let's say you've got a textual description of what you need to draw "draw a blue bird" and then you draw a blue bird. ...
    (comp.lang.lisp)