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

Using _fzf_complete with zsh _alternative #1542

Open
12 tasks
njdan5691 opened this issue Mar 29, 2019 · 2 comments
Open
12 tasks

Using _fzf_complete with zsh _alternative #1542

njdan5691 opened this issue Mar 29, 2019 · 2 comments

Comments

@njdan5691
Copy link

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • [ x] Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • [x ] Linux
    • Mac OS X
    • Windows
    • Windows Subsystem for Linux
    • Etc.
  • Shell
    • bash
    • [ x] zsh
    • fish
@njdan5691
Copy link
Author

njdan5691 commented Mar 29, 2019

zsh 5.0.2 (x86_64-redhat-linux-gnu)
fzf 0.17.5 (b46227d)
CentOS Linux release 7.6.1810 (Core)

This is my completion function

#compdef dummy

_fzf_dummy_names() {
  _fzf_complete "--reverse" "$@" < <(
    echo "one"
    echo "two"
    echo "three"
  )
}

_alternative 'names:dummy name:_fzf_dummy_names'

Looks like it mostly works, fzf is running with my selection, but after a selection is made
I see

_fzf_complete:13: read-only variable: LBUFFER

and the selection is not returned to my prompt.

@roachsinai
Copy link

Same error when use zle -N _fzf_complete to complete some executable.

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