bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: embraced redefinition of aliases and function causes endless recursi


From: Paul Jarc
Subject: Re: embraced redefinition of aliases and function causes endless recursion
Date: Mon, 15 Apr 2002 12:24:52 -0400
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i686-pc-linux-gnu)

Al Elgert <elgert@rbg.informatik.tu-darmstadt.de> wrote:
> Repeat-By:
>         alias cd=cda
>         function cda() { cd "$@"; }
>         alias cd=cda
>         cd /

You're telling bash to perform infinite recursion.  So bash will
dutifully attempt to do that until it crashes.  If you want ot make a
wrapper function around an existing command with the same name, this
is how to do it:
function cd() { command cd "$@"; }
See "help command" for more information.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]