summaryrefslogtreecommitdiff
path: root/home/xyz
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-11-01 01:14:58 -0700
committerxyz <gky44px1999@gmail.com>2021-11-01 01:14:58 -0700
commit8075769f52eef36095388fe94035571741e923ea (patch)
tree7e483aba0559204ea2fb9f05d8a9c74d340a8d4b /home/xyz
parent77aedd14f3a0c153a8a131fa56e087ebadf44067 (diff)
inputrc refactor, and depreciated way of zoxide query -i
Diffstat (limited to 'home/xyz')
-rw-r--r--home/xyz/.config/readline/inputrc19
1 files changed, 12 insertions, 7 deletions
diff --git a/home/xyz/.config/readline/inputrc b/home/xyz/.config/readline/inputrc
index a666b091..b686fd80 100644
--- a/home/xyz/.config/readline/inputrc
+++ b/home/xyz/.config/readline/inputrc
@@ -13,8 +13,9 @@ set colored-completion-prefix On
# Color the common prefix in menu-complete
set menu-complete-display-prefix On
-# https://github.com/LukeSmithxyz/voidrice/blob/2440ad83e9e9cf2f927efbaef618513e0df3cbda/.config/shell/inputrc
set editing-mode vi
+
+# https://github.com/LukeSmithxyz/voidrice/blob/2440ad83e9e9cf2f927efbaef618513e0df3cbda/.config/shell/inputrc
$if mode=vi
set show-mode-in-prompt on
@@ -22,13 +23,17 @@ $if mode=vi
set vi-cmd-mode-string \1\e[2 q\2
#set keymap vi-command
- # these are for vi-command mode
- #Control-l: clear-screen
- #Control-a: beginning-of-line
+ # depreciated
+ # shell-expand-line expand all subshell `$()`? not perfect but ok
+ # if there's " or ', then after \\z the " and ' will be gone because shell-expand-line
+ # a lot of bugs compare to fzf's key-bindings.bash approach with `bind -x`
+ # zsh approach seems not easy too
+ # so I choose to just use a posix sh script
+ #"\\e": shell-expand-line
+ # https://unix.stackexchange.com/questions/439280/is-there-a-way-to-define-a-bash-readline-command
+ #"\\z": "a $(zoxide query -i)\e\\e"
set keymap vi-insert
- # these are for vi-insert mode
- Control-l: clear-screen
- #Control-a: beginning-of-line
+ "\C-l": clear-screen
$endif