瀏覽代碼

Removed `ls` as alias for command `list` in web version for consistency with CLI
Updated web docs

Robert Bennett 1 年之前
父節點
當前提交
8a278bc5fa
共有 3 個文件被更改,包括 9 次插入9 次删除
  1. 1 1
      book/src/cli-usage.md
  2. 3 3
      book/src/web-usage.md
  3. 5 5
      numbat-wasm/www/index.js

+ 1 - 1
book/src/cli-usage.md

@@ -37,7 +37,7 @@ There is a set of special commands that only work in interactive mode:
 |---------|--------|
 | `list` | List all functions, dimensions, variables and units |
 | `list <what>` | Where `<what>` can be `functions`, `dimensions`, `variables`, `units` |
-| `info <identifier>` | Get more information about units, variables and functions |
+| `info <identifier>` | Get more information about units, variables, and functions |
 | `clear` | Clear screen |
 | `help`, `?` | View short help text |
 | `save` | Save the current session history to file `history.nbt` in the current directory |

+ 3 - 3
book/src/web-usage.md

@@ -24,12 +24,12 @@ There is a set of special commands that only work in the web version:
 
 | Command | Action |
 |---------|--------|
-| `list`, `ls` | List all constants, units, and dimensions |
+| `list` | List all functions, dimensions, variables and units |
 | `list <what>` | Where `<what>` can be `functions`, `dimensions`, `variables`, `units` |
-| `info <identifier>` | Get more information about units and variables |
+| `info <identifier>` | Get more information about units, variables, and functions |
+| `clear` | Clear screen |
 | `help`, `?` | View short help text |
 | `reset` | Reset state (clear constants, functions, units, …) |
-| `clear` | Clear screen |
 
 ## Key bindings
 

+ 5 - 5
numbat-wasm/www/index.js

@@ -47,15 +47,15 @@ function interpret(input) {
         combined_input = "";
         updateUrlQuery(null);
         this.clear();
-    } else if (input_trimmed == "list" || input_trimmed == "ls") {
+    } else if (input_trimmed == "list") {
         output = numbat.print_environment();
-    } else if (input_trimmed == "list functions" || input_trimmed == "ls functions") {
+    } else if (input_trimmed == "list functions") {
         output = numbat.print_functions();
-    } else if (input_trimmed == "list dimensions" || input_trimmed == "ls dimensions") {
+    } else if (input_trimmed == "list dimensions") {
         output = numbat.print_dimensions();
-    } else if (input_trimmed == "list variables" || input_trimmed == "ls variables") {
+    } else if (input_trimmed == "list variables") {
         output = numbat.print_variables();
-    } else if (input_trimmed == "list units" || input_trimmed == "ls units") {
+    } else if (input_trimmed == "list units") {
         output = numbat.print_units();
     } else if (input_trimmed == "help" || input_trimmed == "?") {
         output = numbat.help();