SHA256
1
0
forked from pool/fzf

Accepting request 1158056 from home:smolsheep:upgrades

Revert changes

OBS-URL: https://build.opensuse.org/request/show/1158056
OBS-URL: https://build.opensuse.org/package/show/utilities/fzf?expand=0&rev=99
This commit is contained in:
OBS User smolsheep 2024-03-14 16:24:10 +00:00 committed by Git OBS Bridge
parent f85422a42b
commit f6f9771c94
2 changed files with 67 additions and 30 deletions

View File

@ -1,27 +1,3 @@
-------------------------------------------------------------------
Thu Mar 14 13:48:33 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Version 0.48.0 doesn't include shell completion scripts
anymore, shell integration scripts are now embedded in the
fzf binary. This simplifies the distribution, and the users
are less likely to have problems caused by using incompatible
scripts and binaries.
bash
# Set up fzf key bindings and fuzzy completion
eval "$(fzf --bash)"
zsh
# Set up fzf key bindings and fuzzy completion
eval "$(fzf --zsh)"
fish
# Set up fzf key bindings
fzf --fish | source
-------------------------------------------------------------------
Wed Mar 13 17:37:01 UTC 2024 - Joshua Smith <smolsheep@opensuse.org>

View File

@ -28,12 +28,6 @@ Source0: https://github.com/junegunn/fzf/archive/refs/tags/%{version}.tar
Source1: vendor.tar.zst
BuildRequires: zstd
BuildRequires: golang(API) >= 1.19
Provides: %{name}-bash-completion = %{version}-%{release}
Obsoletes: %{name}-bash-completion < 0.48.0-1.1
Provides: %{name}-zsh-completion = %{version}-%{release}
Obsoletes: %{name}-zsh-completion < 0.48.0-1.1
Provides: %{name}-fish-completion = %{version}-%{release}
Obsoletes: %{name}-fish-completion < 0.48.0-1.1
%description
fzf is an interactive Unix filter for command-line that can be used with any list; files,
@ -49,6 +43,47 @@ BuildArch: noarch
Tmux integration for fzf. Includes a wrapper script, fzf-tmux, that opens your list in a
separate tmux pane.
%package bash-completion
Summary: Bash completion for fzf
Group: Productivity/File utilities
Requires: bash-completion
Requires: fzf
Supplements: (fzf and bash-completion)
BuildArch: noarch
%description bash-completion
Bash shell completions for fzf
%package fish-completion
Summary: Fish completion for fzf
Group: Productivity/File utilities
Requires: fish
Requires: fzf
Supplements: (fzf and fish)
BuildArch: noarch
%description fish-completion
fish shell completions for fzf
To enable it, ensure you have a file ~/.config/fish/functions/fish_user_key_bindings.fish
which contains:
function fish_user_key_bindings
fzf_key_bindings
end
(or append fzf_key_bindings to the fish_user_key_bindings function if the file already exists)
%package zsh-completion
Summary: ZSH completion for fzf
Group: Productivity/File utilities
Requires: fzf
Requires: zsh
Supplements: (fzf and zsh)
BuildArch: noarch
%description zsh-completion
zsh shell completions for fzf
%define vimplugin_dir %{_datadir}/vim/site
%package -n vim-fzf
@ -83,6 +118,18 @@ install -Dm755 bin/fzf-tmux %{buildroot}%{_bindir}/fzf-tmux
install -Dm644 man/man1/fzf.1 %{buildroot}%{_mandir}/man1/fzf.1
install -Dm644 man/man1/fzf-tmux.1 %{buildroot}%{_mandir}/man1/fzf-tmux.1
# shell completions
install -Dm0644 shell/completion.bash \
%{buildroot}%{_datadir}/bash-completion/completions/fzf
install -Dm0644 shell/key-bindings.bash \
%{buildroot}%{_datadir}/bash-completion/completions/fzf-key-bindings
install -Dm0644 shell/completion.zsh \
%{buildroot}%{_datadir}/zsh/site-functions/_fzf
install -Dm0644 shell/key-bindings.zsh \
%{buildroot}%{_sysconfdir}/zsh_completion.d/fzf-key-bindings
install -Dm0644 shell/key-bindings.fish \
%{buildroot}%{_datadir}/fish/vendor_functions.d/fzf_key_bindings.fish
# vim plugin
install -D -m0644 -t %{buildroot}%{vimplugin_dir}/doc doc/*
install -D -m0644 -t %{buildroot}%{vimplugin_dir}/plugin plugin/*
@ -115,6 +162,20 @@ go test -v -x -mod=vendor ${BUILDMOD} -a \
%{_bindir}/fzf-tmux
%{_mandir}/man1/fzf-tmux.1%{?ext_man}
%files bash-completion
%{_datadir}/bash-completion/completions/fzf
%{_datadir}/bash-completion/completions/fzf-key-bindings
%files fish-completion
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_functions.d
%{_datadir}/fish/vendor_functions.d/fzf_key_bindings.fish
%files zsh-completion
%{_datadir}/zsh
%dir %{_sysconfdir}/zsh_completion.d
%config %{_sysconfdir}/zsh_completion.d/fzf-key-bindings
%files -n vim-fzf
%doc README-VIM.md
%dir %{_datadir}/vim