Incorrect command-line options in shell key-bindings scripts (--scheme=history and --bash)
nithinj opened this issue · comments
Checklist
- I have read through the manual page (
man fzf
) - I have searched through the existing issues
- For bug reports, I have checked if the bug is reproducible in the latest version of fzf
Output of fzf --version
0.29 (devel)
OS
- Linux
- macOS
- Windows
- Etc.
Shell
- bash
- zsh
- fish
Problem / Steps to reproduce
Description
There are incorrect or non-existent options used in the fzf
shell integration scripts (--scheme=history
and --bash
). These options are causing errors when sourcing the key-bindings scripts in various shell environments (Bash, Zsh, and Fish).
Steps to Reproduce
- Install
fzf
from the GitHub repository using the provided install script. - Source the provided key-bindings script (e.g.,
source ~/.fzf.bash
). - Errors are displayed indicating unknown options:
unknown option: --bash
andunknown option: --scheme=history
.
Example Error Messages
unknown option: --bash
unknown option: --scheme=history
Expected Behavior
The key-bindings scripts should source without errors, providing enhanced key bindings and search capabilities without requiring modification.
Actual Behavior
When sourcing the key-bindings scripts, the shell reports errors due to unrecognized options (--scheme=history
and --bash
), which are not supported by fzf
.
Possible Solution
Ensure that the installation scripts and key-bindings scripts are validated to remove or correct any unsupported options. This might involve:
- Reviewing and updating the installation scripts to ensure that only valid
fzf
options are used. - Testing the installation and setup process in different shell environments to catch such issues in the testing phase.
Additional Information
- The issue seems to have been observed in 0.29 (devel)
I hope this information helps, and I look forward to a resolution that will allow for error-free use of fzf
in various environments.
Thank you!
0.29 (devel)
That is a very old version. The latest version is 0.50.0.
- Install
fzf
from the GitHub repository using the provided install script.- Source the provided key-bindings script (e.g.,
source ~/.fzf.bash
).
Not sure how you ended up with an old version. You might want to examine the output of the following commands to see what went wrong.
which fzf
echo $PATH
cat ~/.fzf/.bash
That explains it, ARM Ubuntu22 still maintains this version.
nithinj@localhost:~$ which fzf
nithinj@localhost:~$ fzf --version
-bash: /bin/fzf: No such file or directory
nithinj@localhost:~$ cat /etc/*release | grep PRETTY_NAME
PRETTY_NAME="Ubuntu 22.04.4 LTS"
nithinj@localhost:~$ sudo apt install fzf
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
fzf
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
Need to get 838 kB of archives.
After this operation, 2,564 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy/universe arm64 fzf arm64 0.29.0-1 [838 kB]
Fetched 838 kB in 15s (54.4 kB/s)
Selecting previously unselected package fzf.
(Reading database ... 205111 files and directories currently installed.)
Preparing to unpack .../fzf_0.29.0-1_arm64.deb ...
Unpacking fzf (0.29.0-1) ...
Setting up fzf (0.29.0-1) ...
Processing triggers for man-db (2.10.2-1) ...
Running kernel seems to be up-to-date.
Failed to check for processor microcode upgrades.
Restarting services...
nithinj@localhost:~$ which fzf
/bin/fzf
nithinj@localhost:~$ fzf --version
0.29 (devel)
I will download the latest package instead. Thanks for the help!