bug-bash
[Top][All Lists]
Advanced

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

embraced redefinition of aliases and function causes endless recursion


From: Al Elgert
Subject: embraced redefinition of aliases and function causes endless recursion
Date: Mon, 15 Apr 2002 18:13:36 +0200
User-agent: Mutt/1.3.25i

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.7
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' 
-DCONF_OSTYPE='solaris2.7' -DCONF_MACHTYPE='sparc-sun-solaris2.
uname output: SunOS ultra18 5.8 Generic_108528-13 sun4u sparc 
SUNW,Sun-Blade-1000
Machine Type: sparc-sun-solaris2.7

Bash Version: 2.05a
Patch Level: 0
Release Status: release

Description:
        Consider an alias is calling a function and the function
        calls an executable, function or bultin.
        (The alias is used to wrap only the interactive call of the function.)
        Then bash goes into endless recursion, if the alias is declared
        before and after the function OR the function is declared before
        and after the alias.
        A embraced redefinition always happens, if the .bashrc is
        sourced again.

Repeat-By:
        alias cd=cda
        function cda() { cd "$@"; }
        alias cd=cda
        cd /
or:
        function cda() { cd "$@"; }
        alias cd=cda
        function cda() { cd "$@"; }
        cd /
or:
        the function and the alias is normally declared in the .bashrc
        and the .bashrc is sourced again.

-- 
Alexander Elgert
Public Gruppe
RechnerBetriebsGruppe    TU Darmstadt  (FB 20)   Tel:  +49 06151 16-4333
                                                 Raum: S1/13 11a (alt 25/11a)



reply via email to

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