Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow exec 'i.sh' without sourcing, add command help, introduce optional post-commit hook #2

Merged
merged 11 commits into from
Sep 10, 2023

Conversation

LrWm3
Copy link
Contributor

@LrWm3 LrWm3 commented Sep 6, 2023

#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.

i.sh Outdated Show resolved Hide resolved
i.sh Outdated Show resolved Hide resolved
LrWm3 and others added 2 commits September 7, 2023 13:59
Co-authored-by: Pete Griffiths <kungfusheep@users.noreply.github.com>
Co-authored-by: Pete Griffiths <kungfusheep@users.noreply.github.com>
@kungfusheep kungfusheep merged commit ebe46f5 into kungfusheep:main Sep 10, 2023
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