diff --git a/pkg/interp/internal.jq b/pkg/interp/internal.jq index a929ed41..461e2628 100644 --- a/pkg/interp/internal.jq +++ b/pkg/interp/internal.jq @@ -26,7 +26,7 @@ def printerr: tostring | _stderr; def printerrln: ., "\n" | printerr; # jq compat -def debug: (["DEBUG", .] | tojson | printerrln), .; +def debug: (["DEBUG:", .] | tojson | printerrln), .; def debug(f): (f | debug | empty), .; # output raw string or compact json to stderr and let input thru def stderr: printerr, .; diff --git a/pkg/interp/testdata/debug.fqtest b/pkg/interp/testdata/debug.fqtest index d7e26aed..dcbe9037 100644 --- a/pkg/interp/testdata/debug.fqtest +++ b/pkg/interp/testdata/debug.fqtest @@ -11,8 +11,8 @@ null> {a: 123, b: []} | debug({a}) } null> ^D stderr: -["DEBUG",{"a":123,"b":[]}] -["DEBUG",{"a":123}] +["DEBUG:",{"a":123,"b":[]}] +["DEBUG:",{"a":123}] $ fq -n 'null, {a:1}, "abc" | ., "\n" | print' null {"a":1}