rename 'read-shell' to 'shell' in shell commands

This commit is contained in:
Gokcehan 2018-03-27 21:23:34 +03:00
parent 4f05975e77
commit 68232c06e3
6 changed files with 85 additions and 85 deletions

View File

@ -35,10 +35,10 @@ var (
"redraw", "redraw",
"reload", "reload",
"read", "read",
"read-shell", "shell",
"read-shell-pipe", "shell-pipe",
"read-shell-wait", "shell-wait",
"read-shell-async", "shell-async",
"search", "search",
"search-back", "search-back",
"search-next", "search-next",

16
doc.go
View File

@ -33,10 +33,10 @@ The following commands are provided by lf with default keybindings:
redraw (default '<c-l>') redraw (default '<c-l>')
reload (default '<c-r>') reload (default '<c-r>')
read (default ':') read (default ':')
read-shell (default '$') shell (default '$')
read-shell-pipe (default '%') shell-pipe (default '%')
read-shell-wait (default '!') shell-wait (default '!')
read-shell-async (default '&') shell-async (default '&')
search (default '/') search (default '/')
search-back (default '?') search-back (default '?')
search-next (default 'n') search-next (default 'n')
@ -144,10 +144,10 @@ Prefixes
The following command prefixes are used by lf: The following command prefixes are used by lf:
: read (default) builtin/custom command : read (default) builtin/custom command
$ read-shell shell command $ shell shell command
% read-shell-pipe shell command displaying the output % shell-pipe shell command displaying the output
! read-shell-wait shell command waiting for key press ! shell-wait shell command waiting for key press
& read-shell-async asynchronous shell command & shell-async asynchronous shell command
/ search search file in current directory / search search file in current directory
? search-back search file in the reverse order ? search-back search file in the reverse order

View File

@ -37,10 +37,10 @@ The following commands are provided by lf with default keybindings:
redraw (default '<c-l>') redraw (default '<c-l>')
reload (default '<c-r>') reload (default '<c-r>')
read (default ':') read (default ':')
read-shell (default '$') shell (default '$')
read-shell-pipe (default '%') shell-pipe (default '%')
read-shell-wait (default '!') shell-wait (default '!')
read-shell-async (default '&') shell-async (default '&')
search (default '/') search (default '/')
search-back (default '?') search-back (default '?')
search-next (default 'n') search-next (default 'n')
@ -151,10 +151,10 @@ Prefixes
The following command prefixes are used by lf: The following command prefixes are used by lf:
: read (default) builtin/custom command : read (default) builtin/custom command
$ read-shell shell command $ shell shell command
% read-shell-pipe shell command displaying the output % shell-pipe shell command displaying the output
! read-shell-wait shell command waiting for key press ! shell-wait shell command waiting for key press
& read-shell-async asynchronous shell command & shell-async asynchronous shell command
/ search search file in current directory / search search file in current directory
? search-back search file in the reverse order ? search-back search file in the reverse order

View File

@ -12,7 +12,7 @@ set ifs "\n"
set scrolloff 10 set scrolloff 10
# use enter for shell commands # use enter for shell commands
map <enter> read-shell map <enter> shell
# execute current file (must be executable) # execute current file (must be executable)
map x $$f map x $$f

View File

@ -344,13 +344,13 @@ func (e *callExpr) eval(app *app, args []string) {
app.nav.reload() app.nav.reload()
case "read": case "read":
app.ui.cmdPrefix = ":" app.ui.cmdPrefix = ":"
case "read-shell": case "shell":
app.ui.cmdPrefix = "$" app.ui.cmdPrefix = "$"
case "read-shell-pipe": case "shell-pipe":
app.ui.cmdPrefix = "%" app.ui.cmdPrefix = "%"
case "read-shell-wait": case "shell-wait":
app.ui.cmdPrefix = "!" app.ui.cmdPrefix = "!"
case "read-shell-async": case "shell-async":
app.ui.cmdPrefix = "&" app.ui.cmdPrefix = "&"
case "search": case "search":
app.ui.cmdPrefix = "/" app.ui.cmdPrefix = "/"

View File

@ -75,10 +75,10 @@ func init() {
gOpts.keys["<c-l>"] = &callExpr{"redraw", nil} gOpts.keys["<c-l>"] = &callExpr{"redraw", nil}
gOpts.keys["<c-r>"] = &callExpr{"reload", nil} gOpts.keys["<c-r>"] = &callExpr{"reload", nil}
gOpts.keys[":"] = &callExpr{"read", nil} gOpts.keys[":"] = &callExpr{"read", nil}
gOpts.keys["$"] = &callExpr{"read-shell", nil} gOpts.keys["$"] = &callExpr{"shell", nil}
gOpts.keys["%"] = &callExpr{"read-shell-pipe", nil} gOpts.keys["%"] = &callExpr{"shell-pipe", nil}
gOpts.keys["!"] = &callExpr{"read-shell-wait", nil} gOpts.keys["!"] = &callExpr{"shell-wait", nil}
gOpts.keys["&"] = &callExpr{"read-shell-async", nil} gOpts.keys["&"] = &callExpr{"shell-async", nil}
gOpts.keys["/"] = &callExpr{"search", nil} gOpts.keys["/"] = &callExpr{"search", nil}
gOpts.keys["?"] = &callExpr{"search-back", nil} gOpts.keys["?"] = &callExpr{"search-back", nil}
gOpts.keys["n"] = &callExpr{"search-next", nil} gOpts.keys["n"] = &callExpr{"search-next", nil}