Linux – Bash – Skip Words using Control Key
If you are reading this, chances are you are trying to navigate a long string in a bash shell using the arrow keys, which by default, skip 1 letter at a time. However, you can make a few simple changes and bind your control key so when you press control and left or right arrow key you will skip entire words (vs letters) making it much faster to traverse long strings. This will also apply to your mysql command line interface which makes it much easier to jump around in long sql queries.
You can add the capability to skip entire words in one of two ways:
Add the following lines to your /etc/inputrc file:
Exactly the same as adding to the /etc/inputrc but will only affect the user’s bash environment vs making a global change to everyone’s bash environment. Add the following lines to your ~/.inputrc file:
For any of the above changes to work you will have to restart your session, I tried to source the files and didn’t work until I logged out/in.
- Linux – SELinux – SEModule – Compile .pp module from .te file
- Linux – Using Curl to Test Response Headers
- CentOS – sealert – Convert audit messages into human readable (and understandable) format
- Apache – Httpd – SELinux – Permission denied – File Permissions Deny Server Access
- MySQL – Percona – Release Notes – Identifying Changes Between Versions
- Linux – CentOS – Install Mycrypt
- Linux – CentOS – GIT – Version Mismatch – CentOS5 CentOS6
- Linux – PHP – Apache – HTTP Error 500
- Linux – CentOS6 – Git – fatal – Where do you want to fetch from today?
- Linux – CentOS6 – httpd – mod_file_cache – mod_mem_cache – mod_imagemap – Cannot Load into Server – Cannot Open Shared Object