Skip to content

Extend -S option to new-window #2766

@qsmodo

Description

@qsmodo

From 3.2:

* Add a -S flag to new-window to make it select the existing window if one
  with the given name already exists rather than failing with an error.

It would be great if that flag had that effect with -t target-window too, so that these nifty bindings could work (jump to a window if it exists, creating it if necessary):

bind-key 1 select-window -S -t 1
bind-key 2 select-window -S -t 2
bind-key 3 select-window -S -t 3

I'm assuming there is currently no (easy) way to do that. I have tried new-window ... \; select-window ..., but as documented the sequence is interrupted if a command fails, so no dice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions