Update some command line arguments to latest version and make it a bit more concise

This commit is contained in:
Micah Jerome Ellison 2020-10-10 13:34:42 -07:00
parent 6d5ea75e26
commit 30b6bc887c
2 changed files with 34 additions and 19 deletions

View file

@ -23,7 +23,7 @@ each tag occurred in this filtered journal. Finally, we pipe this to
You can do things like You can do things like
```sh ```sh
jrnl @fixed -starred -n 10 -until "jan 2013" --short jrnl @fixed -starred -n 10 -to "jan 2013" --short
``` ```
To get a short summary of the 10 most recent, favourited entries before To get a short summary of the 10 most recent, favourited entries before
@ -34,7 +34,7 @@ January 1, 2013 that are tagged with `@fixed`.
How much did I write last year? How much did I write last year?
```sh ```sh
jrnl -from "jan 1 2013" -until "dec 31 2013" | wc -w jrnl -from "jan 1 2013" -to "dec 31 2013" | wc -w
``` ```
Will give you the number of words you wrote in 2013. How long is my Will give you the number of words you wrote in 2013. How long is my

View file

@ -11,6 +11,8 @@ it. Filter arguments can be combined arbitrarily. Arguments with a _double dash_
arguments are mutually exclusive (i.e., you can only specify one way to display arguments are mutually exclusive (i.e., you can only specify one way to display
or export your journal at a time). or export your journal at a time).
For a list of commands, enter `jrnl --help`.
## Composing Entries ## ## Composing Entries ##
Composing mode is entered by either starting `jrnl` without any arguments -- Composing mode is entered by either starting `jrnl` without any arguments --
@ -56,10 +58,9 @@ Behind the scenes, `jrnl` reorganizes entries in chronological order.
### Using Tags ### ### Using Tags ###
`jrnl` supports tags. Note that because `#` is a reserved character, the default `jrnl` supports tags. The default tag symbol is `@` (largely because `#` is a
tag symbol is `@`. You can specify your own tag symbol in the configuration reserved character). You can specify your own tag symbol in the configuration
file. There is no limit to how many tags you can use in an entry. To use tags, file. To use tags, preface the desired tag with the symbol:
simply preface the desired tag with the symbol:
```sh ```sh
jrnl Had a wonderful day at the @beach with @Tom and @Anna. jrnl Had a wonderful day at the @beach with @Tom and @Anna.
@ -68,6 +69,8 @@ jrnl Had a wonderful day at the @beach with @Tom and @Anna.
Although you can use capitals while tagging an entry, searches by tag are Although you can use capitals while tagging an entry, searches by tag are
case-insensitive. case-insensitive.
There is no limit to how many tags you can use in an entry.
### Starring Entries ### ### Starring Entries ###
To mark an entry as a favorite, simply "star" it using an asterisk (`*`): To mark an entry as a favorite, simply "star" it using an asterisk (`*`):
@ -88,16 +91,17 @@ _now_), the following options are equivalent:
`jrnl Best day of my life! *` will not work because the `*` character has a `jrnl Best day of my life! *` will not work because the `*` character has a
special meaning in most shells. special meaning in most shells.
## Viewing Entries ## ## Viewing and Searching Entries ##
`jrnl` can display entries in a variety of ways. Entries are filtered using commands preceded by a single dash (`-`). Type `jrnl -h` for a list of `jrnl` can display entries in a variety of ways.
commands.
It is possible to see all entries by entering `jrnl -until today`. However, in To view all entries, enter:
most cases you will likely want to use a filter to see specific entries that ```sh
meet certain criteria. `jrnl` provides several filtering commands, prefaced by a jrnl -to today
single dash (`-`), that allow you to find exactly what you're looking for. For ```
example,
`jrnl` provides several filtering commands, prefaced by a single dash (`-`), that
allow you to find a more specific range of entries. For example,
```sh ```sh
jrnl -n 10 jrnl -n 10
@ -108,15 +112,20 @@ same way. If you want to see all of the entries you wrote from the beginning of
last year until the end of this past March, you would enter last year until the end of this past March, you would enter
```sh ```sh
jrnl -from "last year" -until march jrnl -from "last year" -to march
``` ```
Filter criteria that use more than one word require surrounding quotes (`""`). Filter criteria that use more than one word require surrounding quotes (`""`).
To see entries on a particular date, use `-on`:
```sh
jrnl -on yesterday
```
### Text Search ### ### Text Search ###
The `-contains` command displays all entries containing a specific string. This The `-contains` command displays all entries containing the text you enter after it.
may be helpful when you're searching for entries and you can't remember if you This may be helpful when you're searching for entries and you can't remember if you
tagged any words when you wrote them. tagged any words when you wrote them.
You may realize that you use a word a lot and want to turn it into a tag in all You may realize that you use a word a lot and want to turn it into a tag in all
@ -154,6 +163,12 @@ in the configuration.
of the input strings look like tags. `jrnl` will assume you want to filter of the input strings look like tags. `jrnl` will assume you want to filter
by tag, rather than create a new entry that consists only of tags. by tag, rather than create a new entry that consists only of tags.
To view a list of all tags in the journal, enter:
```sh
jrnl --tags
```
### Viewing Starred Entries ### ### Viewing Starred Entries ###
To display only your favorite (starred) entries, enter To display only your favorite (starred) entries, enter
@ -170,7 +185,7 @@ editor configured in your configuration file. You can also edit only the entries
that match specific search criteria. For example, that match specific search criteria. For example,
```sh ```sh
jrnl -until 1950 @texas -and @history --edit jrnl -to 1950 @texas -and @history --edit
``` ```
opens your external editor displaying all entries tagged with `@texas` and opens your external editor displaying all entries tagged with `@texas` and
@ -228,7 +243,7 @@ removed from the journal.
To list all of your journals: To list all of your journals:
```sh ```sh
jrnl -ls jrnl --list
``` ```
The journals displayed correspond to those specified in the `jrnl` configuration The journals displayed correspond to those specified in the `jrnl` configuration