resh icon indicating copy to clipboard operation
resh copied to clipboard

broken fzf Ctrl + t feature.

Open zw963 opened this issue 8 months ago • 2 comments

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.

zw963 avatar Oct 25 '23 17:10 zw963

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!

curusarn avatar Feb 04 '24 14:02 curusarn

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.

zw963 avatar Feb 04 '24 14:02 zw963