3 ms·
I was thinking hard about this and truth is I did write code to do it. From the README.MD in my private repo: > `ec` prints out the elapsed time and exit code
by avg_dev 4y ago
I was thinking hard about this and truth is I did write code to do it.
From the README.MD in my private repo:
> `ec` prints out the elapsed time and exit code of a command after running it.
But the thing is, Bash supports this natively, using `$?` and you can even put it in your `$PS1` so you see it for every command, or use a function: https://wiki.archlinux.org/title/Bash/Prompt_customization#Visualizing_exit_codes https://wiki.archlinux.org/title/Bash/Prompt_customization#V...
Still, I like my solution. It was fun to write. If you want access to the repo let me have an email address I can write you at, or a GitHub username, and I'll let you have a look. https://i.imgur.com/DUf9gDc.png https://i.imgur.com/DUf9gDc.png