kowainik / hit-on

:octocat: Kowainik Git Workflow Helper Tool
https://kowainik.github.io/projects/hit-on
Mozilla Public License 2.0
76 stars 13 forks source link

Improve `stash` command #135

Closed vrom911 closed 4 years ago

vrom911 commented 4 years ago

We can work on polishing this command. Let me know what do you think about what could be included :slightly_smiling_face:

chshersh commented 4 years ago

Ideally, I'd love to keep the current behavior: hit stash stashes and hit unstash unstashes. And those commands take an argument, then it's a named stash, like hit stash doc-fix. However, this means that we will need to implement separate commands, like hit stash-list, hit stash-clear. Alternatively, names can be passed as parameters and all commands will be nested. So two versions In short:

Version 1

hit stash
hit stash temp-fix
hit unstash
hit unstash temp-fix
hit stash-list
hit stash-diff

Version 2

hit stash
hit stash --name temp-fix
hit stash list
hit stash diff [Possible arguments]
hit stash clear

What would be the most convenient interface, you think? Also, I'm not sure whether optparse-applicative allows implementing the second version.