From 6b7f9285c430ae198b1190a6454b503da716fa6f Mon Sep 17 00:00:00 2001 From: Einhard Leichtfuß Date: Tue, 25 Dec 2018 19:43:45 +0100 Subject: Use arrays for the program variables Also, - Fix --search-by-data with $output_program != cat. `- Required a the introduction of $tmp_dir. - Correct some bad explanation in ctct_config(5). - Correctly initialize $user_config_file in the script. --- ctct_config.5.in | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) (limited to 'ctct_config.5.in') diff --git a/ctct_config.5.in b/ctct_config.5.in index f29f64b..198683f 100644 --- a/ctct_config.5.in +++ b/ctct_config.5.in @@ -37,12 +37,18 @@ Any configuration is done by setting shell variables\. Configuration may be overriden in per-user configuration scripts, see .BR user_config_file \. .P +To configure the choice of external programs, array variables are used\. +For these, the first element is the executable name; further elements may +specify arguments to the respective program\. +.P The following variables are recognized: .\" .TP -.B user_config_file -The per user configuration file. -If set, this variable must contain the prefix +.BR user_config_file "=\fIfile\fP" +The per user configuration file\. +If set, +.I file +must contain the prefix .I $HOME or alternatively any other variable resolving to a directory below the respective home directory\. @@ -50,17 +56,17 @@ The default value is .IR @default_user_config_file@ \. .\" .TP -.B datadir +.BR datadir "=\fIpath\fP" The location of the directory where the contact data are stored\. Typically, -.B datadir +.I path should contain the prefix .IR $HOME \. The default value is .IR @default_datadir@ \. .\" .TP -.B default_editor +.BR default_editor "=(\fIprogram\fP [\|\fIarg\fP \.\.\.\|])" The editor to use when .B ctct is called with the @@ -71,10 +77,10 @@ If set, supersedes both the environment variable and the .BR fallback_editor \. -By default, unset. +By default, unset\. .\" .TP -.B fallback_editor +.BR fallback_editor "=(\fIprogram\fP [\|\fIarg\fP \.\.\.\|])" The editor to fall back to if neither the environment variable .RB $ EDITOR nor @@ -84,9 +90,9 @@ The default value is .IR @default_fallback_editor@ \. .\" .TP -.B input_program -The program with arguments -that gets passed the data written after editing a contact entry\. +.BR input_program "=(\fIprogram\fP [\|\fIarg\fP \.\.\.\|])" +The program that gets passed the data written after editing a contact +entry\. This is mostly useful in combination with an .B output_program to enable encryption\. @@ -107,14 +113,15 @@ option, will operate on a temporary file populated by the output of When editing is done, the .B input_program will receive the content of that temporary file on stdin and its stdout -will be written on disk. +will be written on disk\. The default value is .IR @default_input_program@ \. .\" .TP -.B output_program -The program with arguments -that any contact data that are to be print are passed to\. +.BR output_program "=(\fIprogram\fP [\|\fIarg\fP \.\.\.\|])" +The program to convert data as stored on disk to human readable form\. +It should be inverse to +.BR input_program \. Note, that the respective program must accept its input on stdin and print its output on stdout\. This option is hence not useful for pagers such as @@ -130,11 +137,11 @@ For further details, see .BR input_program \. .\" .TP -.B visual_program +.BR visual_program "=(\fIprogram\fP [\|\fIarg\fP \.\.\.\|])" The program that the data as written by the .B output_program are passed to\. -It can be used with any program accepting its input on stdin. +It can be used with any program accepting its input on stdin\. Common options are .BR less (1) and @@ -146,7 +153,7 @@ The default value is .IR @default_visual_program@ \. .\" .TP -.B confirm_deletion +.BR confirm_deletion "=\fIboolean\fP" Whether to ask for confirmation upon deleting an entry, that is when .BR ctct (1) is called with the @@ -156,7 +163,7 @@ The default value is .IR @default_confirm_deletion@ \. .\" .TP -.B confirm_default_yes +.BR confirm_default_yes "=\fIboolean\fP" Whether to assume yes as answer to confirmation when no answer, that is an empty answer is given\. This option only has an effect, if -- cgit v1.2.3