stup icon indicating copy to clipboard operation
stup copied to clipboard

Add configuration option to show last notes when not available for a given date

Open ioanniswd opened this issue 4 years ago • 9 comments

When on Monday, while not having worked on the weekend, I would like to be able to run stup show and see what I noted on Friday.

ioanniswd avatar Apr 30 '20 08:04 ioanniswd

Doesn't it ask you if you want to see last notes (i.e. if none for the weekend are present, those from Friday)?

ghost avatar Apr 30 '20 09:04 ghost

I think it would be nice to add a configuration setting show_last_when_missing with values true/false.

When in effect, the show action should inform that it didn't find notes for the given date and that it will show the notes found at the latest date with notes before the given one without prompting for confirmation.

iridakos avatar Apr 30 '20 09:04 iridakos

What about making it more general (edit file etc.)? Something like --assume-yes and --assume-no.

ghost avatar Apr 30 '20 09:04 ghost

@tiosgz Nice idea! I will open an issue to allow this flag and respect in those paths that we would expect y/n.

This issue though is very valid (regardless of the aforementioned flag). Users should be able to default to latest date notes without having to always append --assume-yes/--assume-no

iridakos avatar Apr 30 '20 14:04 iridakos

@all-contributors please add @ioanniswd for ideas.

iridakos avatar Apr 30 '20 14:04 iridakos

@iridakos

I've put up a pull request to add @ioanniswd! :tada:

allcontributors[bot] avatar Apr 30 '20 14:04 allcontributors[bot]

The config for show_last_when_missing seems ideal.

ioanniswd avatar Apr 30 '20 19:04 ioanniswd

@ioanniswd I can work on this but if you have already started working on this let me know to skip, thanks!

iridakos avatar May 01 '20 01:05 iridakos

Was this fixed with 97c60287cda1318620b5b2aa9806fa4cb272de08 ?

ioanniswd avatar Oct 18 '21 16:10 ioanniswd