Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Invocation Methods for Resh except ctrl+R #196

Open
qsh-zh opened this issue Jul 15, 2023 · 4 comments
Open

Additional Invocation Methods for Resh except ctrl+R #196

qsh-zh opened this issue Jul 15, 2023 · 4 comments

Comments

@qsh-zh
Copy link

qsh-zh commented Jul 15, 2023

Thanks for your awesome resh.

I was wondering if there are alternative methods to invoke Resh, apart from using the Ctrl+R shortcut.

In my experience, I have encountered an issue with invoking Resh using Ctrl+R in the VSCode terminal. It appears that VSCode may intercept the Ctrl+R shortcut and prevent it from reaching the terminal. Additionally, I believe that having the ability to invoke Resh by typing specific commands like resh or resh-history would be a beneficial feature.

@korniychuk
Copy link

The function you need is __resh_widget_control_R_compat. Bind it to a hotkey.

Example for people who use zsh-vi-mode plugin:

if [[ -f ~/.resh/shellrc ]]; then
  source ~/.resh/shellrc

  function ak_zvm_resh() {
    zvm_define_widget ak_run_resh __resh_widget_control_R_compat
    zvm_bindkey vicmd '^S' ak_run_resh
    zvm_bindkey viins '^S' ak_run_resh
  }
  zvm_after_init_commands+=(ak_zvm_resh)
fi

@nati0n
Copy link

nati0n commented Nov 16, 2023

Is there a way to launch RESH by a command (e.g. resh or history instead of a keybinding?

@nati0n
Copy link

nati0n commented Nov 16, 2023

Sorry nvm answered my own question, hadn't installed yet. resh is a command to launch. Not sure how to un-keybind it yet, but working on that now.

@nati0n
Copy link

nati0n commented Nov 16, 2023

Answer to this is modify the config file and set BindControlR = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants