Skip to content

Commit c05f32a

Browse files
authored
feat: concatenate connect args into a single string (#116)
Fixes #114 Connect no longer requires the argument to be wrapped in quotes, you can now pass as many arguments as you want and sesh will concatenate all of them together into one variable to determine the appropriate session. This is especially helpful when sesh list shows icons or a config session name includes a space.
1 parent 72f8441 commit c05f32a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmds/connect.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ func Connect() *cli.Command {
2828
},
2929
},
3030
Action: func(cCtx *cli.Context) error {
31-
session := strings.Trim(cCtx.Args().First(), "\"'")
31+
joinedArgs := strings.Join(cCtx.Args().Slice(), " ")
32+
session := strings.Trim(joinedArgs, "\"'")
3233
alwaysSwitch := cCtx.Bool("switch")
3334
command := cCtx.String("command")
3435
if session == "" {

0 commit comments

Comments
 (0)