Unix Shell - Shell History Broken - Stuck in VI Mode?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > February 2005 > Shell History Broken - Stuck in VI Mode?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Shell History Broken - Stuck in VI Mode?
Michael B Allen

2005-02-24, 5:58 pm

I just rebooted and all of the sudden my shell is very messed up. If I
press the up arrow I don't get any command history. If I press the down
arrow and then the up arrow the history starts working but the cursor is
positioned at the beginning of the command rather than at the end. Also
if I type a long command it can sometime prevent me from backing up
with Backspace. I think my shell is somehow stuck in some kind of ex
mode like in vi. Meaning if I press x it deletes characters. If I run
plain sh, history works ok. I don't see anything odd in my profile /
rc files. I've tried restarting X and rebooting. Nothing helps.

Any ideas?

Thanks,
Mike
Janis Papanagnou

2005-02-24, 5:58 pm

Michael B Allen wrote:
> I just rebooted and all of the sudden my shell is very messed up. If I
> press the up arrow I don't get any command history. If I press the down
> arrow and then the up arrow the history starts working but the cursor is
> positioned at the beginning of the command rather than at the end. Also
> if I type a long command it can sometime prevent me from backing up
> with Backspace. I think my shell is somehow stuck in some kind of ex
> mode like in vi. Meaning if I press x it deletes characters. If I run
> plain sh, history works ok. I don't see anything odd in my profile /
> rc files. I've tried restarting X and rebooting. Nothing helps.
>
> Any ideas?


What shell are you using? Have you tried

set -o emacs


Janis
Michael B Allen

2005-02-24, 5:58 pm

On Thu, 24 Feb 2005 18:25:05 -0500, Janis Papanagnou wrote:
>
> What shell are you using? Have you tried
>
> set -o emacs


I figured out the problem. I was messing around with a program called
cint about three weeks ago that I believe instructed me to create a
~/.inputrc with 'set editing-mode vi'. I don't know why but I was stupid
enough to play along but I did. So when I logged out and back in whamo!

Thanks,
Mike

PS: my shell is bash
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com