How to Build a Cross-Shell Dotfiles Repository
Separate shared environment, shell-specific syntax, secrets, and machine-local state; deploy links idempotently and make rollback as intentional as installation.
tag
6 posts
Separate shared environment, shell-specific syntax, secrets, and machine-local state; deploy links idempotently and make rollback as intentional as installation.
Test Fish, Nushell, or another shell as an interactive tool first. Inventory compatibility, isolate configuration, benchmark real tasks, and keep a recovery shell.
A maintainable shell library needs a documented target shell, namespaced functions, no import-time surprises, explicit inputs, and tests in fresh processes.
FIFOs connect unrelated processes through a filesystem name; process substitution makes similar streams temporary. Both need careful lifecycle and failure handling.
Choose the target shell, quote data, model arrays and pipelines correctly, and use focused ShellCheck directives only when the analyzer lacks necessary context.
OpenSSH can reuse one authenticated transport for later sessions. Configure a private control socket, bounded persistence, and explicit cleanup without weakening host checks.