Skip to content

Commit

Permalink
jq: Add doc filter [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
sebn committed Jul 3, 2018
1 parent b7d23be commit 1ec636b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .jq
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ def msg(pattern):
def time(pattern):
select(.time | test(pattern));

# Filter things with an attached doc and return it:
#
# yarn jq 'Pouch|doc' path/to/logs*
#
def doc:
select(.doc) | .doc;

# Get a global overview of another filter:
#
# yarn -s jq -c 'select(...)|short' path/to/logs*
Expand Down

0 comments on commit 1ec636b

Please sign in to comment.