From 076ab8ea9d8af7c26b613114072867f7d3e5134e Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Fri, 18 Mar 2022 23:21:51 +0300 Subject: [PATCH] update doc cc #614 #770 --- doc.go | 52 +++++++++++++++++++++++++++++++++++++++++ docstring.go | 55 +++++++++++++++++++++++++++++++++++++++++++ lf.1 | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 173 insertions(+) diff --git a/doc.go b/doc.go index ce7c4be..f439b00 100644 --- a/doc.go +++ b/doc.go @@ -164,6 +164,16 @@ The following environment variables are exported for shell commands: SHELL lf_{option} +The following special shell commands are used to customize the behavior of lf when defined: + + open + paste + rename + delete + pre-cd + on-cd + on-quit + The following commands/keybindings are provided by default: unix windows @@ -826,6 +836,48 @@ If this variable is set in the environment, use the same value, otherwise set th Value of the {option}. +Special Commands + + open + +This shell command can be defined to override the default 'open' command when the current file is not a directory. + +(See also 'OPENER' variable and 'Opening Files' section) + + paste + +This shell command can be defined to override the default 'paste' command. + +(See also 'File Operations' section) + + rename + +This shell command can be defined to override the default 'paste' command. + +(See also 'File Operations' section) + + delete + +This shell command can be defined to override the default 'delete' command. + +(See also 'File Operations' section) + + pre-cd + +This shell command can be defined to be executed before changing a directory. + +(See also 'Changing Directory' section) + + on-cd + +This shell command can be defined to be executed after changing a directory. + +(See also 'Changing Directory' section) + + on-quit + +This shell command can be defined to be executed before quit. + Prefixes The following command prefixes are used by lf: diff --git a/docstring.go b/docstring.go index 76efe37..8664b95 100644 --- a/docstring.go +++ b/docstring.go @@ -168,6 +168,17 @@ The following environment variables are exported for shell commands: SHELL lf_{option} +The following special shell commands are used to customize the behavior of +lf when defined: + + open + paste + rename + delete + pre-cd + on-cd + on-quit + The following commands/keybindings are provided by default: unix windows @@ -893,6 +904,50 @@ set the value to 'sh' on unix, 'cmd' in Windows. Value of the {option}. +Special Commands + + open + +This shell command can be defined to override the default 'open' command +when the current file is not a directory. + +(See also 'OPENER' variable and 'Opening Files' section) + + paste + +This shell command can be defined to override the default 'paste' command. + +(See also 'File Operations' section) + + rename + +This shell command can be defined to override the default 'paste' command. + +(See also 'File Operations' section) + + delete + +This shell command can be defined to override the default 'delete' command. + +(See also 'File Operations' section) + + pre-cd + +This shell command can be defined to be executed before changing a +directory. + +(See also 'Changing Directory' section) + + on-cd + +This shell command can be defined to be executed after changing a directory. + +(See also 'Changing Directory' section) + + on-quit + +This shell command can be defined to be executed before quit. + Prefixes diff --git a/lf.1 b/lf.1 index 2f290fd..be1df4a 100644 --- a/lf.1 +++ b/lf.1 @@ -187,6 +187,18 @@ The following environment variables are exported for shell commands: lf_{option} .EE .PP +The following special shell commands are used to customize the behavior of lf when defined: +.PP +.EX + open + paste + rename + delete + pre-cd + on-cd + on-quit +.EE +.PP The following commands/keybindings are provided by default: .PP .EX @@ -1017,6 +1029,60 @@ If this variable is set in the environment, use the same value, otherwise set th .EE .PP Value of the {option}. +.SH SPECIAL COMMANDS +.PP +.EX + open +.EE +This shell command can be defined to override the default 'open' command when the current file is not a directory. +.PP +(See also 'OPENER' variable and 'Opening Files' section) +.PP +.EX + paste +.EE +.PP +This shell command can be defined to override the default 'paste' command. +.PP +(See also 'File Operations' section) +.PP +.EX + rename +.EE +.PP +This shell command can be defined to override the default 'paste' command. +.PP +(See also 'File Operations' section) +.PP +.EX + delete +.EE +.PP +This shell command can be defined to override the default 'delete' command. +.PP +(See also 'File Operations' section) +.PP +.EX + pre-cd +.EE +.PP +This shell command can be defined to be executed before changing a directory. +.PP +(See also 'Changing Directory' section) +.PP +.EX + on-cd +.EE +.PP +This shell command can be defined to be executed after changing a directory. +.PP +(See also 'Changing Directory' section) +.PP +.EX + on-quit +.EE +.PP +This shell command can be defined to be executed before quit. .SH PREFIXES The following command prefixes are used by lf: .PP