]> git.sesse.net Git - plocate/blobdiff - serializer.cpp
Implement the -N/--literal option.
[plocate] / serializer.cpp
index f27a865a06e997bec1de0a408624b322c05a6dfb..7f3e88842da24ab9bf5d84360a8284bc1cf2061f 100644 (file)
@@ -32,7 +32,7 @@ void print_possibly_escaped(const string &str)
        if (print_nul) {
                printf("%s%c", str.c_str(), 0);
                return;
-       } else if (!stdout_is_tty) {
+       } else if (literal_printing || !stdout_is_tty) {
                printf("%s\n", str.c_str());
                return;
        }