Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
glab(1)								       glab(1)

NAME
       glab-alias-set -	Set an alias for a longer command.

SYNOPSIS
       glab alias set  '' [flags]

DESCRIPTION
       Declare a word as an alias for a	longer command.

       Use  quotation  marks  when you define a	command, as shown in the exam-
       ples.

       Your expansion can include arguments and	flags. If your	expansion  in-
       cludes  positional  placeholders	 such as $1 or $2, any extra arguments
       that follow the invocation of the alias are inserted into those	place-
       holders.

       To  run	an  alias  through  sh,	a shell	converter, specify the --shell
       flag. With shell	conversion, you	can compose commands with |  or	 redi-
       rect with >. Shell aliases have these caveats:

        Extra	arguments  that	 follow	the alias are not passed to the	expan-
	 sion.	To accept arguments, use $1, $2, and so	on.

        To accept all arguments, use $@.

       On Windows, shell aliases run through sh	as installed by	Git  for  Win-
       dows.  If  you  installed  Git in another way on	Windows, shell aliases
       might not work.

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

OPTIONS	INHERITED FROM PARENT COMMANDS
       -h, --help[=false]      Show help for this command.

EXAMPLE
       # Define	an alias for "mr view"
       glab alias set mrv 'mr view'
       # Run the alias;	it expands to "glab mr view -w 123"
       glab mrv	-w 123

       # Define	an alias with a	positional placeholder
       glab alias set createissue 'glab	create issue --title "$1"'
       # Run the alias with an argument	and an extra flag
       glab createissue	"My Issue" --description "Something is broken."

       # Define	a shell	alias that pipes glab output to	grep
       glab alias set --shell igrep 'glab issue	list --assignee="$1" | grep $2'
       # Run the shell alias with two arguments
       glab igrep user foo

SEE ALSO
       glab-alias(1)

Auto generated by spf13/cobra	   Jun 2026			       glab(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=glab-alias-set&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help