# inputrc -*- conf -*-

## Info:
# https://www.masteringemacs.org/article/keyboard-shortcuts-every-command-line-hacker-should-know-about-gnu-readline
# https://ss64.com/bash/syntax-inputrc.html

# Include the system inputrc
$include /etc/inputrc

# Emacs shell-like history navigation
"\ep": history-search-backward
"\en": history-search-forward

### Global settings

set expand-tilde on

# Show completions using LS_COLORS
set colored-stats on
set colored-completion-prefix on

# Ignore case in completions
set completion-ignore-case On

# Show ... if common prefix is longer than 3 characters
set completion-prefix-display-length 3

# Show symlinked directories with a slash
set mark-symlinked-directories On

# Show completions immediately
set show-all-if-ambiguous On
set show-all-if-unmodified On

# Show types (like ls -F)
set visible-stats On

# Better pasting
set enable-bracketed-paste on

# Blink parens
set blink-matching-paren on

### Bash

$if Bash
# Wrap the command line in $( ... )
"\C-xq": "\C-a$(\C-e)"
# C-M-o : dabbrev-expand
"\e\C-o": dabbrev-expand
$endif

### foot

$if term=foot
set show-mode-in-prompt on
set emacs-mode-string "\1\e]133;A\e\\\2"
# Uncomment and/or adjust if you're using the vi editing-mode.
# set vi-cmd-mode-string "\1\e]133;A\e\\\2"
# set vi-ins-mode-string "\1\e]133;A\e\\\2"
$endif