diff options
-rw-r--r-- | home/xyz/.bashrc | 8 | ||||
-rwxr-xr-x | home/xyz/.config/nsxiv/exec/key-handler | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/home/xyz/.bashrc b/home/xyz/.bashrc index 1812f253..070f969c 100644 --- a/home/xyz/.bashrc +++ b/home/xyz/.bashrc @@ -79,7 +79,8 @@ alias zqi='zoxide query -i' # all green color, no auto turn off color when pipe to nvim #alias pactree='pactree -c' -eval "$(zoxide init posix --hook prompt --no-aliases)" +#eval "$(zoxide init posix --hook prompt --no-aliases)" +eval "$(zoxide init bash)" z () { __zoxide_z "$@" && l @@ -93,9 +94,8 @@ zi () { # READLINE_LINE and READLINE_POINT see `man bash` zqi_key () { # fzf uses printf '%q' to escape output, but attention %q is not POSIX - # well we use bashism here so whatever, but use single quotes here also seems work fine so whatever - # maybe consider deal with FZF_DEFAULT_COMMAND not escape path at .profile instead - selected="'$(zoxide query -i)'" + # well we use bash here so whatever + selected=$(printf '%q ' "$(zoxide query -i)") READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}" READLINE_POINT=$((READLINE_POINT+${#selected})) } diff --git a/home/xyz/.config/nsxiv/exec/key-handler b/home/xyz/.config/nsxiv/exec/key-handler index 80dd82f0..cfac0301 100755 --- a/home/xyz/.config/nsxiv/exec/key-handler +++ b/home/xyz/.config/nsxiv/exec/key-handler @@ -59,6 +59,6 @@ case "$1" in "p") tr '\n' '\0' | xargs -0 sh -c 'convert "$@" $(time.uuid).pdf' shell ;; "r") rotate ;; "w") tr '\n' '\0' | xargs -0 shufwall ;; - "y") tr '\n' '\0' | xargs -0 realpath | xsel -b ;; + "y") tr '\n' '\0' | xargs -0 realpath | tr '\n' '\0' | xargs -0 printf '%q ' | xsel -ib ;; esac |