"Prasad, Ramit" <ramit.pra...@jpmorgan.com> writes: > Steven D'Aprano wrote: >> >> On Tue, 06 Nov 2012 17:16:44 +0000, Prasad, Ramit wrote: >> >> >> To enter the newline, I typed Ctrl-Q to tell bash to treat the next >> >> character as a literal, and then typed Ctrl-J to get a newline. >> > >> > That sounds complicated, my version of bash lets me type >> > 'foo<enter>bar'<enter> for the same effect. >> >> Well, I learned something new about bash. >> >> On the other hand, the Ctrl-Q next-char-is-literal trick works for >> entering control characters that otherwise don't have a key on the >> keyboard. >> > > Would you mind elaborating on how this works? I know it's not a bash > list, but I do not understand how ctrl-J is considered a literal. > Obviously, I must have a different definition of "literal". Where > can I find a list of other literals? My Google-fu is being weak > today. :( >
It's a readline thing, when you've configured it to use emacs keybindings. You can look at the emacs manual about the quoted-insert function if you want. It's useful in emacs because people like to bind ordinary keystrokes to do esoteric stuff (such as binding the TAB key to insert appropriate amount of spaces), which means that you need a way to override it (if you want to insert a literal TAB character, for example). -- regards, kushal -- http://mail.python.org/mailman/listinfo/python-list