aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jim-package.c15
-rw-r--r--jim_tcl.txt4
2 files changed, 16 insertions, 3 deletions
diff --git a/jim-package.c b/jim-package.c
index 8b37c0a..1d42197 100644
--- a/jim-package.c
+++ b/jim-package.c
@@ -190,7 +190,7 @@ static int package_cmd_require(Jim_Interp *interp, int argc, Jim_Obj *const *arg
/*
*----------------------------------------------------------------------
*
- * package list
+ * package list|names
*
* Returns a list of known packages
*
@@ -199,7 +199,7 @@ static int package_cmd_require(Jim_Interp *interp, int argc, Jim_Obj *const *arg
*
*----------------------------------------------------------------------
*/
-static int package_cmd_list(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
+static int package_cmd_names(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
Jim_HashTableIterator *htiter;
Jim_HashEntry *he;
@@ -236,7 +236,16 @@ static const jim_subcmd_type package_command_table[] = {
{
"list",
NULL,
- package_cmd_list,
+ package_cmd_names,
+ 0,
+ 0,
+ JIM_MODFLAG_HIDDEN
+ /* Description: Deprecated - Lists all known packages */
+ },
+ {
+ "names",
+ NULL,
+ package_cmd_names,
0,
0,
/* Description: Lists all known packages */
diff --git a/jim_tcl.txt b/jim_tcl.txt
index c4d8996..159dea9 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -3455,6 +3455,10 @@ otherwise if '$name.tcl' exists it is loaded with the `source` command.
If `load` or `source` fails, `package require` will fail immediately.
No further attempt will be made to locate the file.
++*package names*+
+
+Returns a list of all known/loaded packages, including internal packages.
+
pid
~~~
+*pid*+