mirror of
https://github.com/simonmichael/hledger.git
synced 2025-01-04 08:13:20 +03:00
ref: tags test
This commit is contained in:
parent
7a1d5e66e5
commit
7b4ab1e37a
@ -1,28 +1,32 @@
|
||||
# tags command
|
||||
|
||||
2000/1/1 ; ttag:foo
|
||||
(a) 1 ; ptag:bar
|
||||
account a ; t1:v1
|
||||
|
||||
2000/1/2 ; ttag2:foo
|
||||
(a) 1 ; ptag:qux
|
||||
2000/1/1 ; t2:v2
|
||||
(b) 1 ; t3:v3
|
||||
|
||||
2000/1/2 ; t4:v4
|
||||
(b) 1 ; t5:v5
|
||||
|
||||
# 1. list all tags
|
||||
$ hledger -f - tags
|
||||
ptag
|
||||
ttag
|
||||
ttag2
|
||||
t2
|
||||
t3
|
||||
t4
|
||||
t5
|
||||
|
||||
# 2. list tag names matching a regex
|
||||
$ hledger -f - tags ttag
|
||||
ttag
|
||||
ttag2
|
||||
$ hledger -f - tags '[24]'
|
||||
t2
|
||||
t4
|
||||
|
||||
# 3. list tag values
|
||||
$ hledger -f - tags --values
|
||||
bar
|
||||
foo
|
||||
qux
|
||||
v2
|
||||
v3
|
||||
v4
|
||||
v5
|
||||
|
||||
# 4. list values of tags matching a regex from transactions matching a query
|
||||
$ hledger -f - tags --values ptag date:2000/1/1
|
||||
bar
|
||||
$ hledger -f - tags t3 date:2000/1/1 --values
|
||||
v3
|
||||
|
Loading…
Reference in New Issue
Block a user