gh alias set

Create a shortcut for a gh command


Declare a word as a command alias that will expand to the specified command.

The expansion may specify additional arguments and flags. If the expansion includes positional placeholders such as ‘$1’, ‘$2’, etc., any extra arguments that follow the invocation of an alias will be inserted appropriately.

gh alias set <alias> <expansion> [flags]


$ gh alias set pv 'pr view'
$ gh pv -w 123
#=> gh pr view -w 123

$ gh alias set bugs 'issue list --label="bugs"'

$ gh alias set epicsBy 'issue list --author="$1" --label="epic"'
$ gh epicsBy vilmibm
#=> gh issue list --author="vilmibm" --label="epic"

Options inherited from parent commands

      --help              Show help for command
  -R, --repo OWNER/REPO   Select another repository using the OWNER/REPO format