allow exec 'i.sh' without sourcing, add command help, introduce optional post-commit hook #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1
I thought this was a pretty cool project. i spend most of my time in the cli so its great for logging things. I have been making some tweaks to it myself on a fork: https://github.com/LrWm3/i
I added a git post-commit hook to log all commits made locally on any github project into 'i'. I found I was typing out my commit messages twice, once for git and once for i. I had trouble figuring out how to find and run 'i.sh' from the post-commit hook though, I ended up hard-coding the path to where I had saved it.
the nice thing about this is it makes it easy to summarize what I did over the week since I don't need to feed in the git history.
I adjusted 'i.sh' to allow for executing from the cli directly if it is run as a script. Sourcing still works. I found that was a bit easier to work with for the post-commit hook.
I added a help which is executed if arguments are help, -h or --help, or if nothing else is provided.
I added an 'automatic push' command that runs in the background silently if origin is configured as a remote. if no origin remote is configured, nothing is pushed.
cheers!
Still working through the changes to see the best way to have post-commit call
i.sh
. I will update the README.md for this later today.