Skip to content

__fz_filter() fail on Bash #27

Description

@svardew

Thank you for check issue #26.
I use bash, not familiar with zsh.
Bash don't have word split Parameter Expansion ${=SPEC} syntax.

  • ubuntu 14.04.6 i686
  • GNU bash, version 4.4.19(1)-release (i686-pc-linux-gnu)
  • zsh 5.0.2 (i686-pc-linux-gnu)
  • fzf 0.22.0 (e2ae1b2)
    $ /bin/bash -c 'fzf="fzf-tmux arg1"; echo ${=fzf}'
    #=> /bin/bash: ${=fzf}: bad substitution
    $ /usr/bin/zsh -c 'fzf="fzf-tmux arg1"; echo ${=fzf}'
    #=> fzf-tmux arg1

When fz.sh call __fz_filter(), bash cannot expand ${=fzf} and fail to open fzf window

$ bash --norc
export LANG=C
. ~/.fzf.bash
. ~/.bash_completion/z.sh
. ~/.bash_completion/fz.sh
mv ~/.z{,_bak_bash44}
cd ~/.cargo/bin
cd ~/bin
cd /bin
cd /usr/bin
cd /tmp
z bi[TAB]
#=> ERROR; bash-4.4$ z bibash: ${=fzf}: bad substitution
exit

$ zsh -f
export LANG=C
source ~/.bash_completion/z.sh
source ~/.bash_completion/fz.sh
mv ~/.z{,_bak_zsh501}
cd ~/.cargo/bin
cd ~/bin
cd /bin
cd /usr/bin
cd /tmp
z bi[TAB]
#=> SUCCESS; fzf window appear, select and path completion ok.
exit

My OS and Fzf is old.
But when fz.sh L:173 s/${=fzf}/${fzf}/, __fz_filter() work well in tmux session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions