Merge branch 'master' of github.com:simonmichael/hledger
This commit is contained in:
		
						commit
						f40a2b8d9d
					
				
							
								
								
									
										89
									
								
								MANUAL.md
									
									
									
									
									
								
							
							
						
						
									
										89
									
								
								MANUAL.md
									
									
									
									
									
								
							| @ -347,24 +347,23 @@ explained in the next section. | |||||||
| 
 | 
 | ||||||
| #### Tags | #### Tags | ||||||
| 
 | 
 | ||||||
| You can attach named tags, optionally with values, to transactions and | You can include *tags* (labels), optionally with values, | ||||||
| postings, and then filter reports by tag (this is the same as Ledger's | in transaction and posting comments, and then [query by tag](#queries). | ||||||
| [metadata](http://ledger-cli.org/3.0/doc/ledger3.html#Metadata) feature, | This is like Ledger's [metadata](http://ledger-cli.org/3.0/doc/ledger3.html#Metadata) | ||||||
| except our tag values are just strings.) | feature, except hledger's tag values are simple strings. | ||||||
| 
 | 
 | ||||||
| Tags names are unspaced words followed by a colon, anywhere within a | A tag is any unspaced word immediately followed by a full colon, eg: `sometag:` . | ||||||
| transaction or posting comment. Tag values are the (whitespace-trimmed) | A tag's *value* is the text following the colon, if any, until the next newline or comma, | ||||||
| text after a tag name, up to the next newline or comma (allowing multiple | with leading and trailing whitespace removed. Comma may be used to write multiple | ||||||
| tags on one line). For example: | tags on one line. | ||||||
| 
 | 
 | ||||||
|     1/1 a transaction    ; TAG1: , TAG2: tag2's value | For example, here is a transaction with three tags, the posting has | ||||||
|  | one, and all tags have values except TAG1: | ||||||
|  | 
 | ||||||
|  |     1/1 a transaction    ; TAG1:, TAG2: tag2's value | ||||||
|         ; TAG3: a third transaction tag |         ; TAG3: a third transaction tag | ||||||
|         a  $1  ; TAG4: a posting tag |         a  $1  ; TAG4: a posting tag | ||||||
| 
 | 
 | ||||||
| Querying by tag is work in progress; for now you can test for existence of |  | ||||||
| a tag with `tag:NAME`. |  | ||||||
| <!-- tag:NAME=EXACTVALUE` --> |  | ||||||
| 
 |  | ||||||
| #### Including other files | #### Including other files | ||||||
| 
 | 
 | ||||||
| You can pull in the content of additional journal files, by writing lines like this: | You can pull in the content of additional journal files, by writing lines like this: | ||||||
| @ -539,35 +538,61 @@ Here are some miscellaneous commands you might use to get started: | |||||||
| #### add | #### add | ||||||
| 
 | 
 | ||||||
| The add command prompts interactively for new transactions, and appends | The add command prompts interactively for new transactions, and appends | ||||||
| them to the journal file. Each transaction is appended when you complete | them to the journal file. Just run `hledger add` and follow the prompts. | ||||||
| it by entering `.` (period) at the account prompt.  Enter control-D or | You can add as many transactions as you like; when you are finished, | ||||||
| control-C when you are done. | press control-d or control-c to exit. | ||||||
| 
 | 
 | ||||||
| The add command tries to be helpful, providing: | Additional convenience features: | ||||||
| 
 | 
 | ||||||
| - Sensible defaults | - Sensible defaults are provided where possible. | ||||||
|  |   You can set the initial defaults by providing them as command line arguments. | ||||||
|  |   If there is a recent transaction with a description similar | ||||||
|  |   to the one you entered, it will be displayed and used for defaults. | ||||||
| 
 | 
 | ||||||
| - History awareness: if there are existing transactions approximately | - Readline-style edit keys may be used during data entry. | ||||||
|   matching the description you enter, they will be displayed and the best |  | ||||||
|   match will provide defaults for the other fields. If you specify a |  | ||||||
|   [query](#queries) on the command line, only matching transactions will |  | ||||||
|   be considered as history. |  | ||||||
| 
 | 
 | ||||||
| - Readline-style input: during data entry, the usual editing keys should | - While entering account names, the tab key will auto-complete or list | ||||||
|   work. |   the available completions, based on the existing transactions. | ||||||
| 
 | 
 | ||||||
| - Auto-completion for account names: while entering account names, the tab | - If the journal defines a [default commodity](#default-commodity), | ||||||
|   key will auto-complete as far as possible, or list the available |   it will be added to any bare numbers entered. | ||||||
|   options. |  | ||||||
| 
 | 
 | ||||||
| - Default commodity awareness: if the journal has a | - A code (in parentheses) may be entered at the Date: prompt, following the date. | ||||||
|   [default commodity directive](#default-commodity), that will be applied |   Comments and/or tags may be entered following a date or amount. | ||||||
|   to any bare numbers entered. |  | ||||||
| 
 | 
 | ||||||
| Examples: | - If you make a mistake, enter `<` at any prompt to restart the transaction. | ||||||
|  | 
 | ||||||
|  | An example: | ||||||
| 
 | 
 | ||||||
|     $ hledger add |     $ hledger add | ||||||
|  |     (...) | ||||||
|  |     Starting a new transaction. | ||||||
|  |     date ? [2013/04/09]:  | ||||||
|  |     description ? : starbucks | ||||||
| 
 | 
 | ||||||
|  |     Using this existing transaction for defaults: | ||||||
|  |     2012/04/19 * starbucks | ||||||
|  |     expenses:personal:food:snacks         $3.70 | ||||||
|  |     assets:cash:wallet                   $-3.70 | ||||||
|  | 
 | ||||||
|  |     account 1 ? [expenses:personal:food:snacks]:  | ||||||
|  |     amount  1 ? [$3.7]:  | ||||||
|  |     account 2 ? [assets:cash:wallet]:  | ||||||
|  |     amount  2 ? [$-3.7]:  | ||||||
|  |     account 3 (or . to complete this transaction) ? : . | ||||||
|  | 
 | ||||||
|  |     Transaction entered: | ||||||
|  |     2013/04/09 starbucks | ||||||
|  |     expenses:personal:food:snacks          $7.7 | ||||||
|  |     assets:cash:wallet                    $-7.7 | ||||||
|  | 
 | ||||||
|  |     Accept this transaction ? [y]:  | ||||||
|  |     Added to the journal. | ||||||
|  | 
 | ||||||
|  |     Starting a new transaction. | ||||||
|  |     date ? [2013/04/09]: <CTRL-D> | ||||||
|  |     $ | ||||||
|  |      | ||||||
| #### test | #### test | ||||||
| 
 | 
 | ||||||
| This command runs hledger's built-in unit tests and displays a quick | This command runs hledger's built-in unit tests and displays a quick | ||||||
|  | |||||||
| @ -15,6 +15,7 @@ | |||||||
|         </script> |         </script> | ||||||
|     </head> |     </head> | ||||||
|     <body> |     <body> | ||||||
|  |         <a href="https://github.com/simonmichael/hledger"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a> | ||||||
|         <div style="text-align:center;"> |         <div style="text-align:center;"> | ||||||
|              <!-- <a href="/"><img src="/logo.jpg" border="0" ALT="" /></a> --> |              <!-- <a href="/"><img src="/logo.jpg" border="0" ALT="" /></a> --> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user