Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bash shortcuts [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
KarlH420
n00b
n00b


Joined: 25 Apr 2005
Posts: 45

PostPosted: Tue Feb 12, 2008 9:38 am    Post subject: bash shortcuts [solved] Reply with quote

Hi all I'm trying to get the keyboard shortcuts working like described in:

http://gentoo-wiki.com/TIP_Terminal_Keyboard_Shortcuts

http://www.pixelbeat.org/lkdb/readline.html

http://www.bigsmoke.us/readline/shortcuts

http://blog.webhosting.uk.com/web-hosting/using-bash-shell-shortcuts/


Mostly i want the <ctrl> + Left and <ctrl> + right, word jump to work.


Trying to figure out why it's not working, works fine in a default Ubuntu install, but not in Gentoo. Several places I'm looking are:

  • /etc/inputrc
  • LC_* localization settings.
  • Gentoo bash configures/compiles with --without-installed-readline option


Last edited by KarlH420 on Tue Feb 12, 2008 11:23 am; edited 2 times in total
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Tue Feb 12, 2008 10:41 am    Post subject: Reply with quote

The default settings are in /etc/inputrc, not /etc/input/rc. Depending on whether or not you're logged in on the console or a terminal emulator, the bindings can vary. E.g, in Konsole, forward word is ALT+right, and backword-word is ALT+left. In other emulators, it's ESC+right and ESC+left. In Yakuake, either of those work. Also, ESC+f and ESC+b should work for forwards and backwords respectively regardless of how you're logged in. To add bindings for CTRL+left and CTRL+right, follow these directions from inputrc:

Quote:

Quick dirty little note:
To get the key sequence for binding, you can abuse bash.
While running bash, hit CTRL+V, and then type the key sequence.
So, typing 'ALT + left arrow' in Konsole gets you back:
^[[1;3D
The readline entry to make this skip back a word will then be:
"\e[1;3D" backward-word

_________________
Thomas S. Howard
Back to top
View user's profile Send private message
KarlH420
n00b
n00b


Joined: 25 Apr 2005
Posts: 45

PostPosted: Tue Feb 12, 2008 11:23 am    Post subject: Reply with quote

Thanks, the /etc/inputrc was a typo.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
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