Pascal Fleury writes: > Here is a patch that will figure out the version of bash in a less > fork-y way. It keeps the result in a variable after having gotten it > the first time by indeed forking to bash.
I still think this should be a defcustom instead with a setter function that checks for the actual availablity of array variables. The user should have the opportunity to not use arrays at all even when the shell supports it. Using array variable syntax to get the major version number of the installled Bash might not work in those shells that don't have arrays. I can't test an old Bash, but dash doesn't recognize the syntax at all. There should be no fallback to checking just the version of bash since array variables may have been backported or disabled for the actual variant of Bash that is used. Also, the code as presented doesn't deal with the possibility that Tramp might be invoking a different shell on a remote machine, but that is a problem in more areas. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds