diff --git a/comp.go b/comp.go index 1ab4a08..84aee0f 100644 --- a/comp.go +++ b/comp.go @@ -35,10 +35,10 @@ var ( "redraw", "reload", "read", - "read-shell", - "read-shell-pipe", - "read-shell-wait", - "read-shell-async", + "shell", + "shell-pipe", + "shell-wait", + "shell-async", "search", "search-back", "search-next", diff --git a/doc.go b/doc.go index 0f693b4..5936d89 100644 --- a/doc.go +++ b/doc.go @@ -12,35 +12,35 @@ Reference The following commands are provided by lf with default keybindings: - up (default 'k' and '') - half-up (default '') - page-up (default '') - down (default 'j' and '') - half-down (default '') - page-down (default '') - updir (default 'h' and '') - open (default 'l' and '') - quit (default 'q') - top (default 'gg') - bot (default 'G') - toggle (default '') - invert (default 'v') - unmark (default 'u') - yank (default 'y') - delete (default 'd') - put (default 'p') - clear (default 'c') - redraw (default '') - reload (default '') - read (default ':') - read-shell (default '$') - read-shell-pipe (default '%') - read-shell-wait (default '!') - read-shell-async (default '&') - search (default '/') - search-back (default '?') - search-next (default 'n') - search-prev (default 'N') + up (default 'k' and '') + half-up (default '') + page-up (default '') + down (default 'j' and '') + half-down (default '') + page-down (default '') + updir (default 'h' and '') + open (default 'l' and '') + quit (default 'q') + top (default 'gg') + bot (default 'G') + toggle (default '') + invert (default 'v') + unmark (default 'u') + yank (default 'y') + delete (default 'd') + put (default 'p') + clear (default 'c') + redraw (default '') + reload (default '') + read (default ':') + shell (default '$') + shell-pipe (default '%') + shell-wait (default '!') + shell-async (default '&') + search (default '/') + search-back (default '?') + search-next (default 'n') + search-prev (default 'N') The following commands are provided by lf without default keybindings: @@ -143,13 +143,13 @@ Prefixes The following command prefixes are used by lf: - : read (default) builtin/custom command - $ read-shell shell command - % read-shell-pipe shell command displaying the output - ! read-shell-wait shell command waiting for key press - & read-shell-async asynchronous shell command - / search search file in current directory - ? search-back search file in the reverse order + : read (default) builtin/custom command + $ shell shell command + % shell-pipe shell command displaying the output + ! shell-wait shell command waiting for key press + & shell-async asynchronous shell command + / search search file in current directory + ? search-back search file in the reverse order 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 diff --git a/docstring.go b/docstring.go index 0e4ddc0..f36c118 100644 --- a/docstring.go +++ b/docstring.go @@ -16,35 +16,35 @@ Reference The following commands are provided by lf with default keybindings: - up (default 'k' and '') - half-up (default '') - page-up (default '') - down (default 'j' and '') - half-down (default '') - page-down (default '') - updir (default 'h' and '') - open (default 'l' and '') - quit (default 'q') - top (default 'gg') - bot (default 'G') - toggle (default '') - invert (default 'v') - unmark (default 'u') - yank (default 'y') - delete (default 'd') - put (default 'p') - clear (default 'c') - redraw (default '') - reload (default '') - read (default ':') - read-shell (default '$') - read-shell-pipe (default '%') - read-shell-wait (default '!') - read-shell-async (default '&') - search (default '/') - search-back (default '?') - search-next (default 'n') - search-prev (default 'N') + up (default 'k' and '') + half-up (default '') + page-up (default '') + down (default 'j' and '') + half-down (default '') + page-down (default '') + updir (default 'h' and '') + open (default 'l' and '') + quit (default 'q') + top (default 'gg') + bot (default 'G') + toggle (default '') + invert (default 'v') + unmark (default 'u') + yank (default 'y') + delete (default 'd') + put (default 'p') + clear (default 'c') + redraw (default '') + reload (default '') + read (default ':') + shell (default '$') + shell-pipe (default '%') + shell-wait (default '!') + shell-async (default '&') + search (default '/') + search-back (default '?') + search-next (default 'n') + search-prev (default 'N') The following commands are provided by lf without default keybindings: @@ -150,13 +150,13 @@ Prefixes The following command prefixes are used by lf: - : read (default) builtin/custom command - $ read-shell shell command - % read-shell-pipe shell command displaying the output - ! read-shell-wait shell command waiting for key press - & read-shell-async asynchronous shell command - / search search file in current directory - ? search-back search file in the reverse order + : read (default) builtin/custom command + $ shell shell command + % shell-pipe shell command displaying the output + ! shell-wait shell command waiting for key press + & shell-async asynchronous shell command + / search search file in current directory + ? search-back search file in the reverse order 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. diff --git a/etc/lfrc.example b/etc/lfrc.example index b36badc..b1b5eee 100644 --- a/etc/lfrc.example +++ b/etc/lfrc.example @@ -12,7 +12,7 @@ set ifs "\n" set scrolloff 10 # use enter for shell commands -map read-shell +map shell # execute current file (must be executable) map x $$f diff --git a/eval.go b/eval.go index 81741cd..ac118c5 100644 --- a/eval.go +++ b/eval.go @@ -344,13 +344,13 @@ func (e *callExpr) eval(app *app, args []string) { app.nav.reload() case "read": app.ui.cmdPrefix = ":" - case "read-shell": + case "shell": app.ui.cmdPrefix = "$" - case "read-shell-pipe": + case "shell-pipe": app.ui.cmdPrefix = "%" - case "read-shell-wait": + case "shell-wait": app.ui.cmdPrefix = "!" - case "read-shell-async": + case "shell-async": app.ui.cmdPrefix = "&" case "search": app.ui.cmdPrefix = "/" diff --git a/opts.go b/opts.go index e865594..74a41b1 100644 --- a/opts.go +++ b/opts.go @@ -75,10 +75,10 @@ func init() { gOpts.keys[""] = &callExpr{"redraw", nil} gOpts.keys[""] = &callExpr{"reload", nil} gOpts.keys[":"] = &callExpr{"read", nil} - gOpts.keys["$"] = &callExpr{"read-shell", nil} - gOpts.keys["%"] = &callExpr{"read-shell-pipe", nil} - gOpts.keys["!"] = &callExpr{"read-shell-wait", nil} - gOpts.keys["&"] = &callExpr{"read-shell-async", nil} + gOpts.keys["$"] = &callExpr{"shell", nil} + gOpts.keys["%"] = &callExpr{"shell-pipe", nil} + gOpts.keys["!"] = &callExpr{"shell-wait", nil} + gOpts.keys["&"] = &callExpr{"shell-async", nil} gOpts.keys["/"] = &callExpr{"search", nil} gOpts.keys["?"] = &callExpr{"search-back", nil} gOpts.keys["n"] = &callExpr{"search-next", nil}