Delightful dotfile debauchery

Thursday, 5 May 2005 [Monday, 27 Jun 2005]

Thanks to Power Shell Usage: Bash Tips & Tricks I just made an incredibly neat addition to my .inputrc file:

"\e[A": history-search-backward
"\e[B": history-search-forward

With these settings bash and any programs that use readline will allow you to search your history for commands that start the same using the arrow keys. You can f.ex. type “ssh” and then page through all previous command lines which start with “ssh” just by hitting arrow keys. Very handy!

The only thing I wonder is: why the heck is this not the default?!

Next up is a two-line addition to my .screenrc:

caption always ' %0c:%0s | %w'
termcapinfo xterm*|rxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' # pass hardstatus through to xterm

The caption setting causes screen to display a clock and a “task bar” listing the names of all windows in that screen session at the bottom of the terminal. The second line makes screen pass the “hardstatus” messages through to graphical terminal emulators to be displayed as the window title. Note that you will usually find people telling you to use hardstatus alwayslastline 'something' to implement the window list. This is an inferior choice as compared to the caption setting, since it is then impossible to change the window title of a graphical terminal emulator from within programs running in the screen session.

None of this is earth-shaking, but they’re all very neat little touches that make life just a little less frustrating.

Again I wonder why any of this should have taken so much digging through documentation and surfing on the web to run across. Things like these should be included in default configs shipped with distributions. Sure, some picky users won’t like the defaults, but picky users always end up tweaking settings anyway. Meanwhile, non-picky users will forever live with the defaults, however crappy. Their lives would be a lot easier if defaults were useful, not minimal. Sigh.