Terminal
Quarry has a terminal panel under the editor, so you see your code and your shell together. It runs PowerShell, Command Prompt, Git Bash, or any shell you name, in the folder you are working in. Each terminal is a real Windows console (ConPTY), so full-screen programs, colours and prompts work as in Windows Terminal.
- Opening the terminal
- The list of terminals
- The toolbar
- Split
- Run text and files
- Find
- Keys
- Choosing the shell
- When a shell ends
- A terminal as an editor tab
Opening the terminal
| From | How |
|---|---|
| Anywhere | Ctrl+` shows the terminal and gives it the keyboard. The first time, it starts one. |
| The rail on the left | The Terminal icon, under Macros: click to show the terminal, click again to hide the panel |
| Another terminal | Ctrl+Shift+`, New in the panel's toolbar, or Tools › New Terminal |
| Explorer | Right-click a folder, or blank space for the open folder, and choose Open in Terminal |
| Another shell, once | The menu beside New, or Tools › New Terminal With |
Ctrl+` goes back and forth: with the keyboard in the terminal it hides the panel and returns to the editor; pressed again it brings the panel back as you left it. Hiding the panel, or switching it to Console or Problems, never stops a shell.
A new terminal starts in the open folder, else in the folder of the file in front, else in your home folder. With several folders open, the menu beside New has an entry for each.
The list of terminals
The terminals are listed on the left of the panel, each with its shell's name and the folder it was started in. Click one to show it; the panel's Terminal tab shows how many there are.
| To | Do |
|---|---|
| Switch | Click it, or Ctrl+PageDown / Ctrl+PageUp in a terminal |
| Rename | Double-click it, or Rename (the pencil) in the toolbar; Enter keeps the name, Escape drops it |
| Split or kill one | The two buttons that appear on its row |
| More | Right-click it: Rename, Split, Clear, Kill, Kill All Terminals |
With the keyboard in the list, Up and Down move, Enter goes into the terminal, F2 renames and Delete kills.
The toolbar
| Button | What it does |
|---|---|
| New | A terminal with the shell set in Settings. The arrow beside it: another shell, another open folder, a terminal as an editor tab, Terminal Settings. |
| Split | Another terminal beside this one, with the same shell in the same folder |
| Run | Run Selected Text, Run Active File, Go to Folder of Active File, Paste Path of Active File |
| Go to File's Folder | Changes the terminal's folder to that of the file in front |
| Find (magnifier) | Search what the terminal printed |
| Clear (eraser) | Empties the screen and the scrollback; the program keeps running |
| Rename (pencil) | Names the terminal in the list |
| Kill (bin) | Ends the shell and everything it started, without asking |
| Pin (right) | Keeps the terminal panel: it opens with a new terminal when Quarry starts, and stays open when its last terminal ends |
| Maximize (right) | Gives the panel all the height the window allows; again puts it back |
In a narrow window the toolbar wraps onto a second row; no button is hidden.
Split
Split (or Ctrl+Shift+5 in a terminal) puts a second terminal beside the active one. They stay side by side as a group, joined by a line in the list. Click a terminal of another group to show that group instead; the first keeps running.
Drag the line between two terminals to give one more room; double-click it for equal widths. With the keyboard on the line, Left and Right move it.
Run text and files
These type into the active terminal for you, and start a terminal first when there is none.
Run Selected Text in Terminal runs what you selected, line by line. With nothing selected it runs the line the cursor is on.
Run Active File in Terminal runs the file in front with the program for its kind:
File Runs with .pypython.js,.mjs,.cjsnode.rb,.php,.pl,.luaruby,php,perl,lua.gogo run.ps1PowerShell .bat,.cmd,.exeitself .shbash, in Git Bash or another POSIX shellFor any other kind Quarry types nothing and says so. The saved file is what runs: save first if it has changes.
Go to Folder of Active File changes the terminal's folder, in the way its shell needs (
Set-Locationin PowerShell,cd /din Command Prompt so another drive works,cdin Git Bash).Paste Path of Active File puts the file's path on the command line, quoted for the shell, without pressing Enter.
All four are also under Tools and in the command palette.
Find
Find in the toolbar, or Ctrl+F in a terminal, opens a find box at the top right. It searches as you type, starting from the newest output. Enter goes to the match before, Shift+Enter to the one after, and Escape closes the box. "Not found" means the terminal never printed that text (or it has scrolled out of the 10,000 lines that are kept).
Keys
Every key goes to the shell, so Ctrl+R, Ctrl+L, Ctrl+W, Esc and the rest behave as in a terminal. Quarry keeps only:
- Ctrl+`: hide the panel (or the keys you gave Toggle Terminal)
- Ctrl+Shift+`: another terminal
- Ctrl+Tab / Ctrl+Shift+Tab: switch editor tabs
- Ctrl+Shift+P: command palette
- Ctrl+F4: close the editor tab
- In the panel: Ctrl+F find, Ctrl+PageDown / Ctrl+PageUp next / previous terminal, Ctrl+Shift+5 split
Copy and paste work as in Windows Terminal: Ctrl+C copies when text is selected and otherwise interrupts the program, Ctrl+Shift+C copies, and Ctrl+V / Ctrl+Shift+V paste.
The terminal follows Quarry's theme and the editor font and size, so Ctrl + mouse wheel over a terminal zooms it with the editor.
Choosing the shell
Settings › Terminal › Shell lists the shells Quarry found:
| Shell | Found when |
|---|---|
| PowerShell 7 | pwsh.exe is on your PATH or in Program Files\PowerShell\7 |
| Windows PowerShell | Always (part of Windows) |
| Command Prompt | Always |
| Git Bash | Git for Windows is installed |
Automatic (the default) uses the first of these that is installed. Custom… runs a command line you type, such as "C:\msys64\usr\bin\bash.exe" --login -i or wsl.exe; put a path with spaces in quotes. A change applies to the next terminal you open; open terminals keep their shell.
When a shell ends
- Typing
exittakes the terminal off the list. When the last one goes, the panel closes, unless it is pinned. - If the shell ends with an error code, the terminal stays so you can read what happened, and the list shows the code beside it; press Enter in it to start the shell again.
- Quitting Quarry ends every shell. Terminals are not reopened when Quarry restarts; a pinned panel opens with one fresh terminal instead. Hiding a pinned panel (Ctrl+`, the rail's Terminal icon) is for now only: it is back at the next start.
A terminal as an editor tab
Tools › New Terminal Tab (also in the menu beside New) opens a shell as a tab in the editor area instead, named after the shell and the folder ("PowerShell 7 · proj"). It takes the full editor height and can sit in a split editor pane. Such a tab counts towards the tab limit, closes when you type exit, and asks before closing while its shell is running. The panel's list, toolbar and find box are for the panel's terminals only.