Skip to content

Commit

Permalink
+fzf (#104)
Browse files Browse the repository at this point in the history
* +fzf

This only includes building the `fzf` binary. It does not include shell
keybindings or completions.

* fix provided binary name
  • Loading branch information
johnallen3d authored Jan 14, 2023
1 parent d26f5a7 commit ed90d40
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/github.com/junegunn/fzf/data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hello
world
33 changes: 33 additions & 0 deletions projects/github.com/junegunn/fzf/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
distributable:
url: https://github.com/junegunn/fzf/archive/refs/tags/{{version}}.tar.gz
strip-components: 1

versions:
github: junegunn/fzf

provides:
- bin/fzf

build:
script: |
go build -v -ldflags="$LDFLAGS"
mkdir -p "{{ prefix }}"/bin
mv fzf "{{ prefix }}"/bin
dependencies:
go.dev: ^1.18
env:
LDFLAGS:
- -s
- -w
- -X main.version={{ version }}
- -X main.revision=tea
linux:
# or segmentation fault
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
LDFLAGS:
- -buildmode=pie

test:
script: |
out=$(cat data.txt | fzf -f wld)
test "$out" = "world"

1 comment on commit ed90d40

@DitchComfort
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible (or an option) to include the keybindings and completions. Normally the install script will handle this, or give you the option to add bindings, etc.

Please sign in to comment.