[Bug 1729] New: Bash environmental associative arrays not getting set
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Tue Mar 2 07:57:59 EST 2010
https://bugzilla.mindrot.org/show_bug.cgi?id=1729
Summary: Bash environmental associative arrays not getting set
Product: Portable OpenSSH
Version: 5.2p1
Platform: Other
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: ssh
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: woodsdog at gmail.com
In Bash 4.0 associative arrays were introduced. There are some
environmental variables that are associative arrays. One of these
variables is the BASH_ALIASES associative array. Documentation can be
found here:
http://www.gnu.org/software/bash/manual/bashref.html#Bash-Variables
In short, it's an active array of the system aliases, with both the
alias and the corresponding command kept track of.
For example, to set:
$ BASH_ALIASES[cdt]="cd /tmp"
would be the equivalent of:
$ alias cdt="cd /tmp"
Setting this variable, the alias is instantly available in that bash
environment.
Now, when passing these variables with SSH, ssh doesn't interpret these
variables as special. I've tested this on two different distros,
Fedora 12 (OpenSSH_5.2p1) and Ubuntu 9.10 (OpenSSH_5.1p1). Both give
different the same bad result.
My environment file:
$ cat environment
BASH_ALIASES[cdt]="cd /tmp"
TESTME="This is a test"
On F12 & Ub 9.10:
-after an ssh to Ub 9.10 box, the $TESTME variable is set and can be
seen when the 'set' or 'env' command is run. The $BASH_ALIASES variable
appears in the list as a regular environment variable, ignoring the
associative There is no "cdt" alias either. It didn't add this to the
associative array.
$ env | grep BASH
BASH_ALIASES[cdt]="cd /tmp"
$
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list