7 ms·
Absolutely! Not only does filtering on $? provide info (last command interrupted, suspended, good, bad, etc.), it makes the prompt itself a quick way to test [[
by PeterWhittaker 1y ago
Absolutely! 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....)