On 1/31/23 2:33 PM, Dale R. Worley wrote:
So it does seem that a function named "a[0]" is valid in default mode.
Of course it is.
unset [-fv] [-n] [name ...] ... If no options are supplied, each name refers to a variable; if there is no vari‐ able by that name, a function with that name, if any, is unset. So taking that text strictly, "unset a[0]" should attempt to remove the variable a[0], and if it does not exist, attempt to remove the function a[0] that name.
As long as there isn't an existing array variable a. In this theoretical exercise, trying to remove an unset subscript and actually removing a shell function would be worse. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/