.Dd August 12, 2019 .Dt DTCH 1 .Os . .Sh NAME .Nm dtch .Nd detached sessions . .Sh SYNOPSIS .Nm .Op Fl s .Ar name .Op Ar command ... .Nm .Fl a .Ar name . .Sh DESCRIPTION .Nm spawns a .Ar command in a detachable session. If no .Ar command is given, the value of .Ev SHELL is used. The .Nm process should be run as a background job or with .Xr nohup 1 . . .Pp To attach to an existing session, pass the .Fl a flag. To detach from the session, type .Ic ^Q . . .Pp The arguments are as follows: .Bl -tag -width Ds .It Fl a Attach to an existing session. .It Fl s Sink the output of .Ar command while detached. .El . .Sh FILES .Bl -tag -width Ds .It Pa ~/.dtch Directory of UNIX-domain sockets for each session. .El . .Sh EXAMPLES .Bd -literal -offset indent dtch foo vim & dtch -a foo .Ed