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.
 
 
 
 
Go to file
Anton Medvedev 1b1e76df01 Add ruby reducers 2 years ago
docs Add ruby reducers 2 years ago
pkg Add ruby reducers 2 years ago
LICENSE Add LICENSE 2 years ago
README.md Add ruby reducers 2 years ago
go.mod Add themes 2 years ago
go.sum Add themes 2 years ago
help.go Better usage output 2 years ago
keymap.go Refactor search result printing 2 years ago
main.go Add --version flag 2 years ago
print.go Move part of the code to pkg 2 years ago
search.go Move part of the code to pkg 2 years ago
search_test.go Move part of the code to pkg 2 years ago
util.go Refactor search result printing 2 years ago
util_test.go Reimplement in go 2 years ago
version.go Add --version flag 2 years ago
viewport.go Move part of the code to pkg 2 years ago

README.md

fx

fx example

* Function eXecution

Install

go install github.com/antonmedv/fx@latest

Or via Homebrew

TODO

Or download pre-built binary.

Usage

Start the interactive viewer via:

$ fx data.json

Or

$ curl ... | fx

Type ? to see full list of key shortcuts.

Reducers

Write reducers in your favorite language: JavaScript, Python, or Ruby.

$ export FX_LANG=node # Default
$ fx data.json '.filter(x => x.startsWith("a"))'
$ export FX_LANG=python
$ fx data.json '[x["age"] + i for i in range(10)]'
$ export FX_LANG=ruby
$ fx data.json 'x.to_a.map {|x| x[1]}'

Documentation

See full documentation.

Themes

Theme can be configured by setting environment variable FX_THEME from 1 to 9:

export FX_THEME=9
themes

License

MIT