@@ -12,7 +12,14 @@ func UpCmd(cfg *config.Config) *cobra.Command {
1212 return & cobra.Command {
1313 Use : "up [n]" ,
1414 Short : "Check out a branch further up in the stack (further from the trunk)" ,
15- Args : cobra .MaximumNArgs (1 ),
15+ Long : `Check out a branch further up in the stack (further from the trunk).
16+ Merged branches are automatically skipped.` ,
17+ Example : ` # Move one branch up
18+ $ gh stack up
19+
20+ # Move three branches up
21+ $ gh stack up 3` ,
22+ Args : cobra .MaximumNArgs (1 ),
1623 RunE : func (cmd * cobra.Command , args []string ) error {
1724 n := 1
1825 if len (args ) > 0 {
@@ -32,7 +39,14 @@ func DownCmd(cfg *config.Config) *cobra.Command {
3239 return & cobra.Command {
3340 Use : "down [n]" ,
3441 Short : "Check out a branch further down in the stack (closer to the trunk)" ,
35- Args : cobra .MaximumNArgs (1 ),
42+ Long : `Check out a branch further down in the stack (closer to the trunk).
43+ Merged branches are automatically skipped.` ,
44+ Example : ` # Move one branch down
45+ $ gh stack down
46+
47+ # Move two branches down
48+ $ gh stack down 2` ,
49+ Args : cobra .MaximumNArgs (1 ),
3650 RunE : func (cmd * cobra.Command , args []string ) error {
3751 n := 1
3852 if len (args ) > 0 {
@@ -52,6 +66,10 @@ func TopCmd(cfg *config.Config) *cobra.Command {
5266 return & cobra.Command {
5367 Use : "top" ,
5468 Short : "Check out the top branch of the stack (furthest from the trunk)" ,
69+ Long : `Check out the top branch of the stack (furthest from the trunk).
70+ Merged branches are automatically skipped.` ,
71+ Example : ` # Jump to the top of the stack
72+ $ gh stack top` ,
5573 RunE : func (cmd * cobra.Command , args []string ) error {
5674 return runNavigateToEnd (cfg , true )
5775 },
@@ -62,6 +80,10 @@ func BottomCmd(cfg *config.Config) *cobra.Command {
6280 return & cobra.Command {
6381 Use : "bottom" ,
6482 Short : "Check out the bottom branch of the stack (closest to the trunk)" ,
83+ Long : `Check out the bottom branch of the stack (closest to the trunk).
84+ Merged branches are automatically skipped.` ,
85+ Example : ` # Jump to the bottom of the stack
86+ $ gh stack bottom` ,
6587 RunE : func (cmd * cobra.Command , args []string ) error {
6688 return runNavigateToEnd (cfg , false )
6789 },
0 commit comments