This is sort of a contiunation of my last question: printing saving the last bash input command
Now I want to know if it's possible to know when you're at the first bash prompt of a terminal. So I'm displaying the last command run above the current prompt. And I'm thinking it would be cool if when you're at a fresh terminal, to display the last N commands.
I guess I could just echo the last commands inside my
.bashrc, but that doesn't seem like a good idea. And also it'd be cool to get the last N commands shown when the scrollback is cleared (via
Is any of that (reasonably) possible?