Closed jatcwang closed 5 years ago
See: Alternate-Shells-FAQ
Please duplicate any code you want to work from fzf-extras.sh
into fzf-extras.zsh
and exclusively source fzf-extras.zsh
if you are using Zsh. I will not accept PRs modifying the Bash code to work with other shells.
That's fine (Sorry I haven't seen that wiki page). Will send a PR
I confirm there's an issue (zsh 5.5.1 (x86_64-apple-darwin17.5.0)
).
fbr:18: bad math expression: operand expected at `" 5"'
Just like hypothetical fish users would be expected to source fzf-extras.fish
, not fzf-extras.sh
, zsh users are expected to source fzf-extras.zsh
, not fzf-extras.sh
.
Notice if you would how empty fzf-extras.zsh
is, currently. Or how README.md starts off by saying "Additional key bindings for fzf, primarily Bash." Emphasis mine.
In reality, this repo is almost entirely devoid of support for zsh, and it has always been this way. At least it is devoid of intentional support for zsh. Evidently unintentional support for zsh has been leading zsh users to source fzf-extras.sh
, which they never should've done. Perhaps it is my fault for not making it more clear how zsh users are meant to source fzf-extras.zsh
, but I mean, look at the file extension. There's .zsh, that's for zsh users, then there's .sh, which is for Bash users per the readme.
I would much rather a zsh-using contributor step forward to duplicate code into fzf-extras.zsh
, and finesse it for zsh compatibility. I will not do this myself as I do not use zsh.
fzf-extras.sh
is not and was never intended to be sourced by zsh users.
I'm getting this error on zsh 5.5.1 when trying to use
fbr
to change branchesHere's the fix. If you can reproduce it I'll put up the PR.