bash-shortening
Installation
SKILL.md
bash-shortening
Make Bash scripts shorter without making them harder to read. Source: 51 techniques from Karandeep Singh's "Bash Code Shortening" article, codified here as a cheatsheet plus categorized references.
Philosophy
Shortening is about expressing intent, not saving keystrokes. The win
is fewer moving parts (subprocesses, temp files, intermediate variables) —
not denser code per line. A 7-line script that creates a temp file and
deletes it is worse than a 1-line pipeline; a cryptic ${1:-${X:-${Y/-,/ }}}
chain is worse than three clear lines.
Two heuristics decide every call: