forked from Archives/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.
95009b06b6
Change-Id: I6d5648b84536c22e518413d0360047431b1acccc |
2 years ago | |
---|---|---|
.github/workflows | 2 years ago | |
doc | 2 years ago | |
pkg | 2 years ago | |
snap | 2 years ago | |
LICENSE | ||
README.md | 2 years ago | |
go.mod | 2 years ago | |
go.sum | 2 years ago | |
help.go | 2 years ago | |
keymap.go | ||
main.go | 2 years ago | |
print.go | 2 years ago | |
search.go | ||
search_test.go | ||
stream.go | 2 years ago | |
util.go | 2 years ago | |
util_test.go | ||
version.go | 2 years ago | |
viewport.go |
README.md
* 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
Add your own themes in theme.go file.