DEV Community

Discussion on: My Favorite Bash Tips, Tricks, and Shortcuts

Collapse
 
aghost7 profile image
Jonathan Boudreau

Other readline shortcuts are also pretty handy:

  • alt + f: move forward one word
  • alt + b: move backward one word
  • ctrl + e: move to end of line
  • ctrl + a: move to start of line
  • ctrl + w: delete the previous word
  • alt + d: delete the next word

These also work with many terminal applications such as repls.

Collapse
 
camerenisonfire profile image
Cameren Dolecheck • Edited

I clearly didn't look that hard, but I tried to find these hotkeys once and couldn't find them super quick. This is exactly the list I've been looking for. Thanks!

I am having trouble figuring out what the alt is on Mac for this. Often alt = option, but in this case it just does the special characters like ∫ for alt + b.

Collapse
 
yechielk profile image
Yechiel Kalmenson

Awesome!

I've been using the Home and End buttons to go to the beginning/end of the line.