On Wed, 05 May 2021, Ashlen wrote: > Executing fzf without bash installed or FZF_DEFAULT_COMMAND set fails > with this output: > > Command failed: set -o pipefail; command find -L . -mindepth 1 \( -path > '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o.. > > (the output cuts off there for some reason, even when I pipe STDERR to a > file). > > > > I know of two workarounds for this problem: > > 1) Install bash (it isn't pulled in as a dependency). > > # pkg_add bash > > 2) Force the FZF_DEFAULT_COMMAND variable to the value of 'defaultCommand' > in constants.go: > > $ FZF_DEFAULT_COMMAND="set -o pipefail; command find -L . -mindepth 1 \\ > \( -path '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' \\ > -o -fstype 'devtmpfs' -o -fstype 'proc' \) \\ > -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-" fzf
I think 1) is the correct solution as upstream makes this quite explicit: https://github.com/junegunn/fzf/blob/4cd621e877cb3a8e44b12ba3a7ce58709862922f/src/reader.go#L101 Moving this to ports@ where it belongs and adding maintainer in CC. The port could use an update, I may look into that later. In the meantime, this diff should fix this. Ok ? diff 1b8dc69a23e5cad50e72572dd7cbb3c7708d53c8 /usr/ports blob - 82da07ef7d09a140c4577954cf865f0e50fd6f44 file + sysutils/fzf/Makefile --- sysutils/fzf/Makefile +++ sysutils/fzf/Makefile @@ -5,7 +5,7 @@ COMMENT = command-line fuzzy finder # Note: we make our own vendored distfile as upstream doesn't do semantic # versioning. Use 'go mod vendor'. DISTNAME = fzf-0.24.1 -REVISION = 1 +REVISION = 2 CATEGORIES = sysutils @@ -23,6 +23,8 @@ MASTER_SITES = https://theunixzoo.co.uk/distfiles/ MODULES = lang/go MODGO_TYPE = bin +RUN_DEPENDS = shells/bash + ALL_TARGET = github.com/junegunn/fzf # Note that unlike zsh and fish, bash has no well-defined site functions -- Paco Esteban. 0x5818130B8A6DBC03
