glab-alias-set - Man Page

Set an alias for a longer command.

Synopsis

glab alias set  '' [flags]

Description

Declare a word as an alias for a longer command.

Your expansion might include arguments and flags. If your expansion includes positional placeholders such as '$1' or '$2', any extra arguments that follow the invocation of an alias are inserted appropriately.

Specify '--shell' in your alias to run it through 'sh', a shell converter. Shell conversion enables you to compose commands with "|" or redirect with ">", with these caveats:

For Windows users only:

Options

-s, --shell[=false] Declare an alias to be passed through a shell interpreter.

Options Inherited from Parent Commands

--help[=false] Show help for this command.

Example

$ glab alias set mrv 'mr view'
$ glab mrv -w 123
# glab mr view -w 123

$ glab alias set createissue 'glab create issue --title "$1"'
$ glab createissue "My Issue" --description "Something is broken."
# => glab create issue --title "My Issue" --description "Something is broken."

$ glab alias set --shell igrep 'glab issue list --assignee="$1" | grep $2'
$ glab igrep user foo
# glab issue list --assignee="user" | grep "foo"

See Also

glab-alias(1)

Referenced By

glab-alias(1).

Oct 2024 Auto generated by spf13/cobra