Sublime Forum

Are non-git commands allowed?

#1

I have several custom commands and felt relatively comfortable with them until today. I decided I wanted a “View Pull Request” command, but I can’t get the option to show up in the command pallet.

{
  "caption": "View Pull Request\t gh pr view --web",
  "command": "gh",
  "args": {
    "argv": ["pr", "view", "--web"],
  }
}

I have observed that if command is anything other than “git” the command won’t show up. Is this expected?

0 Likes

#2

command is not a command line command, but instead a Sublime Merge command, just like insert, copy, etc.

The common workaround is to set up a git alias, which then runs your gh command.

0 Likes

#3

Cheers, friend. Thanks for clarifying. I’ve been reading the docs all wrong and have apparently succeeded up to now on pure luck!

0 Likes