# Decisions What was decided about cash, why, and what was turned down, by topic, so nothing is decided twice. The numbered decisions keep the numbers they had in spec.md, where code and documents cite them ("D7"); numbers missing here were dropped as done or superseded. Each topic then lists the decisions made in working sessions, most of them the user's answers, with their dates. A new decision goes here, under its topic. | D | Decision | Topic | | --- | --- | --- | | D1 | Build on brush's code; the interface is Bash 5.3.15 | Scope and foundation | | D2 | Unmodified POSIX-shaped `.sh` scripts run as they are | Scope and foundation | | D3 | Windows paths first-class, Unix spellings accepted | Paths, files and text | | D4 | Arguments are never rewritten | Paths, files and text | | D5 | `PATH` is the one variable translated, at the process boundary | Running programs and the environment | | D6 | Every job in a job object, nested in the session's | Processes, jobs and signals | | D7 | No modes: compatibility behaviours are always on | Scope and foundation | | D8 | Command resolution is cash's own | Running programs and the environment | | D9 | brush is absorbed, not vendored | Scope and foundation | | D10 | The shell's directory is the shell's; paths render at two chokepoints | Paths, files and text | | D11 | cash owns job control | Processes, jobs and signals | | D13 | Ctrl-C is graceful first; the job object is the backstop | Processes, jobs and signals | | D14 | `trap EXIT` runs to completion; a second Ctrl-C forces teardown | Processes, jobs and signals | | D15 | Exit codes truncate; crashes map to Bash's 128+n | Processes, jobs and signals | | D16 | Globbing is case-insensitive; `nocaseglob` is honoured | Paths, files and text | | D17 | Process substitution streams through pipes | Processes, jobs and signals | | D19 | Suspend by enumerating threads, documented APIs only | Processes, jobs and signals | | D20 | `\r\n` ends a line wherever cash decides where lines end | Paths, files and text | | D21 | `kill -TERM` escalates in the background; `kill -9` is immediate | Processes, jobs and signals | | D22 | Job specs kill trees; bare pids kill one process | Processes, jobs and signals | | D23 | `test -x` needs an execute ACL and a discriminator | Paths, files and text | | D24 | `~/.bashrc` is read, then `~/.cashrc` | Startup files, help and messages | | D25 | Scoop shims are run, not resolved through | Running programs and the environment | | D26 | Descriptors above 2 work where cash holds both ends | Processes, jobs and signals | | D27 | `ln -s`: a symlink, a junction for directories, a copy for files | Paths, files and text | | D28 | Reserved names stay devices | Paths, files and text | | D29 | Paths of any length | Paths, files and text | | D31 | Variable names are case-insensitive; POSIX names upper-cased | Running programs and the environment | | D32 | `.bat` and `.cmd` arguments are escaped for cmd | Running programs and the environment | | D33 | Files are opened fully shared, deleted with POSIX semantics | Paths, files and text | | D34 | `chmod -x` warns and returns 0 | Paths, files and text | | D35 | No userland required; `cash doctor` names the fix | Running programs and the environment | | D36 | Prompt commands get a job each, like every command | The prompt, editing and completion | | D37 | Starship works, and a test says so | The prompt, editing and completion | | D38 | Shipped through Scoop, an installer, winget and a zip, with a Terminal profile | Packaging, installing and updating | | D39 | Terminal shell integration is on by default | The prompt, editing and completion | | D40 | Completion ignores case and quotes as it goes | The prompt, editing and completion | | D41 | The BOM is stripped; the console is UTF-8 | Paths, files and text | | D42 | Elevated programs are outside D6 | sudo and elevation | | D43 | Conformance rests on cash's own cases | Scope and foundation | | D44 | History is appended at once, safely across tabs | The prompt, editing and completion | | D45 | cash's own builtins only where a decision or a Windows gap asks | Builtins and bundled tools | | D46 | App Execution Aliases run as any `.exe` | Running programs and the environment | | D47 | Windows 10 1809 is the floor; Windows 11 the target | Scope and foundation | | D48 | coreutils are bundled as builtins | Builtins and bundled tools | | D49 | Bundled `sed` and `awk` keep CRLF files CRLF; `CASH_EOL=lf` is Linux | Builtins and bundled tools | | D50 | `fuser` and `lsof` from documented sources, plus the handle walk | Builtins and bundled tools | | D51 | `ss` is iproute2's over the Windows socket tables | Builtins and bundled tools | | D52 | MSYS2 and Cygwin programs get Cygwin's argument encoding | Running programs and the environment | | D53 | `winpaths`: an unquoted `C:\…` typed at the prompt means the path | Paths, files and text | | D54 | `pkill`, `pidof`, `killall`: one set of name rules, `kill`'s signals | Builtins and bundled tools | | D55 | `getopt`, `rev`, `clear` and `reset` are util-linux's and ncurses' | Builtins and bundled tools | | D56 | `bc` is POSIX bc and names GNU's extensions | Builtins and bundled tools | | D57 | `ping` takes Linux's flags and shadows `ping.exe` | Builtins and bundled tools | | D58 | `which` prints a path that runs, for the commands cash carries | Builtins and bundled tools | | D59 | Syntax highlighting is on, and never waits on the disk | The prompt, editing and completion | | D60 | `abbr`: fish's abbreviations | The prompt, editing and completion | | D61 | `CASH_TRANSIENT_PS1` collapses the prompt after Enter | The prompt, editing and completion | | D62 | Directory history: `prevd`, `nextd`, `cdh`, Alt-← and Alt-→ | The prompt, editing and completion | | D63 | Completions from carapace, when it is installed | The prompt, editing and completion | | D64 | `CHLD` is cash's own event | Processes, jobs and signals | | D65 | `cash --link-tools`: hard links programs outside cash can run | Packaging, installing and updating | | D66 | `where` is `where.exe` with dashes and cash's paths | Builtins and bundled tools | | D67 | `ls` icons only with a Nerd Font | Builtins and bundled tools | | D68 | The console is put back before each prompt | The prompt, editing and completion | | D69 | `cash --init-rc` writes a starter `~/.bashrc`, once | Startup files, help and messages | | D70 | Background jobs and subshells run inside the shell, on threads | Processes, jobs and signals | | D71 | A writer whose reader went away ends as SIGPIPE ends it, if it is cash's | Processes, jobs and signals | | D72 | `help` from one catalogue | Startup files, help and messages | | D73 | `croot`: a file and directory picker on Alt-E | The prompt, editing and completion | | D74 | Small tools: only what nothing else answers | Builtins and bundled tools | | D75 | A per-user installer, `cash --update`, and winget | Packaging, installing and updating | | D76 | `grep`, `diff` and `cmp` are carried after all | Builtins and bundled tools | | D77 | The compatibility corners follow Bash and fish | Archives and compression | | D78 | Archive and compression tools, on shared parts | Archives and compression | | D79 | Ctrl-R: a history picker | The prompt, editing and completion | | D80 | `z`: the directory jump | The prompt, editing and completion | | D81 | `winglob`: at the prompt, a Windows program globs for itself | Paths, files and text | | D82 | An opt-in `/c/` mode: Git Bash's spelling, with arguments for Windows programs | Paths, files and text | | D83 | Under `unixpaths`, a climb past a drive's top spells `$PWD` `/` | Paths, files and text | | D84 | `figlet`: one builtin doing figlet's and toilet's work, and more | Paths, files and text | | D85 | A Start-menu entry and "Open cash here" in Explorer | Packaging, installing and updating | | D86 | The interpreter boxes a future per nesting level, not per command | Scope and foundation | ## 1. Scope and foundation ### D1 — Build on brush's code; the interface is Bash 5.3.15 cash's Win32 layer sits on brush's language layer instead of a rewrite: at M0 every failure lay in the Win32 layer, and the language passed its 2,631 differential tests. `$BASH_VERSION` is `5.3.15(1)-release`; Git Bash 5.3.15 is the reference every probe is checked against. Turned down: a rewrite from scratch; a Windows shell with its own syntax, which drops D2. ### D2 — Unmodified POSIX-shaped `.sh` scripts run as they are Windows is the substrate, not the surface syntax. The deliberate exceptions are spec §4's list, kept short. ### D7 — No modes: compatibility behaviours are always on Each compatibility behaviour is a superset no Windows script can trip on, so all are on: `/dev` names, CRLF script source, the BOM stripped (D41), `/usr/bin/env` and the other `/bin` and `/usr/bin` paths of the commands cash carries, Unix path spellings. `sh`, `bash` and `cash` are cash, ahead of `PATH`; started as `sh` it runs in POSIX mode with nothing switched off. `/dev/stdin`, `/dev/stdout`, `/dev/stderr` and `/dev/fd/N` share the shell's descriptor, never reopen a file. Turned down: a `--posix` flag, shebang sniffing or a `set -o` switch; running the `bash` on `PATH` (often WSL's launcher); reopening as Git Bash does, which lets `> /dev/stderr` empty a log. ### D9 — brush is absorbed, not vendored brush's crates are cash's own (`cash-*`), edited directly, nothing upstreamed; `NOTICE` keeps brush's copyright and the absorbed commit. An upstream fix is a manual port. Turned down: a library dependency (spec §6 found no clean seam); a soft fork that upstreams; a hard fork in `vendor/`. ### D43 — Conformance rests on cash's own cases cash is Windows-only. Conformance rests on the inline-expectation cases, the Windows corpus of real scripts and recorded Bash 5.2/5.3 probes. Turned down: Git Bash or WSL as a wholesale reference, where every spec §4 divergence shows as a failure; a Linux build. ### D47 — Windows 10 1809 is the floor; Windows 11 the target ConPTY sets the floor, which also brings nested job objects, unprivileged symlinks and POSIX deletes. Windows 10 left support in October 2025; no fallback for older systems is written. ### Decided in working sessions - **cash is Windows-only** (the user, 2026-09-28): the Unix code and the Linux CI went; the platform's scope stays the user's call. - **Nothing is invented, nothing ignored**: where Windows lacks the data, cash shows none (`ss`'s queues, `top`'s swap, `lsof`'s `-`), and an option it cannot honour is refused by name, never accepted and ignored. - **A Windows tool is shadowed only where it is not what a Bash script means by the name** (2026-09-25): `ping`, `reset`, `where` and `tar` are shadowed; `netstat` and `strings` are not. - **A crate cash must change becomes cash's own code**, its licence kept (brush, D9; sevenz-rust2, 2026-10-07; the patched uutils tools, reedline and crossterm, 2026-10-10). Turned down: patched copies in `vendor/`, which is gone. ### D86 — The interpreter boxes a future per nesting level, not per command The user's pick, 2026-10-23, after a profile of the slowdown since 1.39 (research/interpreter-dispatch.md): every command went through five `#[async_trait]` methods, each boxing and copying its future, 19% of a loop's time in `memcpy` and 14% in allocation. The execution traits return `impl Future + Send`, so the levels nest in place, with a box only where the syntax tree recurses (a compound command's body, a function's); a one-command pipeline has a path of its own. Behaviour does not change, and each step is checked by the whole suite and timed. Turned down: shrinking the futures one slow path at a time (cheaper, offered); a second, synchronous interpreter for commands that never wait. ## 2. Paths, files and text - **Scripts are read a command at a time, as Bash reads them** (the user, 2026-10-18, after 1.26.0): a script parsed whole runs one command at a time, and the rest is parsed again when a command changes how text parses (an alias added, extglob turned); aliases are expanded on the tokens, before parsing, so an alias's `&&` and `;` are operators; extglob starts off. Turned down: fixing both at run time, where `gs | less` pipes both commands of an alias and Bash only the last. ### D3 — Windows paths first-class, Unix spellings accepted cash prints `C:/test/dir` (drive, forward slashes, never a backslash) for `pwd`, `$PWD`, globs and every path it builds, because a printed path usually becomes an argument to a native program, where `/c/src` is fatal. `C:/`, `/c/`, `/tmp` and `/dev` names work wherever cash opens a path itself; anywhere else an argument goes as written (D4). A backslash follows Bash's quoting (D53 covers the prompt). Turned down: printing `/c/...`; tracking how a path was typed; bending Bash's quoting so unquoted backslash paths work. ### D82 — An opt-in `/c/` mode: Git Bash's spelling, with arguments for Windows programs The user's picks, 2026-10-20 (research/unix-paths-mode-design.md). With a shell option on, cash spells paths as Git Bash does, `/c/...`, for `pwd`, `$PWD`, `HOME`, `BASH_SOURCE`, `which` and `type -P`, through the one function that renders a path; and for a Windows program that is not an MSYS one, a whole-word `/c/...` argument, or the value after `=` of `--opt=/c/...`, becomes `C:/...`, as do `HOME`, `PWD` and `OLDPWD` in its environment. The option is inherited by a child cash through a variable. It is off by default, so D3 stays, and D4 gives way only for those rules with it on. Why: rbenv, pyenv, nvm and asdf climb from `$PWD` until it is empty or `/`, which `C:/...` never reaches, and bats' `load` wants a path that starts with `/`. Turned down: spelling alone, which hands Windows programs `/c/` paths; MSYS's full conversion of variables and lists, with its misfires; an environment variable alone, which a script cannot set for itself; `/c/` as the default. Built in the phase after 1.38.0 as `shopt -s unixpaths`, passed on as `CASH_UNIXPATHS=1`. The user's pick then, 2026-10-20: cash's bundled tools read `/c/...` in either mode, as an MSYS tool does, which the design took them to do already: `sed`, `awk`, `diff` and `cmp` where they open a file, their scripts and patterns untouched; the other tools that take files by their operands, turned into `C:/...` as they start; a tool that only handles text (`echo`, `expr`, `basename`, `dirname`) keeps its words. Turned down there: the rule for Windows programs on every bundled tool, which rewrites `sed '/c/d'`; the operands only under the mode, which leaves `cat /c/x` failing without it. ### D83 — Under `unixpaths`, a climb past a drive's top spells `$PWD` `/` The user's pick, 2026-10-20 (research/root-directory-design.md). Under `unixpaths`, `cd /` and a `cd ..` past a drive's top go to the root of the shell's drive, as they always did, and `$PWD` spells it `/`, so a loop climbing with `cd ..` until `$PWD` is `/` ends, as in Git Bash (direnv's `find_up`); `cd ..` at `/` stays. Only the spelling: the directory on disk is that root, a name at `/` is read there, `pwd -W` names it, and a program started there runs in it and gets it as `PWD`, but a cash, which keeps `/`. What is kept to go back to, `$OLDPWD`, `pushd`'s stack and the directory history, is the root itself, as `/` is the root of whichever drive the shell is on. The default mode is unchanged: `C:/..` is `C:/`. Turned down: directories that exist only in cash, `/` above the drives with a listable `/usr/bin` and `/dev`, built and reverted unreleased, as they needed an answer for every operation and every kind of program, left `/usr/bin/NAME` listed but unreadable, and made a one-letter name at `/` a whole drive (`rm -rf c`), for a gain this spelling gives; the same in the default mode; Git's install directory as `/`; `cd ..` failing at a drive's top, which a loop that does not check goes round. ### D84 — `figlet`: one builtin doing figlet's and toilet's work, and more The user's picks, 2026-10-23 (research/figlet-design.md). One command, `figlet`, written in-house in Rust, reads FIGfont 2.0 in all its flavours (`.flf`, toilet's UTF-8 `.tlf` with colour glyphs, `.flc` control files, each possibly zipped) and does what figlet 2.2.5 and toilet 0.3 do, with loose compatibility; toilet's options are added to it and `-E` is toilet's export. rs-figlet's parser and smusher (Apache-2.0) are taken in as cash's own code. 23 fonts are built into cash.exe (figlet's 17 without `mnemonic`, toilet's `mono12`, `mono9`, `future`, `smbraille`, `pagga`, `smblock`; 443 KB), chosen from a sample of GitHub scripts; the rest load from a font directory. Exports: `utf8`, `ansi` (CP437) and `text`. Extras: true-colour gradients and palettes, a font picker, pixel fonts and installed Windows fonts drawn with sub-cell blocks, double-size lines, TheDraw fonts. The sixel image mode chosen at first was dropped the same day (the user: too big, and nobody would use it). The release that finishes it is 2.0.0, a milestone, not a breaking change. Turned down: `figlet` and `toilet` as two commands, a new name with aliases; all 75 font files built in, rs-figlet's nine, figlet's only; HTML, SVG, IRC and libcaca's other exports; a 1.x version. ### D4 — Arguments are never rewritten A child gets exactly the string a variable holds; cash never guesses which arguments are paths. `winpath` converts on request; quoting for `cmd.exe` (D32) is escaping, not rewriting. Turned down: MSYS2's argument conversion and its `MSYS2_ARG_CONV_EXCL`. D82 makes two exceptions: a Windows program's `/c/` arguments under `unixpaths`, and a bundled tool's `/c/` file operands, which it reads as an MSYS tool reads them. ### D10 — The shell's directory is the shell's; paths render at two chokepoints cash's `cd` stores the canonical `C:/` form in the shell's own state, without moving the process's directory, so `$PWD` follows and every path cash resolves is against the shell's directory; the file-open boundary takes the Unix spellings and converts them (D29). A path the core computes itself (a glob, a tilde) is fixed where it arises. Turned down: rewriting the core's path handling. ### D16 — Globbing is case-insensitive; `nocaseglob` is honoured `nocaseglob` is on by default and `find -name` matches the same way: on a case-insensitive volume this only removes false negatives. `shopt -u nocaseglob` gives Bash's matching. Turned down: Bash's case-sensitive default. ### D20 — `\r\n` ends a line wherever cash decides where lines end Command substitution, `read`, `mapfile`, here-documents and here-strings treat `\r\n` as `\n`, since Python, .NET and `cmd` emit CRLF and cannot be fixed at the source. Bytes between external programs are never touched, and builtins write LF. Turned down: stripping `\r` from data in general. ### D23 — `test -x` needs an execute ACL and a discriminator True when the ACL grants `FILE_EXECUTE` and the extension is in `PATHEXT` or the file starts with `#!`. `chmod +x` changes nothing and returns 0, so `chmod +x x.sh && ./x.sh` works. Turned down: ACLs alone, which call every profile file executable; the extension alone, which invents a permission model. ### D27 — `ln -s`: a symlink, a junction for directories, a copy for files With privilege (admin or Developer Mode) a real symlink; without, a junction for a directory and for a file a copy with a warning naming Developer Mode, as Git Bash's `ln` copies (the user, 2026-10-19: bats links each test file); a link to nothing is the error. Turned down: hard links for files, which are not symlinks and give scripts wrong answers; a silent copy. ### D28 — Reserved names stay devices `nul`, `con`, `com1` and the rest are devices, as every Windows program sees them; `/dev/null` discards output. Turned down, after it was built: ordinary files through `\\?\`, which the bundled tools could neither read nor delete, and translating their arguments is what D4 forbids. ### D29 — Paths of any length File operations take paths of any length, whatever the long-path registry setting. Windows starts no program in a directory over 258 characters, so one is started in the directory's 8.3 short name, and fails saying why when none fits. Turned down: a clear error alone, as Git Bash gives. ### D33 — Files are opened fully shared, deleted with POSIX semantics cash opens files with read, write and delete sharing, and deletes with `FILE_DISPOSITION_FLAG_POSIX_SEMANTICS`, so `tool > log & rm log` works as on Linux instead of failing with a sharing violation. ### D34 — `chmod -x` warns and returns 0 Revoking execute means breaking ACL inheritance or a Deny ACE that can lock the owner out, so `chmod -x` warns and returns 0, as do `-r`, setuid, setgid and sticky. Group and other bits, which Windows does not have per file, change nothing and say nothing. Turned down: Deny ACEs; succeeding silently on `-x`; warning about group and other bits. ### D41 — The BOM is stripped; the console is UTF-8 A UTF-8 BOM at the start of a script is stripped, as Windows editors write it; the console code page is 65001. Pipes between programs keep their runtimes' code pages. Turned down: injecting `PYTHONUTF8`, `JAVA_TOOL_OPTIONS` and the like into children, against D5. ### D53 — `winpaths`: an unquoted `C:\…` typed at the prompt means the path With `shopt winpaths`, a word starting with a drive and a backslash, or `\\server`, keeps its backslashes; elsewhere Bash's escape rules hold (`x=C:\y` keeps Bash's meaning). On in interactive shells, off in scripts. Turned down: quoting pasted text, impossible without bracketed paste on Windows; Bash's reading of `\\server\share` as `\servershare`. Widened (the user, 2026-11-05, from a pick list): a relative word spelled the Windows way (`dist\windows`) keeps its backslashes too, when the path it names exists (or it holds a wildcard; for Tab's prefix, its directory) and the word Bash makes of it (`distwindows`) names nothing; the shell decides that per word from the file system, since the parser cannot. Bash's reading wins where it names something, and where neither does. Tab completes `dist\win` to `dist\windows\`. Turned down: completion alone, which would offer what Enter then refuses; leaving it as Bash, where Tab finds nothing for the spelling a Windows user types. ### D81 — `winglob`: at the prompt, a Windows program globs for itself cmd never expands a wildcard, so every program Windows ships reads `*` itself or means something else by it (`net user NAME *` asks for a password). With `shopt winglob`, a command under `System32` or `SysWOW64` gets its words unexpanded. On in interactive shells, off in scripts. Turned down: quoting the star, right in scripts but not for a line typed from Windows habit; skipping globbing for programs installed elsewhere, which need it. ### Decided in working sessions - **`chown` and `chgrp` change nothing, warn and return 0** (the user, 2026-10-11): Windows sets an owner only with special privileges and has no POSIX groups, so, as `chmod -x` (D34), they say so on standard error and succeed, and an install script carries on; `enable -n chown` reaches a copy on `PATH`. Turned down: refusing, which stops install scripts; leaving them to `PATH` (Git's MSYS copies, none on a bare machine). Kept so on 2026-10-12, the warning and help naming Windows' own tools (`sudo icacls FILE /setowner USER`, `takeown /f FILE`): a Windows owner may change the access list but gets no access from being owner, mode bits are not stored and the group is never consulted, and files an elevated `sudo` makes are already yours. Turned down: a real owner change under `sudo`, which would set what decides nothing. ## 3. Running programs and the environment ### D5 — `PATH` is the one variable translated, at the process boundary Scripts see `PATH` colon-separated as `/c/...`; a child's environment gets the Windows form. Apart from `$SHELL`, nothing else is translated or injected: `GOPATH`, `PYTHONPATH` and `CLASSPATH` pass verbatim. Turned down: a list of path variables to translate. ### D8 — Command resolution is cash's own Builtin, function or alias, then a `PATH` search with `PATHEXT`, dispatched by extension before any file is read: `.exe`/`.com` directly, `.cmd`/`.bat` through `cmd.exe /d /s /c` (D32), `.ps1` through `pwsh` or else `powershell`, an extensionless file by its shebang. The extension comes first because an App Execution Alias reads as nothing (D46). Every D3 spelling works as a command name. Turned down: special-casing Scoop shims (D25). ### D25 — Scoop shims are run, not resolved through A shim is an executable like any other, so cash never needs Scoop; the cost is an extra process per job. `cash doctor` and completion read a `.shim` file. Turned down: resolving through shims, which ties cash to Scoop. ### D31 — Variable names are case-insensitive; POSIX names upper-cased Windows supplies `Path`, `Temp` and `UserProfile`, so lookup ignores case for a variable inherited from Windows or set by cash as it starts (an exact match wins), and `PATH`, `HOME`, `TMPDIR` and `USER` are upper-cased on import; an unset `$Seconds` reads `SECONDS`. A script's own variables are found by their exact name, as in Bash: shflags keeps `FLAGS_help` and `FLAGS_HELP` apart (the user, 2026-10-19). Narrowed (the user, 2026-10-31): only a name with a capital in it is read in another case, as only such a name is assigned in another case; a name all in lower case (`shell`, `term`, `path`, `home`, `seconds`) is a script's own and unset where Bash has it unset, since neofetch's `${!name}` for a disabled item read `SHELL` and `TERM`. Turned down: Bash's case-sensitive lookup, where `$PATH` is empty; folding every variable; limiting the fallback to exported names. ### D32 — `.bat` and `.cmd` arguments are escaped for cmd `cmd.exe` re-parses the line, so cash caret-escapes `&`, `|`, `^`, `<`, `>` and neutralises `%`; the quotes around each argument stay. Where cmd's parser is ambiguous, the documentation says fidelity stops. ### D35 — No userland required; `cash doctor` names the fix What cash does not carry it finds on `PATH` (D8); `cash doctor` reports what shadows what (BusyBox applets that break scripts, DOS `find` and `sort`, odd shims, the System32 tools cash shadows) and names the fix, because shadowing on Windows is silent. Turned down: depending on one userland install, since none is complete. ### D46 — App Execution Aliases run as any `.exe` Store aliases (`python.exe` in `WindowsApps`) are 0-byte files tagged `IO_REPARSE_TAG_APPEXECLINK`, which `CreateProcessW` resolves itself, so they need no special support, only three rules: dispatch by extension before reading the file (D8), `test -L` checks the reparse tag, not the attribute (D27), and `[ -s python.exe ]` is false, documented in spec §4. ### D52 — MSYS2 and Cygwin programs get Cygwin's argument encoding A program linked to `msys-2.0.dll` or `cygwin1.dll` (all of Git for Windows' `usr/bin`) splits its command line by Cygwin's rules, so cash reads the import table and encodes for those rules. Turned down: the C runtime's encoding for every program, which Cygwin mangles. ### Decided in working sessions - **Times honour `TZ`, as in Bash** (the user, 2026-10-04): `printf '%(…)T'`, prompts and `HISTTIMEFORMAT` use the zone `TZ` names (`UTC`, a POSIX `EST5EDT`, an IANA name), else Windows' own. Turned down: documenting that `TZ` is ignored. - **awk's `system()` and pipes and sed's `e` run plain cash** (the user, 2026-10-04): `cash -c`, as Bash does. Turned down: running them as `sh` in POSIX mode, as gawk and GNU sed run `/bin/sh`. - **`exec -a NAME` and `exec -l` are refused for a program other than cash** (the user, 2026-10-04): the standard library cannot set another program's `argv[0]`. Turned down: a spawn of cash's own to set it, and ignoring the option in silence. - **A DLL is no command, though it is a PE image** (2026-10-18, the user's pick after 1.24.0): an extensionless file runs by its contents, and a PE image counts only when its COFF header does not set `IMAGE_FILE_DLL`, so completion, `type` and `which` leave System32's `noise.dll` out. An `MZ` file too short for the header still counts. Turned down: the old rule, where any `MZ` file counted and running a DLL failed. ## 4. Processes, jobs and signals ### D6 — Every job in a job object, nested in the session's Each pipeline and background job runs in its own job object inside a session job with `KILL_ON_JOB_CLOSE`, so killing a job reaps its tree and nothing outlives cash; each program is created suspended and assigned before it runs. A finished command's job is released, not reaped, so what it left running goes on, as in Bash; at exit cash ends its console programs and leaves GUI applications. The exceptions are elevated programs (D42) and `detach` (D45). Turned down: assigning a program after it starts, which lets a grandchild escape. Amended (the user, 2026-10-23, from a pick list, recommended): a script (not the prompt) that ends while background jobs run inside cash (`( work ) &`, a function, a builtin with `&`) waits for them before it exits, since a thread of cash cannot outlive it and under Bash their work is done after the script has ended; nb's git commits were lost. A job that is one program alone (`server &`) is not waited for, and goes as above. At the prompt `exit` still ends them, as Bash hangs them up; Ctrl-C ends the wait. The cost: a script that leaves an endless background loop running no longer ends (Bash leaves the loop orphaned). Turned down: ending them with the script, as before. ### D11 — cash owns job control brush's job manager is off; `jobs`, `fg`, `bg`, `kill`, suspend and resume are cash's, in Win32 terms, with the job object (D6) the one notion of a job. `kill` sends a program only the signals Windows can deliver (D13, D19, D21, D22, D64). `trap`, `trap -l` and `kill -l` know all 31 of Linux's, by Linux's numbers, since scripts name them (bashdb traps `ILL`): a trap on `USR1`, `PIPE` or the rest runs when the shell sends it itself, and sending one to a program is refused (the user, 2026-10-20). Turned down: keeping brush's job manager beside cash's; refusing those names, which bashdb filed under `EXIT`; Git Bash's Cygwin numbering. ### D13 — Ctrl-C is graceful first; the job object is the backstop Ctrl-C during `terraform apply` must let Terraform release its state lock, so the first move is the console event and the grace period is the user's, not a timer's. Foreground programs share the console's group and get every Ctrl-C; background jobs lead groups of their own. Under `fg` Ctrl-C reaches the job as Ctrl-Break, and a second one ends its tree. Turned down: a fixed timeout; a group of its own for each foreground program, which turns every Ctrl-C into Ctrl-Break and breaks REPLs; reaping first, which leaves remote locks. ### D14 — `trap EXIT` runs to completion; a second Ctrl-C forces teardown A cleanup cut short is worse than a slow one, so an `EXIT` trap has no timeout; a second Ctrl-C while it runs tears down at once. Turned down: a timeout on traps. Since 2026-10-16 the second Ctrl-C must come two seconds or more after the first: one sooner is the same key pressed twice, and a quick double press at a long `grep` ended the shell (`cash_win32::console::STUCK_AFTER`). ### D15 — Exit codes truncate; crashes map to Bash's 128+n A normal exit code is its low byte, as in Bash; an NTSTATUS crash maps as Bash reports a fatal signal (an access violation gives 139), and Ctrl-C gives 130. Turned down: truncation alone, which turns `0xC0000100` into 0, a crash reported as success. ### D17 — Process substitution streams through pipes `< <(cmd)` and `> >(cmd)` are anonymous pipes; one passed as a path is a named pipe; an opener that must stat, seek or create gets a temp file instead (`diff`, `cmp`, a program writing to `>(...)`). The shell waits for each `>(...)` before it exits. The named pipe is shown as `//./pipe/cash-procsub-PID-N`, and handed to a Git for Windows program as `\\.\pipe\...`; its directory cannot be entered, since Windows refuses the pipe namespace as a working directory (the user, 2026-10-20). Turned down: temp files for everything, which never stream (`< <(tail -f log)` hangs); a named pipe for every path, which `tee -a` cannot append to; `//./pipe` as a directory of the shell's alone, and Bash's `/dev/fd/N` spelling, which Windows programs cannot open. ### D19 — Suspend by enumerating threads, documented APIs only `Ctrl-Z` and `kill -STOP` suspend each thread with `SuspendThread`; `fg`, `bg` and `kill -CONT` resume. Windows has no Ctrl-Z event, so cash takes a Ctrl-Z the foreground program leaves unread for 200 ms. Turned down: `NtSuspendProcess`, undocumented. Accepted: a program busy over 200 ms between reads can be suspended where it would have read the key. ### D21 — `kill -TERM` escalates in the background; `kill -9` is immediate `TERM`, `HUP`, `QUIT` and `INT` ask the target and return at once (`WM_CLOSE`, or Ctrl-Break to a group leader), then terminate it after five seconds; `kill -9` terminates at once. Turned down: a console event aimed at a pid that leads no group, which reaches every process on the console. ### D22 — Job specs kill trees; bare pids kill one process `kill %1` signals the whole job through its job object; `kill 1234` signals that process only, so `kill $pid` keeps POSIX meaning. cash holds a handle on recently ended job processes so a reused pid is never hit. `kill -1` is refused. Turned down: signalling whatever process has the number, which hits another program once Windows reuses it. ### D26 — Descriptors above 2 work where cash holds both ends Builtins and cash-to-cash calls have the full table. A native program has no POSIX descriptors, so `tool.exe 3>x` is an error, not a silent no-op; descriptors the shell only holds are not passed and do not stop the command. Turned down: the MSVC CRT's `STARTUPINFO` table, which Go and Rust programs never read; Bash's passing a group's fd 3 to a program. Added (2026-10-19, the user's pick, as shellspec runs `sh -c '...' 3>&2`): a cash started by cash is given every descriptor above 2 the shell has open. Copies of the handles are made inheritable for that one start and named in a variable the child reads first thing, then closed; every program start in cash takes one lock, so no program started at the same moment inherits them. Turned down: a named pipe per descriptor, relayed by the parent, which costs a thread each and turns a file into a pipe. ### D64 — `CHLD` is cash's own event Windows has no `SIGCHLD`, but cash reaps every child it starts, so a `CHLD` trap runs once per child reaped, as Git Bash 5.3 counts. Turned down: refusing `trap … CHLD`, which job pools and Bash 5.3's job notices need. ### D70 — Background jobs and subshells run inside the shell, on threads cash forks nothing: a background job, a subshell and a command substitution are copies of the shell on threads of their own. A job that runs no program gets a number no Windows pid can be (4n + 1 from 100001), which `$!`, `kill`, `wait` and `jobs -p` take. At most 256 run at once, Git Bash's `ulimit -u` (`CASH_MAX_SUBSHELLS`). Turned down: tasks on the runtime's workers, where a job that never waits holds a worker for good. Added (2026-10-18, the user's pick after 1.24.0): a job's threads run below normal priority, in turns of a millisecond between pipelines. At the foreground's priority, forty busy jobs held it 11 to 19 s on one processor and past 15 s on CI's Windows Server, where Linux hands a waking shell the processor at once. The programs a job starts keep their priority. Turned down: lowering alone, where a job holding a lock the foreground wanted kept it a second behind the other jobs' time slices. ### D71 — A writer whose reader went away ends as SIGPIPE ends it, if it is cash's Windows has no SIGPIPE, so a builtin or bundled tool whose pipe reader is gone ends with 141 in silence, as in Bash; a program cash did not build ends as it chooses. Turned down: letting the write merely fail, which kept `while :; do echo y; done | head -1` running for ever. ### Decided in working sessions - **`fg` and `bg` need job control, as in Bash** (the user, 2026-10-03): in a script they say `fg: no job control` and return 1 until `set -m`. Turned down: cash's earlier leniency, where `fg` in a script waited for the job. ## 5. Startup files, help and messages ### D24 — `~/.bashrc` is read, then `~/.cashrc` An interactive cash reads `~/.bashrc` (`$HOME` is `%USERPROFILE%`) and then `~/.cashrc`, so a Bash setup carries over and `.cashrc` has the last word. A failing command in a startup file prints Bash's error, startup goes on, and a summary line ends it (`3 errors in ~/.bashrc`), so a Linux-written `.bashrc` cannot fail silently. ### D69 — `cash --init-rc` writes a starter `~/.bashrc`, once With neither `~/.bashrc` nor `~/.cashrc`, installs write a starter `~/.bashrc` (the author's own), only the first time per user, so one deleted on purpose never returns; an existing file is never overwritten. It is `.bashrc` so Git Bash reads it too. ### D72 — `help` from one catalogue Every builtin has an entry and a summary in one catalogue, checked by a test; each page ends with the builtin's own `--help` instead of copying its options. ### Decided in working sessions - **`LANG` stays unset** (the user, 2026-10-24): where no locale variable is set, cash sets none, though Git Bash's `lang.sh` sets `LANG` from Windows' language; git's messages would follow it. Turned down: Git Bash's way, and `C.UTF-8`. - **What cash prints never cites its own documents** (the user, 2026-10-05): no decision numbers, spec rows, ROADMAP items or research files in help pages, `--help`, version lines, warnings or `cash doctor`; they point to a `help` page instead. - **Errors are worded as Bash words them** (the user, 2026-10-03): `script.sh: line 3: foo: command not found` in a script, `cash: line 1: …` for `-c`, `cash: foo: command not found` interactively, with Bash's message text, builtins' included. Turned down: cash's words with Bash's location, and `error:` with a location added. - **A builtin's bad option is Bash's two lines** (the user, 2026-10-03): `name: -q: invalid option` and `name: usage: `, status 2; `name --help` goes to stdout with status 2, as Bash's does, and `help name` gives 0. Turned down: clap's block. - **sed's errors read as GNU sed's, prefix and all** (the user, 2026-10-04): `sed: -e expression #1, char 5: unknown command: `x'`. Turned down: cash's `