1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 18:56:52 +03:00

cli: Only show fq info for --help

This commit is contained in:
Mattias Wadman 2021-08-13 19:35:15 +02:00
parent 55cd45f675
commit 8d1fafe4b8
3 changed files with 7 additions and 16 deletions

View File

@ -365,12 +365,7 @@ def _main:
},
};
def _usage($arg0; $version):
( "fq - jq for binary"
, "Tool, language and decoders for querying and exploring binary data."
, "For more information see https://github.com/wader/fq"
, ""
, "Usage: \($arg0) [OPTIONS] [--] [EXPR] [FILE...]"
);
"Usage: \($arg0) [OPTIONS] [--] [EXPR] [FILE...]";
( . as {$version, $args, args: [$arg0]}
# make sure we don't unintentionally use . to make things clearer
| null
@ -400,7 +395,11 @@ def _main:
]
) as $_
| if $parsed_args.help then
( _usage($arg0; $version)
( "fq - jq for binary"
, "Tool, language and decoders for querying and exploring binary data."
, "For more information see https://github.com/wader/fq"
, ""
, _usage($arg0; $version)
, args_help_text(_opts($version))
) | println
elif $parsed_args.version then

View File

@ -1,9 +1,5 @@
/test.mp3:
$ fq
fq - jq for binary
Tool, language and decoders for querying and exploring binary data.
For more information see https://github.com/wader/fq
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
$ fq -h
fq - jq for binary
@ -42,10 +38,6 @@ null> ^D
$ fq -i . /test.mp3
mp3> ^D
$ fq -n
fq - jq for binary
Tool, language and decoders for querying and exploring binary data.
For more information see https://github.com/wader/fq
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
$ fq -ni
null> ^D

View File

@ -33,4 +33,4 @@ _start
_stop
_symbol
_unknown
mp3> ^D
mp3> ^D