Open-Source Wikis

/

fzf

/

How to contribute

/

Development workflow

junegunn/fzf

Development workflow

Set up

git clone https://github.com/junegunn/fzf.git
cd fzf
make            # builds target/fzf-<os>_<arch>
make install    # also copies to bin/fzf
bundle install  # for the Ruby integration tests and rubocop

The Makefile derives the version and revision from git describe and git log. If you build outside a git checkout you'll need to set FZF_VERSION and FZF_REVISION.

Edit, build, run

A typical inner loop:

# Edit src/...
make install                   # rebuild bin/fzf
ls | bin/fzf                   # smoke-test interactively

# Or, for non-interactive testing:
echo -e "foo\nbar\nbaz" | bin/fzf -f ba

bin/fzf shadows any installed fzf because it's a relative path. Use bin/fzf (or ./target/fzf-...) explicitly while iterating to avoid running an older build.

Format and lint

make fmt    # gofmt -s -w on src/, run shell/update.sh on shell scripts
make lint   # rubocop, gofmt diff check, shell update check

If make lint reports unformatted Go code, just run make fmt. If it reports out-of-sync shell scripts, that means shell/common.sh or one of the per-shell scripts diverged — make fmt reapplies the include directives in shell/key-bindings.{bash,zsh} and shell/completion.{bash,zsh}.

Run tests

make test                         # Go unit tests
make itest                        # Ruby integration tests (must be inside tmux)
ruby test/runner.rb --name test_  # single test by name
make bench                        # microbenchmarks under src/

See testing for details on the harness.

Submit a PR

  • Open a PR against master. The CI workflows under .github/workflows/ (linux.yml, macos.yml, codeql-analysis.yml, depsreview.yaml, typos.yml) must all pass.
  • For UI changes, attach an asciinema or terminal screenshot.
  • Update CHANGELOG.md and man/man1/fzf.1.
  • Don't bump the version yourself; the maintainer does that as part of the release.

Releasing (maintainer)

The release flow is encoded in the release target of the Makefile:

make release

It checks that you're on master, that CHANGELOG.md, man/man1/fzf.1, man/man1/fzf-tmux.1, install, and install.ps1 reference the new version, builds with goreleaser, pushes a temp branch first so install scripts always work on master, then creates the GitHub release. GITHUB_TOKEN is required.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Development workflow – fzf wiki | Factory