News for hackers. Stuff that matters.
Re:Jo - JSON output from a shell by kbd on Saturday March 12, 2016 @12:38PM (#11273670)
> It was merely an observation... jo looked as though it was for use in the shell though, so I was curious as to the design decision here.

I think it makes sense how it is, since if I typed "success@1" I wouldn't expect that to output "{success: false}" but I definitely appreciate your point about a case like "success@$?".

> Of course, one can simply negate the value before passing it to jo.

What's the shortest way to do that? This?

    echo success@$(test $? -ne 0; echo $?)
Re:Jo - JSON output from a shell by kbd on Monday March 14, 2016 @04:13PM (#11285224)
Shortest way:

    $ false; echo success@$((! $?))
    success@0