1glab(1)                                                                glab(1)
2
3
4

NAME

6       glab-alias-set - Set an alias.
7
8
9

SYNOPSIS

11       glab alias set  '' [flags]
12
13
14

DESCRIPTION

16       Declare  a  word  as  a command alias that will expand to the specified
17       command(s).
18
19
20       The expansion may specify additional arguments and flags. If the expan‐
21       sion includes positional placeholders such as '$1', '$2', etc., any ex‐
22       tra arguments that follow the invocation of an alias will  be  inserted
23       appropriately.
24
25
26       If '--shell' is specified, the alias will be run through a shell inter‐
27       preter (sh). This allows you to compose commands with "|"  or  redirect
28       with ">". Note that extra arguments following the alias will not be au‐
29       tomatically passed to the expanded expression. To have  a  shell  alias
30       receive  arguments,  you  must explicitly accept them using "$1", "$2",
31       etc., or "$@" to accept all of them.
32
33
34       Platform note: on Windows, shell aliases are executed via "sh"  as  in‐
35       stalled  by  Git  For  Windows. If you have installed Git on Windows in
36       some other way, shell aliases may not work for you.  Quotes must always
37       be used when defining a command as in the examples.
38
39
40

OPTIONS

42       -s,  --shell[=false]      Declare an alias to be passed through a shell
43       interpreter
44
45
46

OPTIONS INHERITED FROM PARENT COMMANDS

48       --help[=false]      Show help for command
49
50
51

EXAMPLE

53       $ glab alias set mrv 'mr view'
54       $ glab mrv -w 123
55       #=> glab mr view -w 123
56
57       $ glab alias set createissue 'glab create issue --title "$1"'
58       $ glab createissue "My Issue" --description "Something is broken."
59       # => glab create issue --title "My Issue" --description "Something is broken."
60
61       $ glab alias set --shell igrep 'glab issue list --assignee="$1" | grep $2'
62       $ glab igrep user foo
63       #=> glab issue list --assignee="user" | grep "foo"
64
65
66
67
68

SEE ALSO

70       glab-alias(1)
71
72
73
74Auto generated by spf13/cobra      Nov 2023                            glab(1)
Impressum