Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Nov 2017, 01:53
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
BASH builtin 'undo' action not working
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Wed 18 Sep 2013, 09:17    Post subject:  BASH builtin 'undo' action not working
Subject description: ...how to fix it?
 

Ctrl-_ or Ctrl-x or Ctrl-u should allow me to do an 'undo' action in the terminal... but the last two are set to other things by default, and Ctrl+_ (Ctrl and underscore) doesn't work...

Here's a list of keystrokes/commands you can do: http://ss64.com/bash/syntax-keyboard.html

How can I enable the built in 'undo' action of bash?

What do I have to put into my /etc/inputrc file?

From the BASH manual:

Quote:
undo (C-_ or C-x C-u)

Incremental undo, separately remembered for each line.


Edit, I've remapped it to Alt-Left:

Code:
#re-map 'undo' to Alt-Left
"\e[1;3D": undo


But ideally, I'd like to try using Shift-Left ... any ideas ???

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Thu 19 Sep 2013, 13:25    Post subject:  

What version of bash do you have?
Code:
help | head -1

In all of the Puppies that I have used C-_ (Ctrl+underscore) has always worked fine for undo. In fact, C-- (Ctrl+minus) usually works as well.

Perhaps it is being grabbed by something else. Might you have added a binding for jwm, ROX-Filer, or xbindkeys?

sc0ttman wrote:
Ctrl-_ or Ctrl-x or Ctrl-u should allow me to do an 'undo' action in the terminal...

Actually, it's not Ctrl-x or Ctrl-u that does undo; it's Ctrl-x followed by Ctrl-u that you want. Ctrl-x is kind of an into key for a number of commands, depending on what is pressed after it.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Thu 19 Sep 2013, 13:32    Post subject:  

npierce wrote:
What version of bash do you have?
Code:
help | head -1

In all of the Puppies that I have used C-_ (Ctrl+underscore) has always worked fine for undo. In fact, C-- (Ctrl+minus) usually works as well.

Perhaps it is being grabbed by something else. Might you have added a binding for jwm, ROX-Filer, or xbindkeys?

sc0ttman wrote:
Ctrl-_ or Ctrl-x or Ctrl-u should allow me to do an 'undo' action in the terminal...

Actually, it's not Ctrl-x or Ctrl-u that does undo; it's Ctrl-x followed by Ctrl-u that you want. Ctrl-x is kind of an into key for a number of commands, depending on what is pressed after it.

GNU bash, version 4.2.0(1)-release (i386-pc-linux-gnu)

Mrxvt is grabbing the defaults.. it compiled in, still grabs it when you remove the relevant settings from the config file..

.. And yeah, I just checked, Ctrl-x,then Ctrl-u does the job, but i already mapped it to Alt-Left, which works lovely .. Shift left would be better.. (Or at least to know how to add Shift+blah and to inputrc would be nice... ???) ...

What are the hotkey definitions for Alt, Shift and Ctrl respectively in inputrc?

BTW, if anyone cares, i dont know what Puppy uses as default, but I had to change the value of $EDITOR in bashrc to make 'Ctrl-x, then Ctrl-e' load up an editor in the terminal...

I set mine to EDITOR="mp -txt" .. Now I can use a fully featured text editor, in-place in the terminal, to execute multi line commands .. nice.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0322s ][ Queries: 11 (0.0043s) ][ GZIP on ]