Your current ~/.inputrc looks quite reasonable for a terminal environment like Kitty in Hyprland (Wayland). However, I can suggest some improvements and additions to optimize your readline behavior specifically for modern terminal emulators and to enhance usability.
Here’s an optimized version with explanations:
# ~/.inputrc - optimized for Kitty in Hyprland (Wayland)
# GENERAL OPTIONS
set match-hidden-files off # Do not autocomplete hidden files unless explicitly started with '.'
set show-all-if-ambiguous on # Show all possible completions immediately, no need to press tab twice
set completion-ignore-case on # Case-insensitive completion makes it easier to autocomplete
set bell-style none # Disable bell on errors (can be set to 'visible' if preferred)
# KEY BINDINGS FOR TERMINAL EMULATORS
# Kitty sends the same key sequences as xterm for Home/End keys, but confirm if they match:
# Home and End key bindings (for both Linux console and xterm)
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\eOH": beginning-of-line
"\eOF": end-of-line
# Additional Home/End bindings sometimes sent by Kitty or other terminals:
"\e[H": beginning-of-line
"\e[F": end-of-line
# Delete and Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert
# History navigation with Page Up/Down
"\e[5~": beginning-of-history
"\e[6~": end-of-history
# Bind Ctrl+Left and Ctrl+Right for word-wise navigation (common in many setups)
"\e[1;5C": forward-word
"\e[1;5D": backward-word
# Some terminals and configurations send different sequences for Ctrl+Left/Right:
"\e[5C": forward-word
"\e[5D": backward-word
# Also bind Meta+b and Meta+f for backward-word and forward-word (common Emacs shortcuts)
"\eb": backward-word
"\ef": forward-word
# Better tab completion display; disable beep and show menu
TAB: menu-complete
# Allow Ctrl+R search backwards in history (readline default, but explicit for clarity)
"\C-r": reverse-search-history
# Useful if you want to make readline wrap around history navigation:
set history-search-wrap on
# Optional: Fix for arrow keys if your terminal sends unexpected sequences
# Uncomment if needed
# "\e[A": previous-history
# "\e[B": next-history
# "\e[C": forward-char
# "\e[D": backward-char
Explanation and tips:
- I added
completion-ignore-case on which is often helpful because you don’t have to worry about case mismatches when completing files or commands.
- Added various possible Home/End key sequences that might be sent depending on terminal mode.
- Added Ctrl+Arrow bindings for easier word navigation if Kitty sends those sequences or for compatibility with other terminfo setups.
TAB: menu-complete provides a nicer tab completion menu completion rather than the classic behavior.
- Disabled the bell to prevent annoying beeps; you can set this to
visible if you prefer a visual bell.
- Added history wrap around to make scrolling through command history smoother.
- Meta+b and Meta+f are default readline shortcuts but explicitly stated.
This setup should work well on Wayland with Kitty and Hyprland, making editing on the command line smoother and more consistent.
How to apply changes:
After editing your ~/.inputrc, reload your shell or start a new terminal session to apply the changes.
You can also test by running:
bind -f ~/.inputrc
in your current shell to reload readline settings immediately.