Export count as a variable when running commands (#1187)

This commit is contained in:
Joe Lim authored and GitHub committed 2023-04-01 19:40:28 +03:00
1 parent f563263add
commit 3ae67fc361
4 files changed
+19

No files matched your search

+5
View File
@@ -186,6 +186,7 @@ The following environment variables are exported for shell commands:
lf_user_{option}
lf_width
lf_height
lf_count
The following special shell commands are used to customize the behavior of lf when defined:
@@ -959,6 +960,10 @@ Value of the user_{option}.
Width/Height of the terminal.
lf_count
Value of the count associated with the current command.
# Special Commands
This section shows information about special shell commands.
+5
View File
@@ -189,6 +189,7 @@ The following environment variables are exported for shell commands:
lf_user_{option}
lf_width
lf_height
lf_count
The following special shell commands are used to customize the behavior of lf
when defined:
@@ -1026,6 +1027,10 @@ Value of the user_{option}.
Width/Height of the terminal.
lf_count
Value of the count associated with the current command.
# Special Commands
This section shows information about special shell commands.
+2
View File
@@ -1263,6 +1263,8 @@ func insert(app *app, arg string) {
}
func (e *callExpr) eval(app *app, args []string) {
os.Setenv("lf_count", strconv.Itoa(e.count))
switch e.name {
case "up":
if !app.nav.init {
+7
View File
@@ -207,6 +207,7 @@ The following environment variables are exported for shell commands:
lf_user_{option}
lf_width
lf_height
lf_count
.EE
.PP
The following special shell commands are used to customize the behavior of lf when defined:
@@ -1167,6 +1168,12 @@ Value of the user_{option}.
.EE
.PP
Width/Height of the terminal.
.PP
.EX
lf_count
.EE
.PP
Value of the count associated with the current command.
.SH SPECIAL COMMANDS
This section shows information about special shell commands.
.PP