Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/technodelight/php-fuse-cli
Use loilo/fuse php lib in CLI
https://github.com/technodelight/php-fuse-cli
cli fuzzy-search php
Last synced: about 1 month ago
JSON representation
Use loilo/fuse php lib in CLI
- Host: GitHub
- URL: https://github.com/technodelight/php-fuse-cli
- Owner: technodelight
- License: mit
- Created: 2019-08-29T09:28:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-29T13:01:24.000Z (over 5 years ago)
- Last Synced: 2024-04-20T07:03:11.040Z (8 months ago)
- Topics: cli, fuzzy-search, php
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## about
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
```bash
$ composer global require technodelight/fuse-cli
```
## usageFilter lists simply.
```bash
$ 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)
```bash
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)
```bash
echo -e "house\ntrance\ntechno" | fuse trz # outputs: trance
echo -e "house\ntrance\ntechno" | fuse trz -t0.8 # outputs: trance, techno
```