# ~/.config/bash/keybinds.bash — readline ports of the television keys in # fish_user_key_bindings.fish / zsh keybinds.zsh: # ctrl-o → gho (ghq-repos cable, cd) ctrl-e → tv git-files (nvim) # ctrl-p → pj (pj cable) down → pj on an empty prompt # ctrl-t → tv smart autocomplete (tv init bash ships no ctrl-t) # Keys owned by kitty.conf never reach the shell: ctrl-h/j/k/l (pass_keys.py). # bind -x runs in the shell process, so gho's cd persists — but readline keeps # drawing the prompt it started with. Each key is therefore a macro: \C-xN # stashes the typed line and runs the command, \C-m accepts the now-empty # line (bash prints a fresh prompt for the new cwd; nothing reaches history), # and \C-x0 restores the stash into the new line. _kb_run() { _kb_line=$READLINE_LINE _kb_point=$READLINE_POINT READLINE_LINE='' READLINE_POINT=0 "$@"