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",

72
doc.go
View File

@ -12,35 +12,35 @@ Reference
The following commands are provided by lf with default keybindings: The following commands are provided by lf with default keybindings:
up (default 'k' and '<up>') up (default 'k' and '<up>')
half-up (default '<c-u>') half-up (default '<c-u>')
page-up (default '<c-b>') page-up (default '<c-b>')
down (default 'j' and '<down>') down (default 'j' and '<down>')
half-down (default '<c-d>') half-down (default '<c-d>')
page-down (default '<c-f>') page-down (default '<c-f>')
updir (default 'h' and '<left>') updir (default 'h' and '<left>')
open (default 'l' and '<right>') open (default 'l' and '<right>')
quit (default 'q') quit (default 'q')
top (default 'gg') top (default 'gg')
bot (default 'G') bot (default 'G')
toggle (default '<space>') toggle (default '<space>')
invert (default 'v') invert (default 'v')
unmark (default 'u') unmark (default 'u')
yank (default 'y') yank (default 'y')
delete (default 'd') delete (default 'd')
put (default 'p') put (default 'p')
clear (default 'c') clear (default 'c')
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')
search-prev (default 'N') search-prev (default 'N')
The following commands are provided by lf without default keybindings: The following commands are provided by lf without default keybindings:
@ -143,13 +143,13 @@ 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
The same evaluator is used for the command line and the configuration file. The The same evaluator is used for the command line and the configuration file. The
difference is that prefixes are not necessary in the command line. Instead difference is that prefixes are not necessary in the command line. Instead

View File

@ -16,35 +16,35 @@ Reference
The following commands are provided by lf with default keybindings: The following commands are provided by lf with default keybindings:
up (default 'k' and '<up>') up (default 'k' and '<up>')
half-up (default '<c-u>') half-up (default '<c-u>')
page-up (default '<c-b>') page-up (default '<c-b>')
down (default 'j' and '<down>') down (default 'j' and '<down>')
half-down (default '<c-d>') half-down (default '<c-d>')
page-down (default '<c-f>') page-down (default '<c-f>')
updir (default 'h' and '<left>') updir (default 'h' and '<left>')
open (default 'l' and '<right>') open (default 'l' and '<right>')
quit (default 'q') quit (default 'q')
top (default 'gg') top (default 'gg')
bot (default 'G') bot (default 'G')
toggle (default '<space>') toggle (default '<space>')
invert (default 'v') invert (default 'v')
unmark (default 'u') unmark (default 'u')
yank (default 'y') yank (default 'y')
delete (default 'd') delete (default 'd')
put (default 'p') put (default 'p')
clear (default 'c') clear (default 'c')
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')
search-prev (default 'N') search-prev (default 'N')
The following commands are provided by lf without default keybindings: The following commands are provided by lf without default keybindings:
@ -150,13 +150,13 @@ 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
The same evaluator is used for the command line and the configuration file. The same evaluator is used for the command line and the configuration file.
The difference is that prefixes are not necessary in the command line. The difference is that prefixes are not necessary in the command line.

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}