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

broken fzf Ctrl + t feature. #198

Open
zw963 opened this issue Oct 25, 2023 · 2 comments
Open

broken fzf Ctrl + t feature. #198

zw963 opened this issue Oct 25, 2023 · 2 comments

Comments

@zw963
Copy link

zw963 commented Oct 25, 2023

When resh add following config into my ~/.bashrc, which start resh after fzf. (fzf start eariler)

[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc # this line was added by RESH
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh # this line was added by RESH

Which broken fzf Ctrl + t feature, get following error.

bash: bash_execute_unix_command: cannot find keymap for command

But, start resh before fzf not works too, because fzf will override resh completely.

Thanks.

@curusarn
Copy link
Owner

curusarn commented Feb 4, 2024

Hi @zw963,

I appreciate your patience here.

Could you share more details about your setup? 🙏
What bash version are you running?
What configuration you use with fzf? How do you have it set up?

Thanks!

@zw963
Copy link
Author

zw963 commented Feb 4, 2024

fzf config

# fzf.sh

source fzf.bash
source fzf-key-bindings.bash

export FZF_DEFAULT_COMMAND="fd --type f --follow --exclude={.git,.idea,.vscode,.sass-cache,node_modules,build,target,out}"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"

export FZF_DEFAULT_OPTS="--bind='ctrl-o:execute-silent(emacsclient -c {})+abort' --border"

export FZF_CTRL_T_OPTS="
  --preview 'bat -n --color=always --pager=never -- {}'
  --bind 'ctrl-/:change-preview-window(down|hidden|)'"

export FZF_CTRL_R_OPTS="
  --preview 'echo {}' --preview-window up:3:hidden:wrap
  --bind 'ctrl-/:toggle-preview'
  --bind 'ctrl-y:execute-silent(echo -n {2..} | clip)+abort'
  --color header:italic
  --header 'Press CTRL-Y to copy command into clipboard'"

export FZF_ALT_C_OPTS="--preview 'tree -C {}'"
# resh.sh

[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc # this line was added by RESH
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh # this line was added by RESH

If source fzf.sh then resh.sh, resh will make fzf Ctrl + t broken, because both of them use Ctrl + t for folder history.

If source resh.sh then fzf.sh, fzf will override resh.

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

2 participants