I'd like to have the same keyboard shortcuts in all the terminals I use. Since they don't have the same *nix on them, and since terminals can be very different, I'm looking for a reasonably portable way to get keyboard shortcuts from one *nix terminal (at least supported by a standard Ubuntu 12.04 installation) to other terminals (Bash only).
That is, I'm trying to generate commands in one terminal to execute on another terminal, in order to use the same keyboard shortcuts in the second terminal. Especially things like Alt-Del (delete the word to the right of the cursor) and Ctrl-Left (move the cursor one word to the left), which on some hosts I work on simply prints the escape code instead of performing the expected actions.
This is also meant as a precursor to possibly changing the .inputrc
on the target host. The important points are to be able to
- Figure out which keyboard shortcuts are defined on my local host.
- Figure out whether any commonly used shortcuts are not defined from the remote host.
- Copy the shortcut definitions to the remote host.
- Verify that the shortcuts work as expected on the remote host.
- Be reasonably sure that the shortcuts would also work on a third host, possibly with very old versions of Bash and standard tools like
grep
andsed
.
bind
instructions in your.bashrc
or.inputrc
?.bashrc
or.inputrc
on these servers - They are used by others and monitored for any changes.