Skip to content

Commit

Permalink
feat: concatenate connect args into a single string (#116)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kevinrobayna committed May 29, 2024
1 parent 72f8441 commit c05f32a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmds/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func Connect() *cli.Command {
},
},
Action: func(cCtx *cli.Context) error {
session := strings.Trim(cCtx.Args().First(), "\"'")
joinedArgs := strings.Join(cCtx.Args().Slice(), " ")
session := strings.Trim(joinedArgs, "\"'")
alwaysSwitch := cCtx.Bool("switch")
command := cCtx.String("command")
if session == "" {
Expand Down

0 comments on commit c05f32a

Please sign in to comment.