Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Other fun .inputrc lines' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Other fun .inputrc lines
Authored by: sellout on Mar 16, '04 05:39:34AM

My big complaint is that Terminal doesn't pass things like PgUp and PgDn to the shell. Hell, I'd be happy if it passed Cmd-PgUp as PgUp. In lieu of being able to use those actual keys, I've changed my standard mappings a bit for OS X:

Control-j: history-search-backward
Control-k: end-of-history
Control-h: beginning-of-line
Control-l: end-of-line

These basically give me the functionality that I want PgUp, PgDn, Home, and End to have (respectively). Most of them are pretty standard. The interesting one is the first line. For some reason the default value for PgUp (on systems that pass it through to the shell) is start-of-history, which I find absolutely useless.

history-search-backward is awesome. Have some commands that you use frequently? Type in the first couple letters than trigger this (Ctrl-j in my mapping here). It'll read through your history backward and complete the command with the last entry that begins with the same prefix. Sooooooooo useful.

You may also want to try hitting Ctrl-r then typing the first few characters from something in the history. Another a nice feature.



[ Reply to This | # ]