Icon_search
Colin

Bash modes

Posted on 01/06/2009 by Colin
2 Comments  | 

I've been using Bash for years now and have gotten relatively comfortable with the Emacs-based commands necessary to navigate around a previously entered command that needed to be modified. However, I've occasionally encountered cases where I wished that the command line behaved more like vi. Not that I think it's definitively better than Emacs, I just know a bit of vi, and the only Emacs commands I know are the few I've done in some 5-minute tutorial I went through at some point, along with the Bash commands I blogged about in July.

At any rate, my wish apparently came true years ago! Readline, the library that allows you to edit the command line, can be put into vi mode under Bash (and other programs that use Readline). It's easy:

set -o vi

So now you can use the command line pretty much exactly like vi: Esc to get into command mode and use all your favorite vi commands, and the normal commands (i, a, c, etc.) to get back into insert mode and resume typing. If you decide it sucks and want to go back, it's just set -o emacs. Have fun!

Update: I decided it sucks and went back. Maybe you'll like it, though!

Tagged:  bash, readline, vi, emacs

Comments

Posted by cheap ugg on March 12, 2010

Kate Moss on the catwalk for the first time in forever (in a McQueen dress that Philip Green would later buy Cheap watchesat auction for £100,000) - dancing and shaking her booty so that you'd never believe she really hates it; ugg outletJames Corden and David Walliams camping it up spectacularly down the catwalk and snogging at the end of it, icheap uggn front of all the photographers, with tongues; Naomi Campbell prancing up on the arm of Piers Morgan, giving a final flourish to their famous tabloid battle; nike shoesYasmin and Amber le Bon walking the catwalk together; Ronnie Corbett dancing up to Michael Jackson's Billie Jean - and then dancing UGG Baileyback down again to be met by Alexandra Burke; Gavin & Stacey and Eastenders star Larry Lamb sauntering ugg 5833up smiling as if he does it every day; Shirley Bassey, in glittering gold Jenny Packham, appearing to a roar from the crowd; Omega watchesa pregnant Denise Van Outen in floaty white Jasmine de Milo; The Saturdays appearing all together wearing Ungaro and Moschino; Jamelia up next with her two little girls (clearly born for the spotlight, Piaget watchesgrinning shyly but very happily); Bob Geldof and his girlfriend Jeanne Marine in the front row grinning at Pixie as she strode by in DVF.replica Rado watches

Posted by cheap links london sweetie bracelets on March 16, 2010

one day i went shopping outside,and in an ed hardy store,I found some kinds of ed hardy i love most they are Your website is really good Thank you for the information cheap links london sweetie bracelets cheap links london sweetie bracelets cheap links sweetie bracelets cheap links sweetie bracelets discount links of london sweetie bracelets discount links of london sweetie bracelets discount links london sweetie bracelets discount links london sweetie bracelets discount link of london sweetie bracelets discount link of london sweetie bracelets discount links sweetie bracelets discount links sweetie bracelets links Sweetie Bracelets sale links Sweetie Bracelets sale links london Sweetie Bracelets sale links london Sweetie Bracelets sale links of london Sweetie Bracelets sale links of london Sweetie Bracelets sale Thank you for the information

Post a Comment

Name

URL (optional)

Comment

simple_captcha.jpg
Please type the letters from the image.