Command cards
Type the name of a command Opsty knows and a card opens under the line: what the command does, which part you are filling in and, in plain words, what Enter will do.
Which commands
Twenty-six: cd, pushd, popd, export, source, alias, unset, ls, mkdir, cp, mv, rm, cat, open, chmod, git, npm, npx, node, python3, pip, brew, ssh, scp, rsync and curl. The first seven are the shell’s own commands, so their cards cite zsh’s manual, zshbuiltins(1), rather than a program on disk.
Parts, lists and Enter
- The top row is the command’s parts as tabs:
options
first and then, forrsync,source
anddestination
, each showing what is on your line for it. The part your cursor is in is lit; click another to work on it. - Below is one list for that part: the options, each explained, as switches, with the common ones first and a destructive one marked
Careful —
; or the folders here; or, for a part that can be on a server, your servers from~/.ssh/configbehindThis Mac
andServer
. Typing narrows the list. - Browsing folders types nothing.
Choose this folder
types the path once, quoted if it needs to be, and moves on to the next part. - The last line, after a ⏎, says in plain words what pressing Enter will do. For
rsyncandcpit also offers the choice that trips everyone up, the trailing slash:Folder
orContents only
. A destructive option, such asrm -rorrsync --delete, turns the line amber or red.
Where its words come from
Each card names where its words came from and which manual on your Mac its options were checked against, because /usr/bin/rsync and Homebrew’s rsync are different programs. An option that manual does not mention is marked not in its manual
.
Press ↓ to move into the card, and close it with its ×; it comes back when the line is cleared. esc at the prompt stays your shell’s. Everything a card does, it does by typing into your shell, the same keys you would have pressed. It never runs anything: you press Enter, or you don’t. Settings
▸ Helpers
▸ Command cards
turns the cards off.
Tab and ghost text
Two smaller helps work the same way. Tab shows the candidates zsh’s own completion produces in this shell, with zsh’s descriptions, and a row you choose goes back to zsh as keys, so zsh quotes it and inserts it itself.
Ghost text continues the line in dim text from your earlier commands. ⇥, → or End puts it on the line, ⌥→ takes one word of it, and the faint ⇥ tab keycap after it does the same when clicked. Nothing runs: you still press ⏎. ⇥ again, straight after, goes back to what you typed and completes that word, and a third ⇥ is zsh’s own list. While the Tab popup is open the grey text steps aside, so ⇥ stays zsh’s. The keycap turns amber when the line it would make is one Opsty warns about, and its tooltip says why.
Your shell finds the grey text and your shell puts it on the line; Opsty only draws it and tells the shell which key you pressed. It works in zsh’s vi mode too, and with zsh-autosuggestions loaded Opsty suggests nothing, so → stays the plugin’s. While ghost text is showing, a card’s Enter line also says what taking it would do. Each has its own switch in Settings
▸ Helpers
: Tab popup
and Ghost text
. Turned off, the grey text goes at once, in tabs already open too.
What is this?
Select a word you don’t know, in a command’s output or on your line, such as EACCES in an error or -avn in an rsync, and a small card says what it means in one line, with its source: the system’s own error table (intro(2), from Apple’s developer tools when they are installed) or the manual of the program that actually runs. When there is no source, there is no card.
Touch ID for sudo
The first time sudo asks for your password, Opsty asks once: Touch ID instead of your password?
macOS can use Touch ID for sudo, but Apple ships that setting switched off, in /etc/pam.d/sudo_local.template. Put it on the line when this ends
places Apple’s one-line setup on your line once the current command finishes, with a read-back of what it does; it asks for your password once more, and Opsty never edits the file itself. Don’t ask again
turns the offer off for good, as does Settings
▸ Helpers
▸ Offer Touch ID for sudo
.