What shell do you guys use? - BSD
Users browsing this thread: 22 Guest(s)
|
|||
(16-09-2022, 08:10 AM)josuah Wrote: Small tip: the most critical information that is missing from any default shell, in a portable way: the last command error code. You can also use the builtin `trap` on the special signal `ERR` to run a command on error : Code: trap 'echo "$?"' ERR I use that, however, with some coloring and a "EXIT: " prefix: Code: trap 'printf "\e[1;31mEXIT: %s\e[0m\n" "$?"' ERR |
|||