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

FreeBSD Manual Pages

  
 
  

home | help
gh(1)Aug(2020)							gh(1)Aug(2020)

Auto generated by spf13/cobra

NAME
       gh-alias-set - Create a shortcut	for a gh command

SYNOPSIS
       gh alias	set   [flags]

DESCRIPTION
       Declare	a  word	 as  a command alias that will expand to the specified
       command(s).

       The expansion may specify additional arguments and flags. If the	expan-
       sion includes positional	placeholders such as '$1', '$2', etc., any ex-
       tra arguments that follow the invocation	of an alias will  be  inserted
       appropriately.

       If '--shell' is specified, the alias will be run	through	a shell	inter-
       preter (sh). This allows	you to compose commands	with "|"  or  redirect
       with ">". Note that extra arguments following the alias will not	be au-
       tomatically passed to the expanded expression. To have  a  shell	 alias
       receive	arguments,  you	 must explicitly accept	them using "$1", "$2",
       etc., or	"$@" to	accept all of them.

       Platform	note: on Windows, shell	aliases	are executed via "sh"  as  in-
       stalled	by  Git	 For  Windows. If you have installed git on Windows in
       some other way, shell aliases may not work for you.

       Quotes must always be used when defining	a command as in	the examples.

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

OPTIONS	INHERITED FROM PARENT COMMANDS
       --help[=false]	   Show	help for command

EXAMPLE
	      $	gh alias set pv	'pr view'
	      $	gh pv -w 123
	      #=> gh pr	view -w	123

	      $	gh alias set bugs 'issue list --label="bugs"'

	      $	gh alias set epicsBy 'issue list --author="$1" --label="epic"'
	      $	gh epicsBy vilmibm
	      #=> gh issue list	--author="vilmibm" --label="epic"

	      $	gh alias set --shell igrep 'gh issue list --label="$1" | grep $2'
	      $	gh igrep epic foo
	      #=> gh issue list	--label="epic" | grep "foo"

SEE ALSO
       gh-alias(1)

HISTORY
       31-Aug-2020 Auto	generated by spf13/cobra

								gh(1)Aug(2020)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPTIONS INHERITED FROM PARENT COMMANDS | EXAMPLE | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=gh-alias-set&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help