Noted on the chat:
% set a [array startsearch env]
% array anymore env $a
couldn't find search "s-1-env"
Logged In: YES
Same result on 8.34, 8.4.14, 8.5a6 (pre varReform), HEAD.
The problem is with the way EnvTraceProc works: for array traces it calls TclSetupEnv, which in turns first deletes the env variable and then recreates it. The deletion cancels all searches.
What this means is that the env array cannot be searched at all. This should be either fixed or documented.
Wary to muck with this stuff, especially since:
(a) the bug is prehistoric, raised few complaints, no tests available
(b) the bug combines two touchy issues (array searches and env), a fix may introduce subtle new bugs
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.