gerrymander icon indicating copy to clipboard operation
gerrymander copied to clipboard

Idea: contextual invocation if a command is being run from a local repo

Open grdryn opened this issue 10 years ago • 1 comments

Here's an example of what I'm thinking of:

Currently I run:

gerrymander todo-mine -p my/project/example

If my current directory is a git repo with my/project/example as a remote (just origin or maybe others), then the following could have the same effect as the above:

gerrymander todo-mine

Then to get the original version of the no-project-specified todo-mine command, would be something like:

gerrymander todo-mine -a

...or something else to specify that results from all projects should be returned.

Of course, this could also be (and maybe should be) done as git aliases per local repository.

Does that make sense, or is it silly?

grdryn avatar May 21 '14 11:05 grdryn

I think I'd probably suggest we define a magic project name eg "$GIT", and then we'd auto-expand that name to the name of the current git repository. Then you could edit you $HOME/.gerrymander config so that it set 'project = $GIT' for the commands, so you'd have this behaviour by default

berrange avatar May 21 '14 11:05 berrange