beetlebug▾
/

info procs

Gives the names of the procs of the current namespace.

info procs ?PATTERN?

Description

Gives the name of each command that proc made in the current namespace. A built-in command, such as lsearch, is not a proc. With PATTERN, the list has only the names that match it as a glob pattern.

A PATTERN with ::, such as ::ns::*, lists the procs of that namespace with their full names.

Arguments

ArgumentTypeDefaultDescription
PATTERNglob patternnoneThe names to keep.

Returns

A list of proc names.

Examples

% proc myp {} {}; info procs my*
myp

# A built-in command is not a proc.
% info procs lsearch

% namespace eval ns {proc a {} {}; proc b {} {}}
> lsort [info procs ::ns::*]
::ns::a ::ns::b

% namespace eval ns {proc a {} {}; proc b {} {}}
> namespace eval ns {lsort [info procs]}
a b

Errors

% info procs a b
wrong # args: should be "info procs ?pattern?"
-errorcode TCL WRONGARGS

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also