Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure variables set by conf.d/fzf.fish are global and update uninstaller #122

Merged
merged 3 commits into from
Feb 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions conf.d/fzf.fish
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# them before even executing __fzf_search_shell_variables. We use psub to store the
# variables' info in temporary files and pass in the filenames as arguments.
# This variable is intentionally global so that it can be referenced by custom key bindings and tests
set __fzf_search_vars_cmd '__fzf_search_shell_variables (set --show | psub) (set --names | psub)'
set --global __fzf_search_vars_cmd '__fzf_search_shell_variables (set --show | psub) (set --names | psub)'

# Set up the default, mnemonic key bindings unless the user has chosen to customize them
if not set --query fzf_fish_custom_keybindings
Expand Down Expand Up @@ -33,7 +33,7 @@ if not set --query FZF_DEFAULT_OPTS
# height=90% leaves space to see the current command and some scrollback, maintaining context of work
# preview-window=wrap wraps long lines in the preview window, making reading easier
# marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >)
set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"'
set --global --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"'
end

function _fzf_uninstall --on-event fzf_uninstall
Expand All @@ -49,5 +49,7 @@ function _fzf_uninstall --on-event fzf_uninstall
echo "fzf.fish key bindings removed"
set_color normal
end

set --erase __fzf_search_vars_cmd
etcusrvar marked this conversation as resolved.
Show resolved Hide resolved
functions --erase _fzf_uninstall
end