Add a -k flag to unlink-window which makes it behave the same as the old

kill-window - if a window is linked into only one session it unlinked and
destroyed.
This commit is contained in:
Tiago Cunha
2009-07-19 00:39:37 +00:00
parent 19cb1fb592
commit 17170f5d6e
2 changed files with 14 additions and 7 deletions

13
tmux.1
View File

@ -1,4 +1,4 @@
.\" $Id: tmux.1,v 1.121 2009-07-18 11:07:14 nicm Exp $
.\" $Id: tmux.1,v 1.122 2009-07-19 00:39:37 tcunha Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@ -1583,13 +1583,20 @@ to
Unbind the key bound to
.Ar key .
.It Xo Ic unlink-window
.Op Fl k
.Op Fl t Ar target-window
.Xc
.D1 (alias: Ic unlinkw )
Unlink
.Ar target-window .
A window may be unlinked only if it is linked to multiple sessions - windows may
not be linked to no sessions.
Unless
.Fl k
is given, a window may be unlinked only if it is linked to multiple sessions -
windows may not be linked to no sessions;
if
.Fl k
is specified and the window is linked to only one session, it is unlinked and
destroyed.
.It Xo Ic up-pane
.Op Fl p Ar pane-index
.Op Fl t Ar target-window