From 79fad70e8292a119c35005832afd2eddd492e2bc Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sun, 26 Mar 2017 21:56:10 -0400 Subject: [PATCH] added more documentation to edit man page --- docs/edit.1 | 36 ++++++++++++++++-------------------- docs/edit.1.md | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 29 deletions(-) diff --git a/docs/edit.1 b/docs/edit.1 index e52261c..fb9e909 100644 --- a/docs/edit.1 +++ b/docs/edit.1 @@ -7,36 +7,32 @@ \fBedit\fR \- convenience script for launching xedit(1) with a proper environment . .SH "SYNOPSIS" -. -.nf - -edit [file \.\.] -. -.fi +\fBedit\fR [\fIfile\fR\.\.\.] . .SH "DESCRIPTION" This script acts as a wrapper around xedit(1)\. It is responsible for setting up the environment variables and loading the rc file xedit(1) before launching a new instance of xedit(1) for each file provided on the command line\. If no files are provided, xedit(1) will be launched to edit a scratch buffer\. . .SH "FILES" . -.nf - -$HOME/\.config/edit/editrc - Shell script loaded in current environment to make shell functions and environment variables available to xedit(1) -. -.fi +.SS "$HOME/\.config/edit/editrc" +Shell script loaded in current environment to make shell functions and environment variables available to xedit(1) . .SH "ENVIRONMENT" . -.nf - -PATH -EDITRCFILE -BASH_ENV -DISPLAY -EDITOR +.SS "BASH_ENV" +Set to same value as $EDITRCFILE so that the file is loaded as a bash script in the event that the user shell is bash(1) +. +.SS "DISPLAY" +This variable is used to determine if we are running in an X11 environment\. If $DISPLAY is not set then the contents of the $EDITOR variable is used to determine what editor to launch in lieu of xedit(1)\. If $EDITOR is not set then vim(1) is launched instead\. +. +.SS "EDITRCFILE" +Contains the path of the shell script which is loaded before xedit(1) to setup the environment and define shell functions which can be called during an editing session\. +. +.SS "EDITOR" +Used as a fallback for when not running in an X11 system (xedit(1) is of course X11 only)\. . -.fi +.SS "PATH" +The $PATH variable is modified in order to add $HOME/config/edit/tools/ to the path\. This folder is a standard location in which user scripts and tools can be placed so they can be used from within xedit(1) without cluttering up the normal system path\. . .SH "AUTHOR" Michael D\. Lowis diff --git a/docs/edit.1.md b/docs/edit.1.md index ed5c056..c495ff0 100644 --- a/docs/edit.1.md +++ b/docs/edit.1.md @@ -2,7 +2,7 @@ ## SYNOPSIS - edit [file ..] +`edit` [...] ## DESCRIPTION @@ -13,17 +13,36 @@ are provided, xedit(1) will be launched to edit a scratch buffer. ## FILES - $HOME/.config/edit/editrc - Shell script loaded in current environment to make shell functions and environment variables available to xedit(1) +### $HOME/.config/edit/editrc +Shell script loaded in current environment to make shell functions and environment variables available to xedit(1) ## ENVIRONMENT - BASH_ENV - DISPLAY - EDITRCFILE - EDITOR - PATH - +### BASH_ENV +Set to same value as $EDITRCFILE so that the file is loaded as a bash script in +the event that the user shell is bash(1) + +### DISPLAY +This variable is used to determine if we are running in an X11 environment. If +$DISPLAY is not set then the contents of the $EDITOR variable is used to +determine what editor to launch in lieu of xedit(1). If $EDITOR is not set then +vim(1) is launched instead. + +### EDITRCFILE +Contains the path of the shell script which is loaded before xedit(1) to setup +the environment and define shell functions which can be called during an editing +session. + +### EDITOR +Used as a fallback for when not running in an X11 system (xedit(1) is of course +X11 only). + +### PATH +The $PATH variable is modified in order to add $HOME/config/edit/tools/ to the +path. This folder is a standard location in which user scripts and tools can be +placed so they can be used from within xedit(1) without cluttering up the normal +system path. + ## AUTHOR Michael D. Lowis -- 2.49.0