diff --git a/features/search.feature b/features/search.feature index c5548819..22351b7e 100644 --- a/features/search.feature +++ b/features/search.feature @@ -285,12 +285,12 @@ Feature: Searching in a journal | basic_folder | | basic_dayone | - Scenario Outline: Reminiscing + Scenario Outline: Searching today in history Given we use the config ".yaml" And we use the password "test" if prompted And we set current date and time to "2020-08-31 14:32" When we run "jrnl 2019-08-31 01:01: Hi, from last year." - And we run "jrnl -reminisce --short" + And we run "jrnl -today-in-history --short" Then the output should be """ 2019-08-31 01:01 Hi, from last year. diff --git a/jrnl/args.py b/jrnl/args.py index 406ed72f..f934ca16 100644 --- a/jrnl/args.py +++ b/jrnl/args.py @@ -177,8 +177,8 @@ def parse_args(args=[]): "-on", dest="on_date", metavar="DATE", help="Show entries on this date" ) reading.add_argument( - "-reminisce", - dest="reminisce", + "-today-in-history", + dest="today_in_history", action="store_true", help="Show entries of today over the years", ) diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index 333d61d2..257358c4 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -78,7 +78,7 @@ def _is_write_mode(args, config, **kwargs): args.edit, args.export, args.end_date, - args.reminisce, + args.today_in_history, args.month, args.day, args.year, @@ -211,7 +211,7 @@ def _search_journal(args, journal, **kwargs): if args.on_date: args.start_date = args.end_date = args.on_date - if args.reminisce: + if args.today_in_history: now = time.parse("now") args.day = now.day args.month = now.month diff --git a/tests/test_parse_args.py b/tests/test_parse_args.py index c262fcc2..252638c9 100644 --- a/tests/test_parse_args.py +++ b/tests/test_parse_args.py @@ -18,7 +18,7 @@ def expected_args(**kwargs): "delete": False, "edit": False, "end_date": None, - "reminisce": False, + "today_in_history": False, "month": None, "day": None, "year": None, @@ -168,8 +168,8 @@ def test_year_alone(): assert cli_as_dict("-year 21") == expected_args(year="21") -def test_reminisce_alone(): - assert cli_as_dict("-reminisce") == expected_args(reminisce=True) +def test_today_in_history_alone(): + assert cli_as_dict("-today-in-history") == expected_args(today_in_history=True) def test_short_alone():