posix-shell-jobs.html (2238B)
1 <!DOCTYPE html> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta charset="utf-8" /> 5 <meta name="generator" content="pandoc 3.11" /> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> 7 <title>posix-shell-jobs</title> 8 <style> 9 /* Default styles provided by pandoc. 10 ** See https://pandoc.org/MANUAL.html#variables-for-html for config info. 11 */ 12 span.smallcaps{font-variant: small-caps;} 13 div.columns{display: flex; gap: 1.5em;} 14 div.column{flex: auto;} 15 @media screen { 16 div.columns{gap: min(4vw, 1.5em);} 17 div.column{overflow-x: auto;} 18 } 19 div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} 20 /* The extra [class] is a hack that increases specificity enough to 21 override a similar rule in reveal.js */ 22 ul.task-list[class]{list-style: none;} 23 ul.task-list li input[type="checkbox"] { 24 font-size: inherit; 25 width: 0.8em; 26 margin: 0 0.8em 0.2em -1.6em; 27 vertical-align: middle; 28 } 29 </style> 30 <link rel="stylesheet" href="style.css" /> 31 </head> 32 <body> 33 <h1 id="posix-shell-jobs">POSIX Shell Jobs</h1> 34 <p>There are lots of bloated terminal multiplexers and persistence programs, like zellij, tmux, screen, and the new age vibe-coded slop ones. These are all bloat.</p> 35 <p>It turns out POSIX shell has a lot of this built in.</p> 36 <h2 id="the-stack">The Stack</h2> 37 <ul> 38 <li>st</li> 39 <li>bash / dash / ash</li> 40 <li>optional: abduco</li> 41 </ul> 42 <p>That’s it. That’s all you need to have the same features as tmux, zellij, ghostty (gross) all in one.</p> 43 <h2 id="writing-code">Writing Code</h2> 44 <p>When writing code I used to use a tmux pane with my editor, one with a terminal for execution, and sometimes another with lynx open, as relevant. Since then, I’ve become annoyed by this because I’d much rather have one bash session that does everything instead of dealing with the bloated monstrosity that is tmux.</p> 45 <p>Instead I do this:</p> 46 <ul> 47 <li>write code in vim</li> 48 <li>C-z it to suspend the program</li> 49 <li>Run my commands in the newly cleaned bash session</li> 50 <li>Run ‘fg’ to foreground the suspended session.</li> 51 </ul> 52 <pre><code>[andrew@hal wip]$ jobs -l</code></pre> 53 </body> 54 </html>