Skip to content

Optional clipboard for Gitflow commands #44

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

Merged
merged 2 commits into from
Jan 6, 2022
Merged

Optional clipboard for Gitflow commands #44

merged 2 commits into from
Jan 6, 2022

Conversation

LuckyType
Copy link
Contributor

I really like the Hotkey shortcuts to create feature/hotfix/bugfix branches, but i think using the clipboard is rather inconvenient.
This is a really amature idea for reading the user input to set the branch name including a slugify method.

There could be a setting to enable either clipboard / read input and another setting to enable automaticly slugifying given names.
I tried to add those settings myself within the .gitnow config file but didn't really understand how the parsing works and have given up.

@joseluisq
Copy link
Owner

Agree, honestly the default clipboard feature doesn't convince me as a default.
So making it as an optional entry on the config file should be the way to go.

In order to do that you need to read the new line of chars that you want to introduce in the config file first.

If you don't understand that then I could try to help some of those days.

it deactivates and makes optional the clipboard functionality when
gitflow keybindings are used and instead it reads text from the
standard input by default.

it introduces a new "options" section in order to control the
"clipboard" and useful for future new additions.

example:

[ options ]

clipboard = false
@joseluisq joseluisq changed the title read user input for branch name Optional clipboard for Gitflow keybindings Jan 5, 2022
@joseluisq joseluisq self-assigned this Jan 5, 2022
@joseluisq joseluisq added the enhancement New feature or request label Jan 5, 2022
@joseluisq
Copy link
Owner

@LuckyType I have resolved your issue with the parser. You can have a look at 99b7a89 to see the changes involved.
So feel free to give a test. I also tested it so after your check we could merge this.

@joseluisq
Copy link
Owner

Also it's not necessary to use or duplicate __gitnow_slugify since it's already used by every Gitflow command internally.
__gitnow_gitflow_branch does it.

@joseluisq joseluisq merged commit 14eab0c into joseluisq:master Jan 6, 2022
@joseluisq
Copy link
Owner

Released on 2.10.0

@joseluisq joseluisq changed the title Optional clipboard for Gitflow keybindings Optional clipboard for Gitflow commands Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants