Skip to content

Commit

Permalink
Update add --date command to include mnemonics
Browse files Browse the repository at this point in the history
  • Loading branch information
gangelo committed Feb 9, 2024
1 parent 3101a37 commit 5c3c3d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/dsu/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class CLI < BaseCLI
map I18n.t('commands.version.key_mappings') => :version

desc I18n.t('commands.add.desc'), I18n.t('commands.add.usage')
long_desc I18n.t('commands.add.long_desc', date_option_description: date_option_description)
long_desc I18n.t('commands.add.long_desc',
date_option_description: date_option_description, mnemonic_option_description: mnemonic_option_description)
option I18n.t('options.date.name'), aliases: I18n.t('options.date.aliases'), type: :string
option I18n.t('options.tomorrow.name'), aliases: I18n.t('options.tomorrow.aliases'), type: :boolean
option I18n.t('options.yesterday.name'), aliases: I18n.t('options.yesterday.aliases'), type: :boolean
Expand Down
8 changes: 5 additions & 3 deletions lib/locales/en/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@ en:
long_desc: |
Will add a DSU entry having DESCRIPTION to the date associated with the given OPTION.
$ dsu add [-d DATE|-n|-t|-y] DESCRIPTION
$ dsu add [-d DATE|MNEMONIC|-n|-t|-y] DESCRIPTION
$ dsu a [-d DATE|-n|-t|-y] DESCRIPTION
$ dsu a [-d DATE|MNEMONIC|-n|-t|-y] DESCRIPTION
OPTIONS:
-d DATE: Adds a DSU entry having DESCRIPTION to the DATE.
-d DATE|MNEMONIC: Adds a DSU entry having DESCRIPTION to the DATE or date referenced by the MNEMONIC.
%{date_option_description}
%{mnemonic_option_description}
-n: Adds a DSU entry having DESCRIPTION to today's date (`Time.now`).
-t: Adds a DSU entry having DESCRIPTION to tomorrow's date (`Time.new.tomorrow`).
Expand Down

0 comments on commit 5c3c3d0

Please sign in to comment.