technodelight/fuse-cli

There is no license information available for the latest version (dev-master) of this package.

Use loilo/fuse php lib in CLI

dev-master 2019-08-29 13:01 UTC

This package is auto-updated.

Last update: 2024-10-29 06:24:55 UTC


README

This script is a simple filtering solution for command line, as I haven't found anything similar with 5 min googleing. Reads from stdin, outputs to stdout. Errors will be printed to stderr.

install

$ composer global require technodelight/fuse-cli

usage

Filter lists simply.

$ echo -e "house\ntrance\ntechno" | fuse ho 
# // this puts the following to stdout: 
# house
# techno

options:

  • -q: quiet mode (exit 0 on match, exit 1 on no match)
echo -e "house\ntrance\ntechno" | fuse trz -q && echo yep || echo nope # outputs: yep 
  • -t[float]: set threshold (defaults to 0.4 for a more exact match)
echo -e "house\ntrance\ntechno" | fuse trz # outputs: trance
echo -e "house\ntrance\ntechno" | fuse trz -t0.8 # outputs: trance, techno