consider the following two commands:
$ ninja -t targets rule frontmatter | rg '!.md.json'
.build/2018-02-14-Speed-Up!.md.json
$ ninja -t inputs | rg '!.md.json'
'.build/2018-02-14-Speed-Up!.md.json'
in -t targets, the file path is printed as a literal string. in -t inputs, shell quoting rules are applied.
i think -t inputs is in the wrong here: the path is not embedded inside a command string, so there's no reason to quote it. but fixing it is probably hard due to backwards compatibility. maybe ninja could add a -t inputs-unquoted? or -t inputs could take an --unquoted flag?