Crates.io | args-to-json |
lib.rs | args-to-json |
version | 1.0.0 |
source | src |
created_at | 2019-12-06 02:27:18.853489 |
updated_at | 2019-12-06 02:27:18.853489 |
description | Reformats command line arguments as JSON array |
homepage | https://github.com/LPGhatguy/args-to-json |
repository | |
max_upload_size | |
id | 186789 |
size | 5,098 |
Lots of debuggers accept the command to run and its arguments as a JSON array. Writing that array by reformatting from your shell's syntax to JSON is annoying.
args-to-json is a small, portable (any OS, any shell) tool that reads in all arguments and prints them out as a list of strings in JSON.
args-to-json works well with tools like clip
or xclip
too -- to copy your last command as JSON in Bash onto your clipboard, run
args-to-json !! | xclip
The contents of your clipboard can then be pasted directly into a document.
Binaries are available from the Releases section on GitHub.
Install from crates.io:
cargo install args-to-json
args-to-json <...args>
args-to-json is available under the MIT license. See LICENSE.txt for details.