7 ms·
This is great. Is there an easy "open source terminal emulator" where I can run this after I typed enter but before it is executed? More like. is there a way th
by throwaway158497 5y ago
This is great. Is there an easy "open source terminal emulator" where I can run this after I typed enter but before it is executed? More like. is there a way the terminal can understand I typed a bad command and then give suggestions for changing it.
- alanbernstein 5y agoI would guess the shell is a more accessible place to accomplish something like this. For example: https://superuser.com/questions/175799/does-bash-have-a-hook-that-is-run-before-executing-a-command https://superuser.com/questions/175799/does-bash-have-a-hook...
- throwaway158497 4y agoInteresting. Thanks very much. I will try it out.
- mikevin 5y agoGNU Emacs has a module called eshell-smart that borrows from Plan 9's 9term. When you run a command it moves the cursor (point in Emacs) to the beginning of the line and shows output below it. If you start typing it jumps to a new prompt allowing you to enter a separate command. If instead you move right from the beginning of the line it sees you are correcting/tweaking the command and doesn't jump to a new line when you type something. If you press space it acts like a pager. It's pretty neat because it allows you to review the output without getting in the way.