Press Home or End Button to Navigate to the Beginning or End of Line in zsh | ATLASSC.NET
Skip to main content
/// .DATA.FRAGMENT_20230104

Press Home or End Button to Navigate to the Beginning or End of Line in zsh

1 minAuthor: Z.SHINCHVEN

I've been using zsh with starship prompt for a while. One small pain is that home and end button doesn't navigate the cursor to the beginning or end of the command line. It's the muscle memory from using bash.

I didn't get it fixed for a long time, I thought it was a hotkey issue of the terminal emulator and I never found the option to fix it in preferences.

Until today, I tried to google it, turns out that it's a zsh hotkey binding issue.

To fix it, add the following line to ~/.zshrc:

bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line

References

RackNerd Billboard Banner
Share node:
/// .RELATED.DATA_STREAMSShared tags

Related posts

Scanning_database_for_correlations…

/// .UPLINK.SUBSCRIBE

Keep your deck synced with every new transmission from ATLASSC.NET. Subscribe over RSS or Atom, or wire the whole archive straight into your AI assistant with the MCP server.