# gh alias set

Turn long commands into shortcuts.

## Quick answer
```
gh alias set prs 'pr list --author @me'
```

## Syntax
```
gh alias set <alias> <expansion> [flags]
```

## Examples

# Alias for your own open PRs
gh alias set prs 'pr list --author @me'

# Alias with a positional argument
gh alias set co 'pr checkout $1'

# Bugs alias filtering by label
gh alias set bugs 'issue list --label bug'

# Wrap a full shell command
gh alias set sync '!git pull && git push'

# Overwrite an existing alias
gh alias set prs 'pr list --author @me' --clobber

## Key flags

  -s, --shell	Interpret the expansion as a shell command (also enabled with a leading !).
  --clobber	Overwrite an existing alias of the same name.

Full guide: https://ghcli.com/gh-alias-set.php
