Giter Club home page Giter Club logo

Comments (1)

LangLangBart avatar LangLangBart commented on July 17, 2024 1

The last fzf version which supports this version of zsh is 0.50.0 (f97d275)

I believe the issue has been introduced through commit f864f8b.

I can confirm the problem occurs with any version up to 5.1, and the change was implemented in a commit1, which introduced improved assignment handling in zsh for builtin commands such as export.

zsh-5.0.2 ❌

~/.local/zsh-test/bin/zsh-5.0.2 -fxvc 'export TEST=$(echo "--height 40% --reverse --scheme=path")'
+zsh:1> echo '--height 40% --reverse --scheme=path'
+zsh:1> export 'TEST=--height' 40% --reverse '--scheme=path'
zsh:export:1: not an identifier: 40%

zsh-5.1 ✅

~/.local/zsh-test/bin/zsh-5.1 -fxvc 'export TEST=$(echo "--height 40% --reverse --scheme=path")'
export TEST=$(echo "--height 40% --reverse --scheme=path")
+zsh:1> echo '--height 40% --reverse --scheme=path'
+zsh:1> export TEST='--height 40% --reverse --scheme=path'

Does splitting declaration and assignment solve the issue for you?

--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -158,5 +158,6 @@ __fzf_generic_path_completion() {
       [ "$dir" != "/" ] && dir="${dir/%\//}"
       matches=$(
-        export FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse --scheme=path" "${FZF_COMPLETION_OPTS-}")
+        export FZF_DEFAULT_OPTS
+        FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse --scheme=path" "${FZF_COMPLETION_OPTS-}")
         unset FZF_DEFAULT_COMMAND FZF_DEFAULT_OPTS_FILE
         if declare -f "$compgen" > /dev/null; then

Footnotes

  1. sourceforge.net/p/zsh/code/ci/39b28980f

from fzf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.