fzf-tab icon indicating copy to clipboard operation
fzf-tab copied to clipboard

[BUG] Handle prompt escape sequences

Open kinland opened this issue 1 year ago • 2 comments

Describe the bug

The dev of zsh-autocomplete says that the issue is due to fzf-tab not parsing prompt escape sequences:

@dhorkin No, the problem is that Fzf Tab doesn't know how to parse the prompt escape sequences that are allowed in the completion system's format style. You should file a bug with Fzf Tab about this.

I can make sure:

  • [✅] I am using the latest version of fzf-tab
  • [✅] this is the minimal zshrc which can reproduce this bug
  • [✅] fzf-tab is loaded after compinit
  • [✅] fzf-tab is loaded after plugins which will wrap Tab, like junegunn/fzf/completion.zsh
  • [✅] fzf-tab is loaded before zsh-autosuggestions, zsh-syntax-highlighting and fast-syntax-highlighting.

To Reproduce

Steps to reproduce the behavior:

  1. Type 'git s'
  2. Press Tab
  3. Group legend has %{%} and the like in it

Expected behavior

Prompt escape sequences should be escaped properly and fzf-tab should display the same way regardless of whether zsh-autocomplete is being used

Screenshots

With fzf-tab enabled and zsh-autocomplete disabled: image With both enabled: image

Environment:

  • OS: Ubuntu 22.04
  • zsh version: 5.8.1

Minimal zshrc

If applicable, add a minimal zshrc to help us analyze. .zshrc:

source ${ZDOTDIR:-~}/.antidote/antidote.zsh
antidote load
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
autoload -Uz compinit && compinit -i

.zsh_plugins.txt

skywind3000/z.lua
changyuheng/fz
marlonrichert/zsh-autocomplete

Log

No log appears when I hit CTRL+X

kinland avatar Feb 27 '23 19:02 kinland

This is a known issue: https://github.com/Aloxaf/fzf-tab/issues/24

Aloxaf avatar Mar 19 '23 01:03 Aloxaf

That issue is closed as "completed." If the workaround is those zshrc lines, then that really should be in the readme.

kinland avatar Mar 19 '23 03:03 kinland