From 442900338a5b8417b8b29a3d508ec6ed70bc2158 Mon Sep 17 00:00:00 2001 From: Greg Bodnar Date: Sun, 4 Aug 2019 15:23:33 +1200 Subject: [PATCH] Add doc about extracting timestamps with no spaces Timestamp formats may have no space between date and time components and cause the script to fail. --- docs/recipes.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/recipes.md b/docs/recipes.md index 2369789b..4c13e3b2 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -96,7 +96,10 @@ log_question 'What did I make progress with?' ### Display random entry You can use this to select one title at random and then display the whole -entry. +entry. The invocation of `cut` needs to match the format of the timestamp. +For timestamps that have a space between data and time components, select +fields 1 and 2 as shown. For timestamps that have no whitespace, select +only field 1. ``` sh jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)"