mirror of https://github.com/antonmedv/fx
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aa0964a12e
* Handle error when no input is provided * Improve error when input file can't be read |
2 years ago | |
---|---|---|
docs/images | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
dict.go | 2 years ago | |
dict_test.go | 2 years ago | |
go.mod | 2 years ago | |
go.sum | 2 years ago | |
help.go | 2 years ago | |
keymap.go | 2 years ago | |
main.go | 2 years ago | |
parse.go | 2 years ago | |
parse_test.go | 2 years ago | |
print.go | 2 years ago | |
reduce.go | 2 years ago | |
reduce.js | 2 years ago | |
search.go | 2 years ago | |
search_test.go | 2 years ago | |
stringify.go | 2 years ago | |
stringify_test.go | 2 years ago | |
theme.go | 2 years ago | |
traverse.go | 2 years ago | |
util.go | 2 years ago | |
util_test.go | 2 years ago | |
viewport.go | 2 years ago |
README.md
fx
* Function eXecution
Install
go install github.com/antonmedv/fx@latest
Or via Homebrew
TODO
Or download pre-built binary.
Usage
$ fx data.json
Or
$ curl ... | fx
Reducers
$ fx data.json '.filter(x => x.startsWith("a"))'
Access all lodash (or ramda, etc) methods by using .fxrc file.
$ fx data.json 'groupBy("commit.committer.name")' 'mapValues(_.size)'
Update JSON using spread operator.
$ echo '{"count": 0}' | fx '{...this, count: 1}'
{
"count": 1
}
Extract values from maps.
$ fx commits.json | fx .[].commit.author
Pretty print.
$ curl ... | fx .
Documentation
See full documentation.
Themes
FX_THEME=1 |
FX_THEME=2 |
FX_THEME=3 |
---|---|---|
FX_THEME=4 |
FX_THEME=5 |
FX_THEME=6 |
FX_THEME=7 |
FX_THEME=8 |
FX_THEME=9 |