# # spec file for package fzf # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: fzf Version: 0.23.1 Release: 1.1 Summary: A command-line fuzzy finder License: MIT Group: Productivity/File utilities URL: https://github.com/junegunn/fzf Source0: https://github.com/junegunn/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # Run go build && go mod vendor to get vendor/ subdirectory Source1: vendor.tar.xz BuildRequires: golang(API) >= 1.12 %description fzf is an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc. %package tmux Summary: Tmux integration for fzf Group: Productivity/File utilities Supplements: packageand(fzf:tmux) BuildArch: noarch %description tmux 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 Supplements: packageand(fzf:bash) BuildArch: noarch %description bash-completion Bash shell completions for fzf %package fish-completion Summary: Fish completion for fzf Group: Productivity/File utilities Requires: fish Supplements: packageand(fzf: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 Supplements: packageand(fzf:zsh) BuildArch: noarch %description zsh-completion zsh shell completions for fzf %define vimplugin_dir %{_datadir}/vim/site %package -n vim-fzf Summary: Vim plugin for fzf Group: Productivity/File utilities BuildArch: noarch %description -n vim-fzf Plugin for vim allowing use of fzf. %prep %setup -q -a1 # fix E: env-script-interpreter sed -i 's,#!%{_bindir}/env ,#!/bin/,' ./bin/fzf-tmux %build export GOCACHE=$(readlink -f vendor/) %ifarch ppc64 BUILDMOD="" %else BUILDMOD="-buildmode=pie" %endif export RPM_OPT_FLAGS="%{optflags}" go build -v -x -mod=vendor $BUILDMOD -a -ldflags "-X main.revision=%{version}" %install install -Dm755 fzf %{buildroot}%{_bindir}/fzf 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/* %files %doc README.md %{_bindir}/fzf %{_mandir}/man1/fzf.1%{?ext_man} %license LICENSE %files tmux %{_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 %dir %{vimplugin_dir} %{vimplugin_dir}/doc %{vimplugin_dir}/plugin %changelog * Sat Oct 24 2020 Matej Cepl - Update to 0.24.1: - Real-time rendering of preview window [#] fzf can render preview window before the command completes fzf --preview 'sleep 1; for i in $(seq 100); do echo $i; sleep 0.01; done' [#] Preview window can process ANSI escape sequence (CSI 2 J) for clearing the display fzf --preview 'for i in $(seq 100000); do (( i %% 200 == 0 )) && printf "\033[2J" echo "$i" sleep 0.01 done' - To indicate if --multi mode is enabled, fzf will print the number of selected items even when no item is selected seq 100 | fzf [#] 100/100 seq 100 | fzf --multi [#] 100/100 (0) seq 100 | fzf --multi 5 [#] 100/100 (0/5) - Added --preview-window options for disabling flags nocycle nohidden nowrap default - Support preview scroll offset relative to window height git grep --line-number '' | fzf --delimiter : \ - -preview 'bat --style=numbers --color=always --highlight-line {2} {1}' \ - -preview-window +{2}-/2 - Added --preview-window option for sharp edges (--preview-window sharp) - Added --preview-window option for cyclic scrolling (--preview-window cycle) - Reduced vertical padding around the preview window when - -preview-window noborder is used - Added actions for preview window preview-half-page-up preview-half-page-down - Vim - Popup width and height can be given in absolute integer values - Added fzf#exec() function for getting the path of fzf executable It also downloads the latest binary if it's not available by running ./install --bin * Mon Aug 3 2020 Paolo Stivanin - Update to 0.22.0 - Added more options for --bind - Added preview window option for setting the initial scroll offset - Added support for ANSI colors in --prompt string - Smart match of accented characters - Vim plugin * Thu Jul 2 2020 Frederic Crozat - Add subpackage for fish completion. * Mon Apr 6 2020 Paolo Stivanin - Update to 0.21.1 - CTRL-R will remove duplicate commands - Supports tmux popup window (require tmux 3.2 or above) - bug fixes * Fri Mar 13 2020 Paolo Stivanin - Update to 0.21.0: - --height option is now available on Windows as well (@kelleyma49) - Added --pointer and --marker options - Added --keep-right option that keeps the right end of the line visible when it's too long - Style changes - --border will now print border with rounded corners around the finder instead of printing horizontal lines above and below it. The previous style is available via --border=horizontal - Unicode spinner - More keys and actions for --bind - Added PowerShell script for downloading Windows binary - Vim plugin: Built-in floating windows support - bash: Various improvements in key bindings (CTRL-T, CTRL-R, ALT-C) - CTRL-R will start with the current command-line as the initial query - CTRL-R properly supports multi-line commands - Fuzzy completion API changed - Bug fixes * Sat Jan 4 2020 Matej Cepl - Update to 0.20.0: - Customizable preview window color (preview-fg and preview-bg for --color) fzf --preview 'cat {}' \ - -color 'fg:#bbccdd,fg+:#ddeeff,bg:#334455,preview-bg:#223344,border:#778899' \ - -border --height 20 --layout reverse --info inline Removed the immediate flicking of the screen on reload action. : | fzf --bind 'change:reload:seq {q}' --phony Added clear-query and clear-selection actions for --bind - It is now possible to split a composite bind action over multiple --bind expressions by prefixing the later ones with +. fzf --bind 'ctrl-a:up+up' [#] Can be now written as fzf --bind 'ctrl-a:up' --bind 'ctrl-a:+up' [#] This is useful when you need to write special [#] execute/reload form (i.e. `execute:...`) [#] to avoid parse errors and add more actions to the same key fzf --multi --bind 'ctrl-l:select-all+execute:less {+f}' --bind 'ctrl-l:+deselect-all' - Fixed parse error of --bind expression where concatenated execute/reload action contains + character. fzf --multi --bind 'ctrl-l:select-all+execute(less {+f})+deselect-all' - Fixed bugs of reload action - Not triggered when there's no match even when the command doesn't have any placeholder expressions - Screen not properly cleared when --header-lines not filled on reload * Sun Nov 17 2019 Ismail Dönmez - Update to 0.19.0 - Added --phony option which completely disables search functionality. Useful when you want to use fzf only as a selector interface. See below. - Added "reload" action for dynamically updating the input list without restarting fzf. See https://github.com/junegunn/fzf/issues/1750 to learn more about it. - --multi now takes an optional integer argument which indicates the maximum number of items that can be selected - If a placeholder expression for --preview and execute action (and the new reload action) contains f flag, it is replaced to the path of a temporary file that holds the evaluated list. This is useful when you multi-select a large number of items and the length of the evaluated string may exceed ARG_MAX. - deselect-all no longer deselects unmatched items. It is now consistent with select-all and toggle-all in that it only affects matched items. - Due to the limitation of bash, fuzzy completion is enabled by default for a fixed set of commands. A helper function for easily setting up fuzzy completion for any command is now provided. - Info line style can be changed by --info=STYLE - Preview window border can be disabled by adding noborder to --preview-window. - When you transform the input with --with-nth, the trailing white spaces are removed. - ctrl-\, ctrl-], ctrl-^, and ctrl-/ can now be used with --bind - See https://github.com/junegunn/fzf/milestone/15?closed=1 for more details * Sat Apr 20 2019 Jan Engelhardt - Remove pointless double extraction of tarball again. * Thu Apr 18 2019 Matej Cepl - Update to 0.18.0: - 0.18.0 - Added placeholder expression for zero-based item index: {n} and {+n} fzf --preview 'echo {n}: {}' - Added color option for the gutter: --color gutter:-1 - Added --no-unicode option for drawing borders in non-Unicode, ASCII characters - FZF_PREVIEW_LINES and FZF_PREVIEW_COLUMNS are exported to preview process fzf still overrides LINES and COLUMNS as before, but they may be reset by the default shell. - Bug fixes and improvements See https://github.com/junegunn/fzf/milestone/14?closed=1 - Update to 0.17.5: - Bug fixes and improvements See https://github.com/junegunn/fzf/milestone/13?closed=1 - Search query longer than the screen width is allowed (up to 300 chars) - Patch build-mode-pie.patch removed as it is unneeded (we don't use Makefile anymore). * Thu Dec 20 2018 Matej Cepl - Add subpackage vim-fzf with the original vim plugin for fzf (there is also more extensive third party plugin on https://github.com/junegunn/fzf.vim) * Mon Jun 11 2018 avindra@opensuse.org - update to 0.17.4 * Added --layout option with a new layout called reverse-list. - -layout=reverse is a synonym for --reverse - -layout=default is a synonym for --no-reverse * Preview window will be updated even when there is no match for the query if any of the placeholder expressions (e.g. {q}, {+}) evaluates to a non-empty string. * More keys for binding: shift-{up,down}, alt-{up,down,left, right} * fzf can now start when /dev/tty is not available by making an educated guess. * bash/zsh completion improvements * install and uninstall scripts support generating files under XDG_CONFIG_HOME on --xdg flag. - remove sed patch for non-excecutable fix (merged upstream) * Sun Apr 1 2018 avindra@opensuse.org - initial package