Skip to content

Adding Git Style Messages#70

Open
onshorechet wants to merge 1 commit into
zenhob:masterfrom
onshorechet:feature/git_style_messages
Open

Adding Git Style Messages#70
onshorechet wants to merge 1 commit into
zenhob:masterfrom
onshorechet:feature/git_style_messages

Conversation

@onshorechet

Copy link
Copy Markdown

Like git when a command that can take a note as an argument does not
contain a note as an argument the user is prompted with their default editor to add
or edit the existing note depending on the command used.

If start is used the note is defaulted to blank if left blank no note is
set.

If stop the existing note is used to populate the editor. Changes to
this note will overwrite the existing note, not append.

If a note is included in either start or stop the command behave as normal appending the note
argument to the entry.

Like git when a command that can take a note as an agrument does note
include the note the user is prompted with their default editior to add
or edit the existing note depending on the command used.

If start is used the note is defaulted to blank if left blank no note is
set.

If stop the existing note is used to populate the editor.  Changes to
this note will overwrite the existing note, not append
@zenhob

zenhob commented Dec 16, 2015

Copy link
Copy Markdown
Owner

Thanks so much for the patch! I'm busy right now but I'll get to this soon.

Comment thread Rakefile
end

require 'rake/testtask'
ENV['EDITOR'] = ''

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that this sets EDITOR globally for the Rakefile, because it's executed at the top level. This is probably not what is intended.

Comment thread lib/hcl/commands.rb
if task.nil?
fail "Unknown task alias, try one of the following: ", aliases.join(', ')
end
note = args.join(' ')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good functionality but it repeats a lot of code. You should consider creating a helper method of some kind that does most of the heavy lifting, and then your repeated pattern is just a method call.

@zenhob

zenhob commented Feb 6, 2017

Copy link
Copy Markdown
Owner

This is a great idea, but this patch needs some work. I've offered a few comments, but since it's been literally years I understand if you're over it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants