Quantcast
Channel: Unix Superhero » terminal
Viewing all articles
Browse latest Browse all 3

Advanced Bash Keyboard Shortcuts

$
0
0

I strive for efficiency and precision when typing.  I do most of my typing in vim and bash (or zsh).  Bash has many functions that can be assigned to keyboard shortcuts with the bind command.  Using the same command, you can view the current bindings/shortcuts.

 

bind -p | sed '/self.insert/d;/^#/d;/do-lowercase/d'

This command will show you all available shortcuts that do something uncommon.  You can find explanations of them in the bash man page under Readline Command Names.

The most well known shortcuts include:

  • Ctrl-a (beginning of the line)
  • Ctrl-e (end of the line)
  • Ctrl-r (search previous commands)
  • Alt-d (delete forward a word)

However, there are many more.  Use the command above, and the bash man pages:

man bash

You will be one step closer to impressing your co-workers.



Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images