How to move in the CLI / readline shortcuts. Perfect flashcard format, courtesy of Clément Chastagnol at

@kunsi @rixx should work in all posix shells.

I tested it in csh and sh

@x44203 @xanderio @kunsi That highly depends on your shell config. I've been using it in my shells forever, including my current zsh. These readline moves are available in most interactive shells/command interfaces in one way or another.

@kunsi @rixx Bash has an additional, better navigation feature: vi key bindings. You can activate them with set -o vi. Then you are in edit mode by default.

@killerdicke Wow, Mansplaining after >100 days. That's a whole new level.

I saw the toot a few minutes ago and did not looked at it creation time.

@tk @rixx I'm more used to vi but in shell I'm blocked in emacs control, those are more "natural" for me :blobcatshrug:

@tk @duponin @rixx Note that this change is persistent. You don't have to renable it every time you start a terminal.

@rixx unless you have set up vi-like commandline editing. :-)

@liebach @rixx And the beauty of your scenareo is, that you use the same key bindings your shell as in your editor (vim/nvim).

@ubo @rixx yeah, and it feels real good after a short (at least if you’re used to vi) learning curve.

Nice to see it has similarities with #emacs navigations. It'll be easier for me to remember.

@redstarfish This isn't so much shells at it is GNU Readline's Emacs mode, so that's quite natural. 👍

@rixx Why in hell would anyone use Ctrl+B & Ctrl+F when you have the arrow keys, I wonder.

Same goes for Ctrl+A & Ctrl+E when there's Home & End.

Alt modifier triggers my terminal emulator's menu so they're no use to me.

Actually only the erasing proved to be useful, but I guess that's worth a repost.

@Naughtylus When people don't ask "Why" but "Why in hell", I never can really credit their curiosity …

The answer is hand movement: at least in my current keyboard layout, arrow keys (and home and end) are not in a comfortable position and require me to move my right hand. I usually don't move my hands in my workflows.


The biggest obstacle for me to remembering these shortcuts is probably my 60% keyboard :P

I still have to use conventional keyboards quite often though, so I should probably make an effort to remember / use these :)


@rixx The answer came to me as I was typing it, I was just to lazy to edit it a second time. I put the arrow keys in a very accessible position on my keyboard, so I tend to forget how painful they are to get to on a common keyboard.

Sign in to participate in the conversation – a Fediverse instance for & by the Chaos community