Navigate cmd history with up/down (#1112)
This commit is contained in:
1 parent
6afefa5d09
commit
cae576bb1d
4 files changed
+14
-12
No files matched your search
@@ -88,8 +88,8 @@ The following command line commands are provided by lf:
|
|||||||
cmd-menu-accept
|
cmd-menu-accept
|
||||||
cmd-enter (default '<c-j>' and '<enter>')
|
cmd-enter (default '<c-j>' and '<enter>')
|
||||||
cmd-interrupt (default '<c-c>')
|
cmd-interrupt (default '<c-c>')
|
||||||
cmd-history-next (default '<c-n>')
|
cmd-history-next (default '<c-n>' and '<down>')
|
||||||
cmd-history-prev (default '<c-p>')
|
cmd-history-prev (default '<c-p>' and '<up>')
|
||||||
cmd-left (default '<c-b>' and '<left>')
|
cmd-left (default '<c-b>' and '<left>')
|
||||||
cmd-right (default '<c-f>' and '<right>')
|
cmd-right (default '<c-f>' and '<right>')
|
||||||
cmd-home (default '<c-a>' and '<home>')
|
cmd-home (default '<c-a>' and '<home>')
|
||||||
@@ -531,8 +531,8 @@ Execute the current line.
|
|||||||
|
|
||||||
Interrupt the current shell-pipe command and return to the normal mode.
|
Interrupt the current shell-pipe command and return to the normal mode.
|
||||||
|
|
||||||
cmd-history-next (default '<c-n>')
|
cmd-history-next (default '<c-n>' and '<down>')
|
||||||
cmd-history-prev (default '<c-p>')
|
cmd-history-prev (default '<c-p>' and '<up>')
|
||||||
|
|
||||||
Go to next/previous item in the history.
|
Go to next/previous item in the history.
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -91,8 +91,8 @@ The following command line commands are provided by lf:
|
|||||||
cmd-menu-accept
|
cmd-menu-accept
|
||||||
cmd-enter (default '<c-j>' and '<enter>')
|
cmd-enter (default '<c-j>' and '<enter>')
|
||||||
cmd-interrupt (default '<c-c>')
|
cmd-interrupt (default '<c-c>')
|
||||||
cmd-history-next (default '<c-n>')
|
cmd-history-next (default '<c-n>' and '<down>')
|
||||||
cmd-history-prev (default '<c-p>')
|
cmd-history-prev (default '<c-p>' and '<up>')
|
||||||
cmd-left (default '<c-b>' and '<left>')
|
cmd-left (default '<c-b>' and '<left>')
|
||||||
cmd-right (default '<c-f>' and '<right>')
|
cmd-right (default '<c-f>' and '<right>')
|
||||||
cmd-home (default '<c-a>' and '<home>')
|
cmd-home (default '<c-a>' and '<home>')
|
||||||
@@ -555,8 +555,8 @@ Execute the current line.
|
|||||||
|
|
||||||
Interrupt the current shell-pipe command and return to the normal mode.
|
Interrupt the current shell-pipe command and return to the normal mode.
|
||||||
|
|
||||||
cmd-history-next (default '<c-n>')
|
cmd-history-next (default '<c-n>' and '<down>')
|
||||||
cmd-history-prev (default '<c-p>')
|
cmd-history-prev (default '<c-p>' and '<up>')
|
||||||
|
|
||||||
Go to next/previous item in the history.
|
Go to next/previous item in the history.
|
||||||
|
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ The following command line commands are provided by lf:
|
|||||||
cmd-menu-accept
|
cmd-menu-accept
|
||||||
cmd-enter (default '<c-j>' and '<enter>')
|
cmd-enter (default '<c-j>' and '<enter>')
|
||||||
cmd-interrupt (default '<c-c>')
|
cmd-interrupt (default '<c-c>')
|
||||||
cmd-history-next (default '<c-n>')
|
cmd-history-next (default '<c-n>' and '<down>')
|
||||||
cmd-history-prev (default '<c-p>')
|
cmd-history-prev (default '<c-p>' and '<up>')
|
||||||
cmd-left (default '<c-b>' and '<left>')
|
cmd-left (default '<c-b>' and '<left>')
|
||||||
cmd-right (default '<c-f>' and '<right>')
|
cmd-right (default '<c-f>' and '<right>')
|
||||||
cmd-home (default '<c-a>' and '<home>')
|
cmd-home (default '<c-a>' and '<home>')
|
||||||
@@ -651,8 +651,8 @@ Execute the current line.
|
|||||||
Interrupt the current shell-pipe command and return to the normal mode.
|
Interrupt the current shell-pipe command and return to the normal mode.
|
||||||
.PP
|
.PP
|
||||||
.EX
|
.EX
|
||||||
cmd-history-next (default '<c-n>')
|
cmd-history-next (default '<c-n>' and '<down>')
|
||||||
cmd-history-prev (default '<c-p>')
|
cmd-history-prev (default '<c-p>' and '<up>')
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
Go to next/previous item in the history.
|
Go to next/previous item in the history.
|
||||||
|
|||||||
@@ -219,7 +219,9 @@ func init() {
|
|||||||
gOpts.cmdkeys["<tab>"] = &callExpr{"cmd-complete", nil, 1}
|
gOpts.cmdkeys["<tab>"] = &callExpr{"cmd-complete", nil, 1}
|
||||||
gOpts.cmdkeys["<enter>"] = &callExpr{"cmd-enter", nil, 1}
|
gOpts.cmdkeys["<enter>"] = &callExpr{"cmd-enter", nil, 1}
|
||||||
gOpts.cmdkeys["<c-j>"] = &callExpr{"cmd-enter", nil, 1}
|
gOpts.cmdkeys["<c-j>"] = &callExpr{"cmd-enter", nil, 1}
|
||||||
|
gOpts.cmdkeys["<down>"] = &callExpr{"cmd-history-next", nil, 1}
|
||||||
gOpts.cmdkeys["<c-n>"] = &callExpr{"cmd-history-next", nil, 1}
|
gOpts.cmdkeys["<c-n>"] = &callExpr{"cmd-history-next", nil, 1}
|
||||||
|
gOpts.cmdkeys["<up>"] = &callExpr{"cmd-history-prev", nil, 1}
|
||||||
gOpts.cmdkeys["<c-p>"] = &callExpr{"cmd-history-prev", nil, 1}
|
gOpts.cmdkeys["<c-p>"] = &callExpr{"cmd-history-prev", nil, 1}
|
||||||
gOpts.cmdkeys["<delete>"] = &callExpr{"cmd-delete", nil, 1}
|
gOpts.cmdkeys["<delete>"] = &callExpr{"cmd-delete", nil, 1}
|
||||||
gOpts.cmdkeys["<c-d>"] = &callExpr{"cmd-delete", nil, 1}
|
gOpts.cmdkeys["<c-d>"] = &callExpr{"cmd-delete", nil, 1}
|
||||||
|
|||||||
Reference in new issue
Block a user