dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit ed6f57fb464ca8d3445149bb43b0ceae04fe0954
parent 806403a98a50e2315eed9237554a7f8fc85968d2
Author: josuah <mail@josuah.net>
Date:   Tue,  3 Jan 2017 20:46:56 +0100

Added dvtm-{pager,editor} man pages, adjusted dvtm's accordingly.

Diffstat:
dvtm-editor.1 | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dvtm-pager.1 | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dvtm.1 | 26+++++++++++++-------------
3 files changed, 160 insertions(+), 13 deletions(-)

diff --git a/dvtm-editor.1 b/dvtm-editor.1 @@ -0,0 +1,78 @@ +.Dd $Mdocdate: December 27 2016 $ +.Dt DVTM-EDITOR 1 +.Os +.Sh NAME +.Nm dvtm-editor +.Nd make a text editor act as a filter +. +. +.Sh SYNOPSIS +. +.Nm +ARGS... +. +. +.Sh DESCRIPTION +. +The +.Nm +is a file buffering utility used by the +.Xr dvtm 1 +terminal multiplexer. It reads the standard input and save it to a temporary +file, then opens an editor according to the environment variables. The file can +be edited and saved. +.Pp +Once the editor quits, if the file was not saved, +.Nm +does not output anything. Otherwise, it output the content of the temporary +file to stdout. +.Pp +.Xr dvtm 1 +will remove the escape sequences such as colouring and cursor control before to +write to +.Nm . +.Pp +.Cm ARGS +are passed to the selected editor. This is used by +.Xr dvtm 1 +to jump to current line number. +. +. +.Sh ENVIRONMENT VARIABLES +. +.Nm +will try to find the user editor by checking these variables in order: +. +.Bl -tag -width 8 +.It Ev DVTM_EDITOR +Permitting to invoke an editor specific to dvtm, or set particular flags. +. +.It Ev VISUAL , Ev EDITOR +Falling back to global defaults: +.Ev VISUAL +and +.Ev EDITOR . +.El +.Pp +If no editor is found, the +.Xr vi 1 +editor is used. +. +. +.Sh FILES +. +The temporary files are created according to the template: +.Pa /tmp/dvtm-editor.XXXXXX +. +. +.Sh SEE ALSO +. +.Xr vi 1 , +.Xr dvtm 1 , +.Xr dvtm-pager 1 +. +. +.Sh AUTHOR +. +dvtm is written +.An Marc André Tanner Aq Mt mat at brain-dump.org diff --git a/dvtm-pager.1 b/dvtm-pager.1 @@ -0,0 +1,69 @@ +.Dd $Mdocdate: January 03 2017 $ +.Dt DVTM-PAGER 1 +.Os +.Sh NAME +.Nm dvtm-pager +.Nd select apropriate pager for dvtm +. +. +.Sh SYNOPSIS +. +.Nm +ARGS... +. +. +.Sh DESCRIPTION +. +The +.Nm +is an utility used by +.Xr dvtm 1 +for choosing apropriate pager to displaying the scrollback history. +.Pp +It starts the pager with +.Cm ARGS , +sending all scrollback to its standard input. +.Nm +does not output anything. Otherwise, it output the content of the temporary +file to stdout. +.Pp +.Xr dvtm 1 +will preserve the escape sequences such as colouring and cursor control while +sending the scrollback to +.Nm . +.Pp +. +. +.Sh ENVIRONMENT VARIABLES +. +.Nm +will try to find the user pager by checking these variables in order: +. +.Bl -tag -width 8 +.It Ev DVTM_PAGER +Permitting to invoke an editor specific to dvtm, or set particular flags such as +.Fl R +for +.Xr less 1 . +. +.It Ev PAGER +Falling back to global defaults: +.Ev PAGER . +.El +.Pp +If no pager is found, the +.Xr less 1 +pager is used. +. +. +.Sh SEE ALSO +. +.Xr less 1 , +.Xr dvtm 1 , +.Xr dvtm-editor 1 +. +. +.Sh AUTHOR +. +dvtm is written +.An Marc André Tanner Aq Mt mat at brain-dump.org diff --git a/dvtm.1 b/dvtm.1 @@ -242,11 +242,12 @@ Toggle minimization of current window. . .Ss Copy mode . -Copy mode gives easy access to past output by piping it to an editor. What -ever the editor prints to stdout upon exiting will be stored in an internal -register and can be pasted into other clients (via -.Ic Mod-p -) +Copy mode gives easy access to past output by piping it to +.Xr dvtm-editor 1 , +opening an editor. +What the editor writes will be stored in an internal register and can be pasted +into other clients (via +.Ic Mod-p ). . . .Sh ENVIRONMENT VARIABLES @@ -273,15 +274,14 @@ environment variable to a valid terminal name before launching dvtm. . .It Ev DVTM_EDITOR When entering the copymode dvtm pipes the whole scroll back buffer to -.Ev DVTM_EDITOR -which is launched with -.Fl -(indicating to read from stdin) as its only argument. -If -.Ev DVTM_EDITOR -is not set +.Xr dvtm-editor 1 +which opens the content in +.Ev DVTM_EDITOR , +with fallbacks to +.Ev VISUAL , .Ev EDITOR -is checked, if this is also not set the default value specified in +and +.Xr vi 1 .Pa config.h is used instead. .El