Skip to content

Commit

Permalink
Removed ls as alias for command list in web version for consisten…
Browse files Browse the repository at this point in the history
…cy with CLI

Updated web docs
  • Loading branch information
rben01 committed Sep 22, 2024
1 parent b0361a9 commit 8a278bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion book/src/cli-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 3 additions & 3 deletions book/src/web-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions numbat-wasm/www/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8a278bc

Please sign in to comment.