mirror of
https://github.com/wader/fq.git
synced 2024-12-23 13:22:58 +03:00
Merge pull request #115 from wader/doc-example-usages
doc,interp: Add some example usages to cli help
This commit is contained in:
commit
2efc3cba9b
@ -298,6 +298,14 @@ For more information see https://github.com/wader/fq
|
||||
|
||||
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
||||
|
||||
Example usages:
|
||||
fq . file
|
||||
fq d file
|
||||
fq tovalue file
|
||||
cat file.cbor | fq -d cbor torepr
|
||||
fq 'grep("^main$") | parent' /bin/ls
|
||||
fq 'grep_by(format == "exif") | d' *.png *.jpeg
|
||||
|
||||
--arg NAME VALUE Set variable $NAME to string VALUE
|
||||
--argjson NAME JSON Set variable $NAME to JSON
|
||||
--color-output,-C Force color output
|
||||
|
@ -300,6 +300,14 @@ def _main:
|
||||
, ""
|
||||
, _usage($arg0)
|
||||
, ""
|
||||
, "Example usages:"
|
||||
, " fq . file"
|
||||
, " fq d file"
|
||||
, " fq tovalue file"
|
||||
, " cat file.cbor | fq -d cbor torepr"
|
||||
, " fq 'grep(\"^main$\") | parent' /bin/ls"
|
||||
, " fq 'grep_by(format == \"exif\") | d' *.png *.jpeg"
|
||||
, ""
|
||||
, args_help_text(_opt_cli_opts)
|
||||
) | println
|
||||
elif $opts.show_version then
|
||||
|
8
pkg/interp/testdata/args.fqtest
vendored
8
pkg/interp/testdata/args.fqtest
vendored
@ -9,6 +9,14 @@ For more information see https://github.com/wader/fq
|
||||
|
||||
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
||||
|
||||
Example usages:
|
||||
fq . file
|
||||
fq d file
|
||||
fq tovalue file
|
||||
cat file.cbor | fq -d cbor torepr
|
||||
fq 'grep("^main$") | parent' /bin/ls
|
||||
fq 'grep_by(format == "exif") | d' *.png *.jpeg
|
||||
|
||||
--arg NAME VALUE Set variable $NAME to string VALUE
|
||||
--argjson NAME JSON Set variable $NAME to JSON
|
||||
--color-output,-C Force color output
|
||||
|
Loading…
Reference in New Issue
Block a user