Skip to content

[QA] Unable to figure out how to quit by output of pwd with only q and how to open a file using arrow keys #601

Answered by sayanarijit
madrigal1 asked this question in Q&A
Discussion options

You must be logged in to vote
xplr.config.modes.builtin.default.key_bindings.on_key.right = {
  help = "enter or open",
  messages = {
    {
      BashExec0 = [===[
         test -d "${XPLR_FOCUS_PATH:?}" && "$XPLR" -m Enter || xdg-open "${XPLR_FOCUS_PATH:?}"
      ]===],
    },
  },
}

xplr.config.modes.builtin.default.key_bindings.on_key.q = {
  help = "quit printing pwd",
  messages = {
     "PrintPwdAndQuit",
  },
}

Something like that. I typed on mobile, so there could be typos.

See https://xplr.dev/en/configure-key-bindings#tutorial-adding-a-new-mode

Edit:
Once it's working, switch to BashExecSilently0 for snappy interaction.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@madrigal1
Comment options

Answer selected by madrigal1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants