You can not 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
lilihx 95009b06b6
add flag: -h, --help (#218)
9 months ago
.github/workflows Update release.yml 11 months ago
doc Split reducers docs 10 months ago
pkg Simplify reducers and add fast path to js reducer 10 months ago
snap Release 24.0.0 11 months ago
LICENSE Add LICENSE 11 months ago
README.md Split reducers docs 10 months ago
go.mod Drop flags 11 months ago
go.sum Drop flags 11 months ago
help.go add flag: -h, --help (#218) 9 months ago
keymap.go Refactor search result printing 11 months ago
main.go add flag: -h, --help (#218) 9 months ago
print.go Add FX_SHOW_SIZE config option 11 months ago
search.go Better search cursor jumps 11 months ago
search_test.go Move part of the code to pkg 11 months ago
stream.go Refactor reducers 11 months ago
util.go Add FX_SHOW_SIZE config option 11 months ago
util_test.go Reimplement in go 11 months ago
version.go Release 24.0.0 11 months ago
viewport.go Move part of the code to pkg 11 months ago

README.md

fx preview

* Function eXecution

Features

  • Mouse support
  • Streaming support
  • Preserves key order
  • Preserves big numbers

Install

brew install fx
snap install fx
scoop install fx
pacman -S fx
pkg install fx
go install github.com/antonmedv/fx@latest

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.

Pretty print:

curl ... | fx .

Reducers

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

fx data.json '.filter(x => x.startsWith("a"))'
fx data.json '[x["age"] + i for i in range(10)]'
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

Add your own themes in theme.go file.

License

MIT