Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-09-10
18:55 • Ticket [1059897fff] info procs & info commands: inconsistent search ... artifact: 6d6cdb0a02 user: dkf
2005-04-29
21:21 • Ticket [1059897fff]: 4 changes artifact: abb0976a41 user: dkf
2004-11-04
22:28 • Ticket [1059897fff]: 4 changes artifact: 431e8bff21 user: dkf
22:23 • Ticket [1059897fff]: 4 changes artifact: bc7d189ed8 user: dkf
00:14 • New ticket [1059897fff]. artifact: 55fe1cfa5e user: dgp

[info procs] & [info commands]: inconsistent search

Open1059897fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 13 years ago
Descriptionplain2004-11-04 00:14:49
test info-15.8 documents the "knownBug"
that [info procs $unqualifedName] searches
only the current namespace, while
[info commands $unqualifiedName] also
finds matches from the global namespace.

Besides being inconsistent, it seems to
be at odds with the documentation as well.
dkfplain2004-11-04 22:23:18
Logged In: YES 
user_id=79902

Documentation says [info commands] is wrong.
dkfplain2004-11-04 22:28:39
Logged In: YES 
user_id=79902

Or rather documentation is deliberate vague round here, with
a side-helping of "probably also wrong".

This would all be easy to fix if I understood what was
actually supposed to happen, for both [info commands] and
[info procs] in these four cases:
  No pattern
  Simple (::-free) pattern
  Pattern with non-leading ::
  Pattern with leading ::
dkfplain2005-04-29 21:21:09
Logged In: YES 
user_id=79902

OK, I now know more about what's going on in this area of
"pattern" matching.

 1) No pattern is always the same as pattern==*
 2) Pattern without namespace results in search of things
visible right now
 3) Pattern with namespace results in search of things
actually in that namespace

info commands is rather like info vars in its behaviour,
except that variables and commands have different general
resolution rules. info procs always works within the context
of the current or named namespace.
dkfhtml2013-09-10 18:55:05

Been this way for ages; fixing cannot be urgent!

Log in (anonymous is fine) to add a comment.