Closed dan-blanchard closed 5 years ago
Do you have any code in your config.fish
making a copy of fish_user_key_bindings
?
And did you see https://github.com/jorgebucaran/fisher/issues/482 and/or https://github.com/jorgebucaran/fisher/issues/450?
I migrated using the steps in the migration guide (i.e., not using fisher update
). I missed #482 when I was searching, sorry. The error isn't exactly the same though. My config.fish
is relatively simple:
### PATH ###
set default_path /usr/bin /usr/sbin /bin /sbin
set homebrew /usr/local/bin /usr/local/sbin
set brew_rbenv "/usr/local/var/rbenv/shims"
set -gx PATH $homebrew $brew_rbenv $default_path
### Ruby (rbenv) ###
set -gx RBENV_ROOT /usr/local/var/rbenv
# Spark
set -x SPARK_HOME /usr/local/Cellar/apache-spark/2.2.1/libexec/
set -x PYSPARK_DRIVER_PYTHON ipython
# Pyenv
status --is-interactive; and source (pyenv init -|psub)
# Make sure hub completions work
complete -c hub -w git
# Disable extra virualenv bits
set -x VIRTUAL_ENV_DISABLE_PROMPT 1
# Less highlighting style
set -g source_highlight_style_file $HOME/.source-highlight/esc-solarized.style
# aliases
alias ping="prettyping --nolegend"
alias preview="fzf --preview 'bat --color \"always\" {}'"
alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules"
# Fisher
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
# add support for ctrl+o to open selected file in VS Code
set -x FZF_DEFAULT_OPTS "--bind='ctrl-o:execute(code {})+abort'"
@dan-blanchard No worries. We're debugging this together. What about some script in your ~/.config/fish/conf.d
that is copying your fish_user_key_bindings
function?
Fisher can't copy your fish_user_key_bindings
function because a copy already exists. The problem is, no copy should exist.
By the way, what's in your fish_user_key_bindings
function?
The only mentions of fish_user_key_bindings
in my .config
directory are my fish/functions/fish_user_key_bindings.fish
file:
function fish_user_key_bindings
fzf_key_bindings
end
fish/functions/fisher.fish
itself.
@dan-blanchard What is fzf_key_bindings
? Can you produce the function definition?
functions fzf_key_bindings
It's from this fisher
package: https://github.com/jethrokuan/fzf
@dan-blanchard That package doesn't define a function named fzf_key_bindings
AFAIK. Instead, it provides key bindings via a conf.d snippet. Perhaps you are using an old version?
Regardless, can you produce the function definition? I'd like to see the definition to be sure it isn't doing anything odd.
One more thing, please run the following and show me what you get.
functions fish_user_key_bindings
functions fish_user_key_bindings_copy
~/D/d/.config/> functions fish_user_key_bindings
# Defined in /Users/dan/.config/fish/conf.d/fisher.fish @ line 4
function fish_user_key_bindings
for file in $fisher_path/conf.d/*_key_bindings.fish
source $file >/dev/null 2>/dev/null
end
if functions -q fish_user_key_bindings_copy
fish_user_key_bindings_copy
end
end
~/D/d/.config/> functions fish_user_key_bindings_copy
function fish_user_key_bindings_copy
fzf_key_bindings
end
I just realized that I may have accidentally installed fzf key bindings twice (once via fisher and once via shell script that comes with the fzf
Homebrew package). I'll try deleting the file that contains fzf_key_bindings
and reinstalling the fisher fzf
package.
Removing and reinstall the fzf
recreated the file fish/conf.d/fzf_key_bindings.fish
, and now I'm getting a host of errors that I wasn't before.
I think I'll have to try to wipe all the fisher stuff and reinstall again.
@dan-blanchard You don't need to remove and reinstall z
, just running fisher
would have done it.
And ~/.config/fish/conf.d/fzf_key_bindings.fish
is definitely correct, that's how the package key bindings work, via a conf.d snippet as said above.
Reinstalling fresh made more of a mess of things, which lead me to discover that since I keep my .config
directory on iCloud, it creates duplicate files with 2
suffixes on them if files get deleted and recreated before it can finish syncing (e.g., ./fish/functions/more 2.fish
).
Okay, I'm going to chalk this up to me having installed the fzf
keybindings both within and outside of fisher
, since now that I've wiped everything fresh and reinstalled, I no longer have anything in functions fish_user_key_bindings_copy
.
Thank you for helping me debug this!
@dan-blanchard I no longer have anything in
functions fish_user_key_bindings_copy
.
And do you still have the same output for functions fish_user_key_bindings
?
Yup!
I recently upgrade to fisher 3.1.1 from 2.x and I keep getting this error message when launching
fish
:I have
fish
installed via Homebrew on macOS Mojave.fish version: 2.7.1 fisher version: 3.1.1