parent
5d5d00e30b
commit
6c319316e2
@ -49,6 +49,7 @@ var (
|
|||||||
"echo",
|
"echo",
|
||||||
"cd",
|
"cd",
|
||||||
"select",
|
"select",
|
||||||
|
"source",
|
||||||
"push",
|
"push",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
doc.go
1
doc.go
@ -50,6 +50,7 @@ The following commands are provided by lf without default keybindings:
|
|||||||
echo prints its arguments to the message line
|
echo prints its arguments to the message line
|
||||||
cd changes working directory to its argument
|
cd changes working directory to its argument
|
||||||
select changes current file selection to its argument
|
select changes current file selection to its argument
|
||||||
|
source reads the configuration file in its argument
|
||||||
push simulate key pushes given in its argument
|
push simulate key pushes given in its argument
|
||||||
|
|
||||||
The following command line commands are provided by lf with default
|
The following command line commands are provided by lf with default
|
||||||
|
@ -54,6 +54,7 @@ The following commands are provided by lf without default keybindings:
|
|||||||
echo prints its arguments to the message line
|
echo prints its arguments to the message line
|
||||||
cd changes working directory to its argument
|
cd changes working directory to its argument
|
||||||
select changes current file selection to its argument
|
select changes current file selection to its argument
|
||||||
|
source reads and evaluates the file in its argument
|
||||||
push simulate key pushes given in its argument
|
push simulate key pushes given in its argument
|
||||||
|
|
||||||
The following command line commands are provided by lf with default
|
The following command line commands are provided by lf with default
|
||||||
|
6
eval.go
6
eval.go
@ -464,6 +464,12 @@ func (e *callExpr) eval(app *app, args []string) {
|
|||||||
}
|
}
|
||||||
app.ui.loadFile(app.nav)
|
app.ui.loadFile(app.nav)
|
||||||
app.ui.loadFileInfo(app.nav)
|
app.ui.loadFileInfo(app.nav)
|
||||||
|
case "source":
|
||||||
|
if len(e.args) != 1 {
|
||||||
|
app.ui.print("source: requires an argument")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
app.readFile(strings.Replace(e.args[0], "~", gUser.HomeDir, -1))
|
||||||
case "push":
|
case "push":
|
||||||
if len(e.args) != 1 {
|
if len(e.args) != 1 {
|
||||||
app.ui.print("push: requires an argument")
|
app.ui.print("push: requires an argument")
|
||||||
|
Loading…
Reference in New Issue
Block a user