aboutsummaryrefslogtreecommitdiff
path: root/index.nu
diff options
context:
space:
mode:
authorAutumn <git@autumnfo.rest>2026-05-07 08:06:14 +0100
committerAutumn <git@autumnfo.rest>2026-05-07 08:06:14 +0100
commitddb65a9e6d687eb1af42ad06998d8b5c0746e790 (patch)
treedb6d2beeda75dd47f61b76d880005d064f9ba044 /index.nu
parent130c8d8cff0c74418803b25af83687406db00be9 (diff)
[nunvm/list] added ability to list versionsHEADmain
Diffstat (limited to 'index.nu')
-rw-r--r--index.nu23
1 files changed, 23 insertions, 0 deletions
diff --git a/index.nu b/index.nu
index 5084b78..fb8d6a7 100644
--- a/index.nu
+++ b/index.nu
@@ -3,6 +3,11 @@
#
#
+# ~~~ imports
+use "src/bootstrap.nu" *
+use "src/versions.nu" *
+
+#
# ~~~ main command
# The Node Version Manager
@@ -11,3 +16,21 @@ export def "nunvm" []: nothing -> nothing {
help nunvm
}
+
+#
+# ~~~ list node versions
+
+# List versions of NodeJS
+export def "nunvm list" [
+ --local # List locally-installed versions of NodeJS
+]: nothing -> list<string> {
+
+ bootstrap
+
+ if ($local) {
+ versions list --local | sort -r
+ } else {
+ versions list | sort -r
+ }
+
+}