1
1
mirror of https://github.com/wader/fq.git synced 2024-11-27 06:04:47 +03:00

cli: Better decode error help

This commit is contained in:
Mattias Wadman 2022-11-02 12:28:53 +01:00
parent 0b5a2d2719
commit 41b2d1ad1b
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ def input:
| [ $opts.decode_format
, if $err | _is_string then ": \($err)"
# TODO: if not string assume decode itself failed for now
else ": failed to decode (try -d FORMAT)"
else ": failed to decode: try fq -d FORMAT to force format, see fq -h formats for list"
end
] | join("")
| (_error_str([$name]) | printerrln)

View File

@ -80,7 +80,7 @@ null
$ fq . a
exitcode: 4
stderr:
error: a: probe: failed to decode (try -d FORMAT)
error: a: probe: failed to decode: try fq -d FORMAT to force format, see fq -h formats for list
$ fq -i -d raw . a b c
raw, ...[0:3][]> ._format
"raw"
@ -98,4 +98,4 @@ exitcode: 4
stdin:
test
stderr:
error: <stdin>: probe: failed to decode (try -d FORMAT)
error: <stdin>: probe: failed to decode: try fq -d FORMAT to force format, see fq -h formats for list