sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
276 stars 14 forks source link

allow git commands from the command palette #889

Open br4nnigan opened 4 years ago

br4nnigan commented 4 years ago

so far you cannot execute custom git commands, and it weirds me out.

It would merge perfectly with the existing funtionality. Suggest pre made commands, but let the user type their own if they want.

centur commented 4 years ago

+1. have to create my own commands if I want to execute something repeatedly in my repo. Alternatively - allow some special token to be added to "args" in custom commands which will be replaced by whatever user would type in command pallete window - so custom command would look like

{
    "caption": "GIT Reset to hash",
    "command": "git",
    "args": {
      "argv": [
        "reset",
        "--hard",
        $UserInputHere
      ]
    }
  },

and we can type in command pallete something similar to GIT reset to hash 123abc

then the feature above can be implemented as custom command with

...
 "args": {
      "argv": [
        $UserInputHere
      ]
    }
...
stinos commented 4 years ago

Ha I just started typing a feature request enabling typing of git alias commands in the command pallette, but this is the same basically. For reference this was the preffereed solution I was requesting:

A way to enter a 'special' command palette mode in which the typed text is passed to git directly. A natural way for entering that mode would be by entering git. So, workflow is simply: Ctrl-P, type git <somecommand>, press Enter and then SublimeMerge just executes that as-is, in the current repository directory.