Register
It is currently Sat Jul 26, 2014 1:13 pm

bash history command edit question


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Fri Aug 08, 2008 5:44 pm   

Joined: Fri Aug 08, 2008 5:37 pm
Posts: 3
Hello,
Although I am new to Ubuntu/bash/Linux I have been using UNIX for about 20 years; the first seven with csh and the rest with ksh.
I have been trying to edit some of the commands in my history but can only seem to get the arrow, backspace and delete keys to work.
I am used to vi-type commands from my ksh days but can't seem to get it to function.
I've tried setting environment variables, EDITOR and FCEDIT, to different combinations of /usr/bin/vi and /bin/ed but can't seem to get into the command mode to move around the text of the recalled command.
I can get the command to come up in a vi session for editing and the command mode works well there.
But I wanted to do this on a single-line mode (just like I used to get when typing ESC-K in the ksh).
I am using Ubuntu's gnome terminal with bash, of course.
What am I missing?


Top
 Profile  
 PostPosted: Sat Aug 09, 2008 11:37 am   

Joined: Fri Aug 08, 2008 5:37 pm
Posts: 3
I resolved the issue!
I needed to execute set -o vi in my shell.
I can do this in my .profile.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP