Kata Shell asks before it throws anything away. Quitting with ⌘Q, choosing Quit Kata Shell from the menu, clicking the window's red button, or logging out of macOS all check first — and all ask the same question.
A copy still running
If a copy or move is still running, quitting asks about that first: Keep Copying, or Stop and Quit. Stopping removes the file that was halfway through; everything already copied stays. Then the questions below follow as usual. Closing the File Operations window asks the same — see Closing the window, or quitting, while it copies, with a picture of both questions.
What counts as work you'd lose
- An editor tab with unsaved changes — the ones showing a "•" in the tab title.
- A terminal tab with a command still running. A terminal sitting at its prompt doesn't count, and neither does one where the command has already finished — so an idle shell never gets in your way.
(A command run by the shell itself, such as a read waiting for input, isn't detected.)
If one tab is at risk
You get its own question, exactly as if you had closed that tab: Save / Don't Save / Cancel for an unsaved file, or Stop / Cancel for a running command.
If several are
You get a summary first — "You have 3 documents with unsaved changes" — and three choices:
| Choice | Does |
|---|---|
| Review Changes… | Goes through them one at a time, switching to each tab first so you can see what you are deciding about. Cancel at any point and the whole quit is called off, with every remaining tab untouched |
| Quit Anyway | Discards everything and quits |
| Cancel | Changes nothing |
Cancel always leaves you exactly where you were — the window stays open and usable, and nothing is saved, closed or stopped.
If a save can't go through
A read-only disk, or a file you don't have permission to change: Kata Shell explains why and offers Save As…, just as it does at any other time (see the editor).
Cancelling that cancels the quit too, so your changes are never dropped on the way out.
One limit worth knowing
This protects you from quitting, not from everything. Force Quit, a crash, or a power cut give no application the chance to ask, so unsaved changes are lost.
Save work you care about.