101 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			101 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ## parsing
 | |
| 
 | |
| # 1. transactions and postings have status marks which are nothing, ! or *
 | |
| hledger -fstatus.journal print
 | |
| >>>
 | |
| 2017/01/01 uncleared
 | |
|     (a)               1
 | |
|     (b)               1
 | |
| 
 | |
| 2017/01/02 ! pending
 | |
|     (a)               1
 | |
|     ! (b)             1
 | |
| 
 | |
| 2017/01/03 * cleared
 | |
|     (a)               1
 | |
|     * (b)             1
 | |
| 
 | |
| >>>=0
 | |
| 
 | |
| # 2. other characters will be considered part of the description
 | |
| hledger -f- print desc:%
 | |
| <<<
 | |
| 2017/01/01 % 
 | |
| >>>
 | |
| 2017/01/01 %
 | |
| 
 | |
| >>>=0
 | |
| 
 | |
| ## matching with flags
 | |
| 
 | |
| # 3. --cleared matches * only
 | |
| hledger -fstatus.journal print --cleared
 | |
| >>>
 | |
| 2017/01/03 * cleared
 | |
|     (a)               1
 | |
|     * (b)             1
 | |
| 
 | |
| >>>=0
 | |
| 
 | |
| # 4. --pending matches ! only
 | |
| hledger -fstatus.journal print --pending
 | |
| >>>
 | |
| 2017/01/02 ! pending
 | |
|     (a)               1
 | |
|     ! (b)             1
 | |
| 
 | |
| >>>=0
 | |
| 
 | |
| # 5. --uncleared matches everything but *
 | |
| hledger -fstatus.journal print --uncleared
 | |
| >>>
 | |
| 2017/01/01 uncleared
 | |
|     (a)               1
 | |
|     (b)               1
 | |
| 
 | |
| >>>=0
 | |
| 
 | |
| # 6. only one of these flags (the last) takes effect
 | |
| hledger -fstatus.journal register --uncleared --pending --cleared
 | |
| >>>
 | |
| 2017/01/03 cleared              (a)                              1             1
 | |
|                                 (b)                              1             2
 | |
| >>>= 0
 | |
| 
 | |
| # 7. these flags work with other commands
 | |
| hledger -fstatus.journal balance -N --uncleared
 | |
| >>>
 | |
|                    1  a
 | |
|                    1  b
 | |
| >>>=0
 | |
| 
 | |
| ## matching with status: query
 | |
| 
 | |
| # 8. status:* matches * only
 | |
| hledger -fstatus.journal print status:*
 | |
| >>>
 | |
| 2017/01/03 * cleared
 | |
|     (a)               1
 | |
|     * (b)             1
 | |
| 
 | |
| >>>=0
 | |
| 
 | |
| # 9. status:! matches ! only
 | |
| hledger -fstatus.journal print status:!
 | |
| >>>
 | |
| 2017/01/02 ! pending
 | |
|     (a)               1
 | |
|     ! (b)             1
 | |
| 
 | |
| >>>=0
 | |
| 
 | |
| # 10. status: matches unmarked only
 | |
| hledger -fstatus.journal print status:
 | |
| >>>
 | |
| 2017/01/01 uncleared
 | |
|     (a)               1
 | |
|     (b)               1
 | |
| 
 | |
| >>>=0
 | |
| 
 |