Situs is designed around one interactive workflow:
- Type the command you want to run.
- Press the Situs key binding.
- Pick the directory where that command previously worked.
- Press
Tabto stage it orEnterto run it.
First run:
cd ~/work/app
cargo install --path . --forceLater, from another directory:
cargo install
# press Ctrl-GSitus can show previous commands such as:
cargo install --path . --force .../work/app ok 15m ago
Press:
Tabto cd to~/work/appand leave the command in the shell bufferEnterto cd to~/work/appand run the selected history command
Situs first tries to match the command you typed. If there is no exact match, it broadens matching so partial commands can still find useful history.
For example, searching for:
cargo installcan find:
cargo install --path . --forceOpen the picker directly:
situs choose --command "cargo build"Run from the selected directory:
situs run -- cargo buildPrint only the selected directory:
situs choose --print-dir --command "cargo build"Use a context filter:
situs choose --context workspace --command "cargo test"
situs choose --context directory --command "npm test"Include failed commands:
situs choose --include-failed --command "cargo build"The zsh integration supports two modes:
stay:cdto the selected directory and stay there after the command runs.restore: run from the selected directory, then return to the original directory.
Set restore mode:
export SITUS_MODE=restore
eval "$(situs init zsh)"Direct CLI calls can pass:
situs choose --mode restore --command "cargo build"| Key | Action |
|---|---|
Up / Down |
Select history rows and sync the query with the selected command |
PageUp / PageDown |
Jump through history rows |
Left / Right |
Move the bottom query cursor |
Home / End |
Jump to query start or end |
Ctrl-A / Ctrl-E |
Jump to query start or end |
Tab |
cd to selected directory and keep command in zsh |
Enter |
cd to selected directory and run selected command |
Alt-Enter / Alt-Y |
Paste selected command without cd or run |
Ctrl-F |
Show or hide failed history |
Ctrl-O |
Inspect selected history |
Ctrl-/ or F1 |
Toggle help overlay |
F2 |
Cycle source filter |
F3 |
Cycle context filter |
Ctrl-Y |
Copy selected command |
Ctrl-D |
Delete selected Situs history row |
Ctrl-U |
Clear query |
Esc / Ctrl-C |
Quit |
situs keymap prints the current shortcut summary.