← 返回命令列表

Linux command

gh-alias 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List aliases

gh alias list

Set an alias

gh alias set [name] "[command]"

Delete an alias

gh alias delete [name]

Set with shell expansion

gh alias set --shell [name] "[shell command]"

说明

gh alias manages command aliases for the GitHub CLI. Create shortcuts for frequently used or complex commands to streamline your GitHub workflow. Aliases can simplify multi-step operations, provide shorthand for common tasks, and customize the CLI to match your development patterns. Shell aliases support piping and advanced command composition, while regular aliases work with gh subcommands and flags.

参数

--shell
Expand as shell command.

FAQ

What is the gh-alias command used for?

gh alias manages command aliases for the GitHub CLI. Create shortcuts for frequently used or complex commands to streamline your GitHub workflow. Aliases can simplify multi-step operations, provide shorthand for common tasks, and customize the CLI to match your development patterns. Shell aliases support piping and advanced command composition, while regular aliases work with gh subcommands and flags.

How do I run a basic gh-alias example?

Run `gh alias list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --shell do in gh-alias?

Expand as shell command.