mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-27 21:16:14 +02:00
Get rid of --delete
This commit is contained in:
parent
fabb8d5f1b
commit
4d8949bbed
2 changed files with 12 additions and 38 deletions
|
@ -85,29 +85,19 @@ the last five entries containing both ``@pineapple`` **and** ``@lubricant``. You
|
|||
|
||||
``jrnl @pinkie @WorldDomination`` will switch to viewing mode because although **no** command line arguments are given, all the input strings look like tags - *jrnl* will assume you want to filter by tag.
|
||||
|
||||
Editing and deleting entries
|
||||
----------------------------
|
||||
Editing older entries
|
||||
---------------------
|
||||
|
||||
Deleting
|
||||
~~~~~~~~
|
||||
|
||||
|
||||
Use ``--delete`` to delete entries from your journal. This will only affect selected entries, e.g. ::
|
||||
|
||||
jrnl -n 1 --delete
|
||||
|
||||
will delete the last entry, ::
|
||||
|
||||
jrnl @girlfriend -until 'june 2012' --delete
|
||||
|
||||
will delete all entries tagged with ``@girlfriend`` written before June 2012. ``jrnl --delete`` would delete your **entire** journal, which is often not what you want. You will be shown the titles of the entries which are about to be deleted before you have to confirm the deletion.
|
||||
|
||||
Editing
|
||||
~~~~~~~
|
||||
|
||||
You can also edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted. To use this feature, you need to have an editor configured in your journal configuration file (see :doc:`advanced usage <advanced>`). It behaves the same way ``--delete`` does, ie. ::
|
||||
You can edit selected entries after you wrote them. This is particularly useful when your journal file is encrypted or if you're using a DayOne journal. To use this feature, you need to have an editor configured in your journal configuration file (see :doc:`advanced usage <advanced>`):
|
||||
|
||||
jrnl -until 1950 @texas -and @history --edit
|
||||
|
||||
Will edit all entries tagged with ``@texas`` and ``@history`` before 1950. Of course, if you are using multiple journals, you can also edit e.g. the entry of your work journal with ``jrnl work -n 1 --edit``. In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor.
|
||||
Will open your editor with all entries tagged with ``@texas`` and ``@history`` before 1950. You can make any changes to them you want; after you save the file and close the editor, your journal will be updated.
|
||||
|
||||
Of course, if you are using multiple journals, you can also edit e.g. the entry of your work journal with ``jrnl work -n 1 --edit``. In any case, this will bring up your editor and save (and, if applicable, encrypt) your edited journal after you save and exit the editor.
|
||||
|
||||
You can also use this feature for deleting entries from your journal::
|
||||
|
||||
jrnl @girlfriend -until 'june 2012' --edit
|
||||
|
||||
Just select all text, press delete, and everything is gone...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue