Package: bash Version: 3.1-4 Severity: normal When in noninteractive mode (say, a script), aliases fail to be executed inside command substitution. For example, take a script test that contains: #!/bin/bash alias foo=echo echo `foo hi` echo $(foo hi)
This happens when you execute it normally: $ ./test ./test: line 3: foo: command not found ./test: line 4: foo: command not found $ bash test test: line 3: foo: command not found test: line 4: foo: command not found $ cat test | bash bash: line 3: foo: command not found bash: line 4: foo: command not found However, it doesnt fail when I execute the lines in my current shell, nor piping them through bash -i (nor dash or zsh, for that matter): $ cat test | bash -i $ $ $ hi $ hi $ exit $ zsh test hi hi $ dash test hi hi $ alias foo=echo $ echo `foo hi` hi $ echo $(foo hi) hi $ -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-1-k7 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages bash depends on: ii base-files 3.1.13 Debian base system miscellaneous f ii debianutils 2.16.1 Miscellaneous utilities specific t ii libc6 2.3.6-9 GNU C Library: Shared libraries ii libncurses5 5.5-2 Shared libraries for terminal hand bash recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]