Error in installing fzf.fish
RelativeSure opened this issue · comments
Rasmus commented
Before proceeding...
- [X ] My CLIs meet the minimum version requirements
- [ X] I read through the troubleshooting guide
- [X ] If I updated fzf.fish for the first time in over 6 months, I read the migration guides to make sure I'm caught up
- I read through the recent releases to make sure this is not simply a new feature
Describe the bug
If applicable, include screenshots here.
I just installed fisher and then installed this plugin where it immediately says it has an error.
❯ fisher install PatrickF1/fzf.fish
fisher install version 4.4.4
Fetching https://api.github.com/repos/patrickf1/fzf.fish/tarball/HEAD
Installing patrickf1/fzf.fish
/home/rasmus/.config/fish/functions/_fzf_configure_bindings_help.fish
/home/rasmus/.config/fish/functions/_fzf_extract_var_info.fish
/home/rasmus/.config/fish/functions/_fzf_preview_changed_file.fish
/home/rasmus/.config/fish/functions/_fzf_preview_file.fish
/home/rasmus/.config/fish/functions/_fzf_report_diff_type.fish
/home/rasmus/.config/fish/functions/_fzf_report_file_type.fish
/home/rasmus/.config/fish/functions/_fzf_search_directory.fish
/home/rasmus/.config/fish/functions/_fzf_search_git_log.fish
/home/rasmus/.config/fish/functions/_fzf_search_git_status.fish
/home/rasmus/.config/fish/functions/_fzf_search_history.fish
/home/rasmus/.config/fish/functions/_fzf_search_processes.fish
/home/rasmus/.config/fish/functions/_fzf_search_variables.fish
/home/rasmus/.config/fish/functions/_fzf_wrapper.fish
/home/rasmus/.config/fish/functions/fzf_configure_bindings.fish
/home/rasmus/.config/fish/conf.d/fzf.fish
/home/rasmus/.config/fish/completions/fzf_configure_bindings.fish
set: Unknown option '-f'
~/.config/fish/functions/fzf_configure_bindings.fish (line 7):
set -f options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'processes=?' 'variables=?'
^
in function 'fzf_configure_bindings'
called on line 14 of file ~/.config/fish/conf.d/fzf.fish
from sourcing file ~/.config/fish/conf.d/fzf.fish
called on line 189 of file ~/.config/fish/functions/fisher.fish
in function 'fisher' with arguments 'install PatrickF1/fzf.fish'
(Type 'help set' for related documentation)
Invalid option or a positional argument was provided.
USAGE:
fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...]
DESCRIPTION
fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it
previously installed. It installs bindings for both default and insert modes. fzf.fish executes
it without options on fish startup to install the out-of-the-box key bindings.
By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding
can be configured using a namesake corresponding option:
COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION
Search Directory | Ctrl+Alt+F (F for file) | --directory
Search Git Log | Ctrl+Alt+L (L for log) | --git_log
Search Git Status | Ctrl+Alt+S (S for status) | --git_status
Search History | Ctrl+R (R for reverse) | --history
Search Processes | Ctrl+Alt+P (P for process) | --processes
Search Variables | Ctrl+V (V for variable) | --variables
Override a command's binding by specifying its corresponding option with the desired key
sequence. Disable a command's binding by specifying its corresponding option with no value.
Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly
executed multiple times. Once the desired fzf_configure_bindings command has been found, add it
to your config.fish in order to persist the customized bindings.
In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an
equals sign between an option's name and value. However, it does not validate key sequences.
Pass -h or --help to print this help message and exit.
EXAMPLES
Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V
$ fzf_configure_bindings --directory=\cf --variables=\e\cv
Default bindings but disable Search History
$ fzf_configure_bindings --history=
An agglomeration of different options
$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes=
SEE Also
To learn more about fish key bindings, see bind(1) and fish_key_reader(1).
Installed 1 plugin/s
Steps to reproduce
- install fish
- install fisher
- install fzf.fish with fisher
Environment
Versions installed:
- Fish: 3.3.1
- fzf.fish: [e.g. 7.0, how to check this]
- terminal: Ubuntu 22.04 LTS on WSL2
- OS: Windows 11
Which, if any, configuration variables such as fzf_preview_file_cmd
are set?
Additional context
Rasmus commented
I figured it out. I didn't install fish the proper way. Sorry about this.