Skip to content

v0.7.0

Compare
Choose a tag to compare
@svent svent released this 04 Jan 17:51
· 16 commits to master since this release

This release contains a small performance improvement and implements several feature requests/issues:

  • #46 (Implement option --word-regexp/-w to match on word boundaries only)
  • #49 (Improve handling of line length errors)
  • #51 (Fix handling of custom output separator for multiline matches)
  • #53 (Implement option --only-matching)
  • #47 (Implement option --targets to list selected files)

The last one enables fast file listing based on sifts filtering capabilities without actually searching the files. As @Rican7 mentioned in the issue, this allows e.g. to use sift as driver for CtrlP (a vim plugin).

The result is much more powerful than just implementing the option -g known from ack/the silver searcher - you can now use sift to list files and combine all filtering options, not just filter the path based on a regular expression.

An example based on the linux kernel source code (version 3.18.2):
sift --targets --git --path net -x c --files '*test*' --exclude-dirs wireless

This lists all files that:

  • contain "net" in the path ("net" is used as a regular expression here, like in the mentioned -g option)
  • are c code files (extension *.c)
  • contain "test" in the filename

And while searching, sift will

  • respect .gitignore files
  • not descend into directories named "wireless"

While your average use case should be much less complex, this shows the flexibility of the solution.

You can download the new binaries here: https://sift-tool.org/download