.nh .TH "glab" "1" "Dec 2025" "Auto generated by spf13/cobra" "" .SH NAME glab-alias-set - Set an alias for a longer command. .SH SYNOPSIS \fBglab alias set '\&' [flags]\fP .SH DESCRIPTION Declare a word as an alias for a longer command. .PP Your expansion might include arguments and flags. If your expansion includes positional placeholders such as \fB$1\fR or \fB$2\fR, any extra arguments that follow the invocation of an alias are inserted appropriately. .PP Specify \fB--shell\fR in your alias to run it through \fBsh\fR, a shell converter. Shell conversion enables you to compose commands with \fB|\fR or redirect with \fB>\fR, with these caveats: .IP \(bu 2 Any extra arguments following the alias are not passed to the expanded expression arguments by default. .IP \(bu 2 You must explicitly accept the arguments using \fB$1\fR, \fB$2\fR, and so on. .IP \(bu 2 Use \fB$@\fR to accept all arguments. .PP For Windows users only: .IP \(bu 2 On Windows, shell aliases are executed with \fBsh\fR as installed by Git For Windows. If you installed Git in some other way in Windows, shell aliases might not work for you. .IP \(bu 2 Always use quotation marks when defining a command, as in the examples. .SH OPTIONS \fB-s\fP, \fB--shell\fP[=false] Declare an alias to be passed through a shell interpreter. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .SH EXAMPLE .EX $ 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" .EE .SH SEE ALSO \fBglab-alias(1)\fP