Add reference docs

This commit is contained in:
Tracy Miranda
2023-11-03 10:17:10 -04:00
parent 90261fef70
commit 358b2ded47
2 changed files with 441 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
---
title: Keyboard Shortcuts
---
**Global Keys**
* **Cmd-I** - focus the command-input
* **Cmd-L** - focus the selected line
* **Cmd-T** - open new tab
* **Cmd-H** - open command history view
* **Cmd-B** - open bookmarks
* **Cmd-[** - move one tab left
* **Cmd-]** - move one tab right
* **Cmd-UpArrow** or **Cmd-PageUp** - move selected command up
* **Cmd-DownArrow** or **Cmd-PageDown** - move selected command down
* **Cmd-[digit]** - select nth tab
* **Cmd-Control-[digit]** - select nth session
* **Esc** - close/toggle extra info panel
**When Command Input is Focused**
* **Enter** - runs the current command, or if input is empty will scroll screen to last command
* **Shift-Enter** - add a newline to the current command (newlines do not require escapes)
* **Tab** - runs command completion, press again to get a list of suggestions
* **Ctrl-R** - open command history view
* **Ctrl-C** - clear command input
* **Esc** - close/toggle extra info panel
* **Ctrl-W** - cuts word to left of cursor (from readline)
* **Ctrl-U** - cuts entire line to left of cursor (from readline)
* **Ctrl-Y** - paste (from readline)
* **Ctrl-P** - previous history item
* **Ctrl-N** - next history item
* **Cmd-E** - toggle the input box size between 1 and 5 lines
* **UpArrow** - last command in history
* **DownArrow** - next command in history
* **Shift-UpArrow** - move cursor up in input box (also extends selection)
* **Shift-DownArrow** - move cursor down in input box (also extends selection)
**When Command History is Focused**
* **Esc** or **Cmd-G** - close command history
* **UpArrow** - last command in history
* **DownArrow** - next command in history
* **Cmd-S** - change scope of history (window, session, global)
* **Cmd-R** - toggle between only this connection or any connection
* normal characters - text search
+395
View File
@@ -0,0 +1,395 @@
---
title: MetaCommand Reference
---
{{<toc>}}
## /comment
Add a text comment into the current window.
`Usage: /comment [text]`
The text after `/comment` is not processed and will be posted as-is.
## /connect
Change remote for current window.
```
Usage:
connect [remote]
/connect [remote]
```
## /cr
Change remote for current window (alias for /connect).
## /clear
Clear all commands from the current window.
```
Usage:
clear
/clear
```
Both with and without the slash are allowed. Clear takes no arguments.
## /codeview
View a text file inline using rich native UI. Includes syntax highlighting and code folding.
```
Usage:
/codeview [filename]
codeview [filename]
[lang=javascript] codeview [filename]
[lang=json] codeview hello.json
```
Both with and without the slash are allowed. Filename resolves against the current remote and current working directory.
## /codeedit
View and edit a text file inline using rich native UI. Includes syntax highlighting, code folding, and completion.
```
Usage:
/codeedit [filename]
codeedit [filename]
[lang=javascript] codeedit [filename]
[lang=json] codeedit hello.json
```
Both with and without the slash are allowed. Filename resolves against the current remote and current working directory. Once you are editing, you can save the file using Cmd-S. Closing the editor (using Cmd-D) will prevent future saves (and shrink the editor to fit the current size of the content).
## /signal
Send a signal to a running command.
```
Usage: /signal [line-arg] [signame]
```
[line-arg] can be a line number or line id.
[signame] is the name of a signal. e.g. KILL, INT, HUP, TERM, etc. Can also prefix with SIG (e.g. SIGKILL).
You can also specify a signal by number (e.g. ```/signal [line-arg] 9```).
## /session
Commands that change or modify the Prompt session. The bare command will switch the session.
```
Usage: /session [session-arg]
```
[session-arg] can be a session number, name, id, or relative number.
### /session:open
Creates a new session.
```
Usage: /session:open [name=name]
```
A name can be passed to set the session's name.
### /session:purge
Deletes a session. This will call purge on all of the screens (tabs) within the session. All command history and output will be completely deleted.
This will also stop web-sharing of all the session's screens.
```
Usage: /session:purge [sessionid]
```
If sessionid is not specified will purge the *current* session.
### /session:archive
Archives a session.
```
Usage: /session:archive [sessionid] [0|1]
```
With no arguments will archive the current session. Otherwise a session id can be specified to archive. The second argument, if "0" means the session should be unarchived.
### /session:showall
Show all sessions (including archived ones).
### /session:show
Show metadata about current session.
### /session:set
```
Usage: /session:set [name=name]
```
One option is supported: name. It sets the name of the session.
## /screen
Commands that change or modify the Prompt screen (tab). The bare command will switch the screen (tab).
```
Usage: /screen [screen-arg]
```
[screen-arg] can be a screen number, name, id, or relative number.
### /screen:open
Creates a new screen
`Usage: /screen:open`
### /screen:archive
Hides a screen (tab). Retains output and history.
```
Usage: /screen:archive [screenid] [0|1]
```
With no arguments will archive the *current* screen (tab). Otherwise a screen id can be specified to archive. The second argument, if "0" means the screen should be unarchived.
### /screen:purge
Deletes the current screen (tab). Purges all output and history. Will also stop web-sharing.
To purge a non-active screen, pass the screen-id as the first argument.
### /screen:webshare
```
Usage:
/screen:webshare
/screen:webshare 0
```
Starts/stops screen web sharing. The first argument can be "1" to start or "0" to stop (defaults to "1").
### /screen:set
Updates screen parameters
```
Usage:
/screen:set [name=name] [tabcolor=color]
/screen:set [anchor=anchor] [focus=focus] [line=line]
```
Options:
* name - set the name of the screen in the tab bar
* tabcolor - set the color of the tab
* anchor - sets the current scroll anchor position (used by client)
* focus - sets the focus type for the screen (used by client) ("input" or "cmd")
* line - sets the currently selected line
* sharename - sets the sharename for web sharing
### /screen:showall
Show all screens in the current session (including archived screens).
### /screen:reset
Resets the screen by re-initializing all remotes.
### /screen:resize
Tells the backend the new size of the screen. This size is used to change the terminal size for running commands (SIGWINCH).
## /remote
Commands that create, manage, or update remotes (connections). Note that all /remote commands can also be accessed using /connection.
### /remote:show
Will open the remote info window for the current remote
`Usage: /remote:show`
### /remote:showall
Will open an info window showing information about all of the registered remotes
`Usage: /remote:showall`
### /remote:new
Will create a new remote. Arguments can be passed to create the remote completely from the command-line, or if visual=1 is passed it will
open the create remote info window.
`Usage: /remote:new [user@host] [visual=1] [sudo=1] [port=portnum] [alias=alias] [connectmode=connectmode] [autoinstall=1] [key=ssh-key-file] [password=ssh-password]`
### /remote:archive
Archives the current remote
`Usage: /remote:archive`
### /remote:set
Updates remote parameters
### /remote:disconnect
Disconnects the current remote.
`Usage: /remote:disconnect [force=1]`
If force=1 is passed it will force the remote to be disconnected even if there are running commnads. The commands will be passed SIGHUP.
### /remote:connect
Connects the current remote
### /remote:install
Installs the latest version of mshell to the remote.
### /remote:installcancel
Cancels an install if it is hanging
## /reset
Resets the current remote state back to defaults.
```
Usage:
reset
/reset
```
The remote will re-run a login (e.g. .bashrc or .bash_profile) and reset the remote state (cwd, environment, functions, etc.) to match the initial login state. This can be useful to run if you make changes to your bash initialization files and want those changes to be picked up.
## /line
Updates lines in the current window.
### /line:show
Shows metadata for the given line.
`Usage: /line:show [line-arg]`
[line-arg] can be a line number or line id.
### /line:star
Stars the given line
`Usage: /line:star [line-arg] [star-val]`
[line-arg] can be a line number or line id. [star-val] defaults to 1, but can be set to 0-5.
### /line:set
Updates line settings
`Usage: /line:set [line-arg] [renderer=renderer]`
[line-arg] can be a line number or line id. One argument, sets the renderer for the given line. Empty renderer will default to "terminal".
### /line:purge
Deletes the line from the screen and from history (including output).
`Usage: /line:purge [line-arg]`
### /line:archive
Archives (hides) the line. Remains in history (can be unarchived by passing "0" as the 2nd argument).
```
Usage:
/line:archive [line-arg]
/line:archive [line-arg] [1|0]
```
### /line:view
Switches to the given session, screen, and line. Scrolls UI to the given line.
`Usage: /line:view [session] [screen] [line]`
### /line:setheight
Stores the height of the line. For terminals this is the number of "rows". For renderers it is the pixel height.
`Usage: /line:setheight [line-arg] [height]`
## /client
### /client:show
Shows client version information and settings
### /client:set
Update client settings, currently only supports termfont size. This will update the font size used in the terminal, can be set from 8-15 (px).
`Usage: /client:set termfontsize=10`
## /telemetry
Commands that deal with client telemetry.
### /telemetry:on
Turn telemetry on
### /telemetry:off
Turn telemetry off
### /telemetry:send
Force a send of current telemetry to server
### /telemetry:show
Show current telemetry (on/off) setting.
## /bookmarks
Commands that effect bookmarks
### /bookmarks:set
Add a bookmark.
### /bookmarks:delete
Remove a bookmark.
## Other Internal Commands
### /_killserver
Kills the local prompt server (and restarts it). Used for debugging.
### /_compgen
Handles command completion.
### /_history
Handles history window.
### /run
Runs a command