Output, errors and confirmation
What happens while an action runs, where its output goes, and how failures are reported.
Output modes
output decides how a command runs and what you see afterwards.
| Value | What happens |
|---|---|
"refresh" | The default. Runs in the background, then reloads the open folder so new and changed files show up. |
"show" | Runs in the background, then opens a window with everything the command printed. |
"terminal" | Opens your terminal and runs the command there. The App Store version copies the command for you to paste. |
"none" | Runs in the background and leaves the folder as it is. |
Background runs
With "refresh", "show" and "none", you can keep working while the command runs. When it finishes, a short message in the bottom right corner of the window says so. "show" opens a window instead, with everything the command wrote to standard output and standard error, or "(no output)".
Use "none" for commands that don't change the folder, like copying something to the clipboard.
In the terminal
"terminal" is for commands you want to watch or talk to: a dev server, an interactive prompt, a command that asks for a password. MacScout opens the terminal from the apps.terminal setting, or the one it found on your Mac, changes to the command's working directory, and runs the command in your login shell.
MacScout doesn't wait for a terminal command and doesn't report whether it worked. Whether the window stays open afterwards depends on your terminal's settings.
If the command runs once per item, MacScout joins the runs with && into one command line, so a failure stops the rest.
"terminal" works only with command, not with executable. The MACSCOUT_ variables aren't set in the terminal.
In the App Store version, MacScout isn't allowed to run the command in another app. It opens the terminal in the working directory and copies the command line to the clipboard. Paste it with ⌘V and press Return.
Errors
A command fails when it exits with a status other than 0. MacScout then shows what it printed:
- A short, single-line message appears in the corner of the window: Convert to WebP failed: followed by the message.
- Anything longer than 160 characters, or longer than one line, opens in a window titled after the action.
- If the command printed nothing, the message is "Exited with status" and the number.
When a command runs once per item, the first failure stops it, and the items after it are skipped.
Your own scripts can use this to explain what went wrong. Print a message and exit with a status other than 0:
if [ -z "$MACSCOUT_OTHER_PANE" ]; then
echo "Open a folder in the other pane first." >&2
exit 1
fiAsking first
For actions that delete, overwrite or upload something, add confirm. MacScout asks before running and only continues if you click Run:
{
"title": "Empty Folder",
"command": "find {file} -mindepth 1 -delete",
"files": false,
"folders": true,
"maxSelection": 1,
"confirm": "Everything inside the folder will be deleted right away, without using the Trash."
}The dialog shows the action's title with your text below it. Return runs the action, Esc cancels. MacScout asks once per run, however many items are selected.