3 ms·
Missing from all of these: Error code returned from previous command. Invaluable.
by everybodyknows 1y ago
Missing from all of these: Error code returned from previous command. Invaluable.
- PeterWhittaker 1y agoAbsolutely! Not only does filtering on $? provide info (last command interrupted, suspended, good, bad, etc.), it makes the prompt itself a quick way to test [[ ... ]] expressions.... (My prompt is platform aware since codes for some ops differ between MacOS and Linux. The return is colour-coded (green, red, purple, depending on case), and multiline, with git status if in a repo, cwd, and a few other things....)
- crtasm 1y agoDan's Prompt includes the exit code