stgit
stgit copied to clipboard
Extensible CLI
Could it be possible to have a mechanism similar to the one git has, such that when stg does not know a command cmd, it tries to see if stg-cmd is available though PATH?
Use case: having a dedicated command for
stg push $(stg series -U | cut -c 3- | fzf)
I could make it a git subcommand, but having to use both git and stg is a bit cumbersome, so having to call stg through git can quickly give one a headache I’m afraid.
This is an interesting idea, @lthms. I think it is worth looking into. My next step will be look at the mechanism git uses to do this and evaluate whether it is readily portable to StGit.
I had the opportunity to implement that once in clap and if I remember correctly, it was pretty straightforward. I can try to have a look this week-end.
allow_external_subcommands does most of the work