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

RFC: rename the binary to git-conventional-commit, retaining git-cc as a symlink/alias #1

Open
SKalt opened this issue Dec 13, 2020 · 3 comments

Comments

@SKalt
Copy link
Owner

SKalt commented Dec 13, 2020

The name git-cc doesn't tell you what it does. cc could stand for anything, from email's carbon-copy to cubic centimeters. Worse still, cc is impractically short for tab-completion. git c<tab> brings up all the git subcommand which start with c, with cc somewhere below the top of the list.

Proposal: rename the binary to git-conventional-commit, with git-cc retained as a symlink and/or git-alias. That way, git conv<tab> will complete to git conventional-commit without additional configuration, while git cc [...] will still work normally. Based on my initial experimentation, symlinking git-conventional-commit -> git-cc breaks git tab-completion in bash/zsh, likely due to the symlink's file-mode being different than just a user-executable file: I got lrwxrwxrwx

To avoid renaming the binary, you could git config --global alias.conventional-commit 'cc'. However, that's another installation step in a tool that's meant to be maximally convenient.

To my ~1-2 users: Thoughts?

@SKalt
Copy link
Owner Author

SKalt commented Dec 20, 2020

Thanks to all who contributed -- there were some good ideas in there! Having listened to the community's concerns, I'm going to go straight ahead and do what I intended to do anyway. /s

@SKalt
Copy link
Owner Author

SKalt commented Dec 30, 2020

update: turns out adding zsh/bash completion requires adding or appending a new bash/zsh function or script to a specific location in the host filesystem. I'm uncomfortable implementing that as the default: I'd rather maintain a single binary rather than wrangle script that run on package installation, symlinks, etc. I'm going to add make a note about completion in the readme and maybe add an aliasing option to the download-and-install script.

@SKalt
Copy link
Owner Author

SKalt commented Mar 27, 2022

It looks like it would be possible to

  1. create a git-conventional-changelog setup [git-alias|$SHELL-completion] subcommand
  2. run said git-conventional-changelog setup subcommand in a postinstall hook defined in a linux package postinstall script

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

No branches or pull requests

1 participant