I have a function (
not) that displays a notification. Hence, I can use it to show when a command is complete.
sleep 5; not
However, sometimes I forget to add
;not. In OS X's terminal (a few years ago), I could enter a second command, while the current command was running. This second command would execute after the first had finished.
Thus, I'd type
sleep 5Enter, then immediately type
sleep had terminated,
not would execute.
However, my experience in Linux is that this does not occur. After
sleep terminates, the command line shows
not, but the Enter never registers. I've tested Terminator, Konsole and a tty.
Is this behaviour dependent on the terminal emulator, and if so, are there any that work as I want? Alternatively, is there a way to make this function work in my terminal of choice (Terminator)?
Testing in different shells
Doesn't work, i.e. the second command doesn't register:
bash --norc --noprofile
Does work, i.e. the second command registers:
bash --norc --noprofile --noediting
I selectively removed lines from
~/.inputrc and tested with my default
bash shell again. I traced the problem to the following line. When removed, the second command registers as expected.
Oddly enough, if I try binding (say) Ctrl+i instead, there is no problem. Why does this entry prevent the second command from registering, and is there a way to still use Ctrl+j for
menu-complete while having the behaviour that I want for this second command?