;bal: doc: add -f options; clarify depth limiting
This commit is contained in:
		
							parent
							
								
									df6667232f
								
							
						
					
					
						commit
						88b1d3f78b
					
				| @ -82,10 +82,11 @@ at the end of the journal period (more on this below). | |||||||
| 
 | 
 | ||||||
| Accounts are sorted by [declaration order](#declaring-accounts) | Accounts are sorted by [declaration order](#declaring-accounts) | ||||||
| if any, and then alphabetically by account name. | if any, and then alphabetically by account name. | ||||||
| For instance, using [examples/sample.journal](https://github.com/simonmichael/hledger/blob/master/examples/sample.journal): | For instance  | ||||||
|  | (using [examples/sample.journal](https://github.com/simonmichael/hledger/blob/master/examples/sample.journal)): | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger bal | $ hledger -f examples/sample.journal bal | ||||||
|                   $1  assets:bank:saving |                   $1  assets:bank:saving | ||||||
|                  $-2  assets:cash |                  $-2  assets:cash | ||||||
|                   $1  expenses:food |                   $1  expenses:food | ||||||
| @ -102,7 +103,7 @@ mode - see below) are hidden by default. Use `-E/--empty` to show them | |||||||
| (revealing `assets:bank:checking` here): | (revealing `assets:bank:checking` here): | ||||||
|   |   | ||||||
| ```shell | ```shell | ||||||
| $ hledger -f examples/sample.journal  bal  -E | $ hledger -f examples/sample.journal bal  -E | ||||||
|                    0  assets:bank:checking |                    0  assets:bank:checking | ||||||
|                   $1  assets:bank:saving |                   $1  assets:bank:saving | ||||||
|                  $-2  assets:cash |                  $-2  assets:cash | ||||||
| @ -125,7 +126,7 @@ arguments or [options](#report-start--end-date) to limit | |||||||
| the postings being matched. Eg: | the postings being matched. Eg: | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger bal --cleared assets date:200806 | $ hledger -f examples/sample.journal bal --cleared assets date:200806 | ||||||
|                  $-2  assets:cash |                  $-2  assets:cash | ||||||
| -------------------- | -------------------- | ||||||
|                  $-2   |                  $-2   | ||||||
| @ -140,7 +141,7 @@ With `-t/--tree`, the account hierarchy is shown, with subaccounts' | |||||||
| "leaf" names indented below their parent: | "leaf" names indented below their parent: | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger balance | $ hledger -f examples/sample.journal balance | ||||||
|                  $-1  assets |                  $-1  assets | ||||||
|                   $1    bank:saving |                   $1    bank:saving | ||||||
|                  $-2    cash |                  $-2    cash | ||||||
| @ -172,26 +173,32 @@ sum of the top-level balances shown, not of all the balances shown. | |||||||
| 
 | 
 | ||||||
| ### Depth limiting | ### Depth limiting | ||||||
| 
 | 
 | ||||||
| With a `depth:N` query, or `--depth N` option, or just `-N`,  | With a `depth:NUM` query, or `--depth NUM` option, or just `-NUM` (eg: `-3`) | ||||||
| balance reports will show accounts only to the specified depth, | balance reports will show accounts only to the specified depth, | ||||||
| hiding the deeper subaccounts.  | hiding the deeper subaccounts.  | ||||||
|  | This can be useful for getting an overview without too much detail. | ||||||
|  | 
 | ||||||
| Account balances at the depth limit always include the balances from | Account balances at the depth limit always include the balances from | ||||||
| any hidden subaccounts (even in list mode).  | any deeper subaccounts (even in list mode).  | ||||||
| This can be useful for getting an overview. Eg, limiting to depth 1: | Eg, limiting to depth 1: | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger balance -N -1 | $ hledger -f examples/sample.journal balance -1 | ||||||
|                  $-1  assets |                  $-1  assets | ||||||
|                   $2  expenses |                   $2  expenses | ||||||
|                  $-2  income |                  $-2  income | ||||||
|                   $1  liabilities |                   $1  liabilities | ||||||
|  | -------------------- | ||||||
|  |                    0   | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| You can also hide top-level account name parts, using `--drop N`. | ### Dropping top-level accounts | ||||||
|  | 
 | ||||||
|  | You can also hide one or more top-level account name parts, using `--drop NUM`. | ||||||
| This can be useful for hiding repetitive top-level account names: | This can be useful for hiding repetitive top-level account names: | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger bal expenses --drop 1 | $ hledger -f examples/sample.journal bal expenses --drop 1 | ||||||
|                   $1  food |                   $1  food | ||||||
|                   $1  supplies |                   $1  supplies | ||||||
| -------------------- | -------------------- | ||||||
| @ -208,7 +215,7 @@ With a [report interval](#report-intervals) (set by the `-D/--daily`, | |||||||
| representing successive time periods (and a title): | representing successive time periods (and a title): | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger balance --quarterly income expenses -E | $ hledger -f examples/sample.journal bal --quarterly income expenses -E | ||||||
| Balance changes in 2008: | Balance changes in 2008: | ||||||
| 
 | 
 | ||||||
|                    ||  2008q1  2008q2  2008q3  2008q4  |                    ||  2008q1  2008q2  2008q3  2008q4  | ||||||
| @ -333,7 +340,7 @@ With `-%/--percent`, balance reports show each account's value | |||||||
| expressed as a percentage of the (column) total: | expressed as a percentage of the (column) total: | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger bal expenses -Q -% | $ hledger -f examples/sample.journal bal expenses -Q -% | ||||||
| Balance changes in 2008: | Balance changes in 2008: | ||||||
| 
 | 
 | ||||||
|                    || 2008Q1   2008Q2  2008Q3  2008Q4  |                    || 2008Q1   2008Q2  2008Q3  2008Q4  | ||||||
| @ -771,7 +778,7 @@ you can use `--format FMT` to customise the format and content of each | |||||||
| line. Eg: | line. Eg: | ||||||
| 
 | 
 | ||||||
| ```shell | ```shell | ||||||
| $ hledger balance --format "%20(account) %12(total)" | $ hledger -f examples/sample.journal balance --format "%20(account) %12(total)" | ||||||
|               assets          $-1 |               assets          $-1 | ||||||
|          bank:saving           $1 |          bank:saving           $1 | ||||||
|                 cash          $-2 |                 cash          $-2 | ||||||
|  | |||||||
| @ -712,11 +712,11 @@ $ hledger register checking -p "every 3rd day of week" | |||||||
| 
 | 
 | ||||||
| # DEPTH | # DEPTH | ||||||
| 
 | 
 | ||||||
| With the `--depth N` option (short form: `-N`), commands like [account](#account), [balance](#balance) | With the `--depth NUM` option (short form: `-NUM`),  | ||||||
| and [register](#register) will show only the uppermost accounts in the account | commands like [account](#account), [balance](#balance) and [register](#register)  | ||||||
| tree, down to level N. Use this when you want a summary with less detail. | will show only the uppermost accounts in the account tree, down to level NUM.  | ||||||
| This flag has the same effect as a `depth:` query argument | Use this when you want a summary with less detail. | ||||||
| (so `-2`, `--depth=2` or `depth:2` are equivalent). | This flag has the same effect as a `depth:` query argument: `depth:2`, `--depth=2` or `-2` are equivalent. | ||||||
| 
 | 
 | ||||||
| # QUERIES | # QUERIES | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user