ergonex shell install MUST write one block (and with --dry-run show it as a unified diff) between the lines # >>> ergonex >>> and # <<< ergonex <<< in the shell's start-up file (~/.bashrc, ~/.zshrc, ~/.config/fish/conf.d/ergonex.fish, the PowerShell $PROFILE, or the Nushell config.nu, or the file --rc names) and ask, MUST write only after a yes (and exit 2 where there is no terminal and no --yes), MUST leave one block where it is run twice, and --uninstall MUST remove exactly that block and nothing else.
Enforced (check): .github: cd commons/ergonex && bun test suite/ — ergonex-shell.test.ts, ergonex-command.test.ts: --install shows a unified diff of one marked block and writes only after a yes or --yes (a usage failure with no terminal and no --yes), twice leaves one block, --uninstall removes exactly it and leaves a file with other text, CRLF or no final newline as it was
Proved by: ergonex/suite/ergonex-command.test.ts, ergonex/suite/ergonex-shell.test.ts
Written in: ergonex/src/shell/block.ts
Tests: passed: suite/ergonex-command.test.ts ergonex shell install writes one block (--dry-run shows its diff and writes nothing), twic; passed: suite/ergonex-shell.test.ts each shell's start-up file is the one the specification names, the --rc file aside; passed: suite/ergonex-shell.test.ts install and uninstall keep a file that is empty, has no final newline or uses CRLF as it w; passed: suite/ergonex-shell.test.ts install writes one marked block, a second install leaves one, and uninstall removes exactl
Cited by: diff, Ergonex, shell/block, The ergonex command