4 ms·
> Is this any easier to remember than normal JSON? Yeah, actually it is. It's immediately intuitive to me. It makes string interpolation way easier. Quick, how
by kortex 5y ago
> Is this any easier to remember than normal JSON?
Yeah, actually it is. It's immediately intuitive to me. It makes string interpolation way easier. Quick, how do you do -d {object} and pass in environment variables with correct string escaping? Do you start with single quote or double quote? Where do I put backslashes? Bash vs zsh compatibility? Plus you have to make sure all the slashes, quotes, brackets and braces match.
Vs
--jp foo=$FOO --jp bar="baz-${BAR:-default-bar}" --jp date="\"$(date)\""
(I'm iffy on the last one, but it's WAY easier than trying to build that into an object)
- zimpenfish 5y ago> --jp date="\"$(date)\"" If it's going to properly crib `jo` syntax, you can just do `date="$(date)"` - no need for the second set of quotes (and, indeed, they'll mess it up.) > jo date="$(date)" {"date":"Thu 20 Jan 2022 20:59:16 GMT"} > jo date="\"$(date)\"" {"date":"\"Thu 20 Jan 2022 21:00:28 GMT\""}