Repository navigation
40.0.0
#438
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
fx 40.0.0
This is the biggest fx release yet. You can now write queries inside the viewer and watch the result update as you type, with Tab completion for keys. fx also reads six new input formats, runs on Bubble Tea v2, and has vim-style commands.
⚡ Interactive queries
Press . in the viewer and start typing. As you type:
.items.on an array becomes.items[].key..users ?.active @.namefilters and then maps, like on the command line.The same completion engine now powers shell completion too, so
fx data.json .us<Tab>behaves the same in the TUI and in your shell.📄 New input formats: XML, HTML, EDN, MAML
--xml,.xml,.svg): attributes become@attr, text becomes#text, repeated children become arrays. This is the familiar xmltodict mapping. Namespace prefixes stay as written, and non-UTF-8 charsets are handled. A file with several root elements becomes a stream of JSON documents.--html,.html,.htm): parsed as a full HTML5 tree, so even messy real-world pages load.<meta charset>is respected.--edn,.edn): keywords lose the colon, so:pathsis queried as.paths. Key order and big integers are kept.--maml,.maml): key order and exact number text are kept.MAML.parseandMAML.stringifyare also available in queries, and in the npm version of fx.⌨️ Vim-style commands
Press : to open the command line:
:w [file]:wq:w !cmd:w !less,:w !vim -,:w !code -,:w !pbcopy:q:<n>🫧 Bubble Tea v2
fx now runs on Bubble Tea v2:
🧭 Viewer improvements
--no-tuiprints the output and never opens the viewer.🧰 New functions
sortKeyssorts object keys recursively.del(key)removes a key from an object or an index from an array:.users map(del('password')).exit(code)exits fx with the given status code.🛡️ Stability
A lot of work went into making fx hard to break:
$HOMEis not set.🎲 One more thing
There's a roguelike dungeon hidden inside your JSON viewer. Good luck. 🗡️
:w !vim -, or any other editor that reads from stdin.digfeature is removed. Interactive queries with Tab completion replace it.Full documentation: fx.wtf
Full Changelog: 39.2.0...40.0.0
This discussion was created from the release 40.0.0.
All reactions