Windows, macOS and Linux
TRUSS runs on all three. A step’s run is a command for the system’s shell, so a flow written for
one shell may need changes for another.
| Linux | macOS | Windows | |
|---|---|---|---|
| Shell of a step | sh -c |
sh -c |
cmd /C |
A variable in run |
$NAME |
$NAME |
%NAME% |
${NAME} in env and dir |
the same everywhere (TRUSS replaces it) | ||
| Stopping a step | SIGTERM, then SIGKILL after kill_timeout |
the same | ended at once |
| Variable names | case matters | case matters | case does not matter |
| Daemon at login | systemd user unit | launchd agent | Task Scheduler |
| Desktop notifications | notify-send |
Notification Center | toast |
Write a flow that runs everywhere
Section titled “Write a flow that runs everywhere”- Keep commands that differ in a script per system, or call a tool that is the same everywhere
(
go,npm,python,make). - Use
${NAME}inenvanddir: TRUSS replaces it, whatever the shell. - Use
/inon.filepaths on every system. truss initwrites a flow with commands for the system it runs on.
Windows
Section titled “Windows”cmdkeeps a space before&&inechooutput: writeecho %A%&& echo %B%.- A step’s processes end at once when it is stopped;
kill_timeoutdoes not apply. - Desktop notifications need a logged-in user (Windows PowerShell 5.1 shows them).
Every system
Section titled “Every system”- A daemon started at login has a shorter
PATHthan your terminal; see the environment of a login-started daemon.
- Notifications may be held back by Focus or by the notification settings of Script Editor.
- Desktop notifications need
notify-sendand a desktop session. truss daemon installuses a systemd user unit;journalctl --user -u trussshows its output.