aboutsummaryrefslogtreecommitdiff
path: root/index.nu
diff options
context:
space:
mode:
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
+ }
+
+}