Skip to content

Commit

Permalink
Navigate cmd history with up/down (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Limero authored Feb 25, 2023
1 parent 6afefa5 commit cae576b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ The following command line commands are provided by lf:
cmd-menu-accept
cmd-enter (default '<c-j>' and '<enter>')
cmd-interrupt (default '<c-c>')
cmd-history-next (default '<c-n>')
cmd-history-prev (default '<c-p>')
cmd-history-next (default '<c-n>' and '<down>')
cmd-history-prev (default '<c-p>' and '<up>')
cmd-left (default '<c-b>' and '<left>')
cmd-right (default '<c-f>' and '<right>')
cmd-home (default '<c-a>' and '<home>')
Expand Down Expand Up @@ -531,8 +531,8 @@ Execute the current line.
Interrupt the current shell-pipe command and return to the normal mode.
cmd-history-next (default '<c-n>')
cmd-history-prev (default '<c-p>')
cmd-history-next (default '<c-n>' and '<down>')
cmd-history-prev (default '<c-p>' and '<up>')
Go to next/previous item in the history.
Expand Down
8 changes: 4 additions & 4 deletions docstring.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lf.1
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ The following command line commands are provided by lf:
cmd-menu-accept
cmd-enter (default '<c-j>' and '<enter>')
cmd-interrupt (default '<c-c>')
cmd-history-next (default '<c-n>')
cmd-history-prev (default '<c-p>')
cmd-history-next (default '<c-n>' and '<down>')
cmd-history-prev (default '<c-p>' and '<up>')
cmd-left (default '<c-b>' and '<left>')
cmd-right (default '<c-f>' and '<right>')
cmd-home (default '<c-a>' and '<home>')
Expand Down Expand Up @@ -651,8 +651,8 @@ Execute the current line.
Interrupt the current shell-pipe command and return to the normal mode.
.PP
.EX
cmd-history-next (default '<c-n>')
cmd-history-prev (default '<c-p>')
cmd-history-next (default '<c-n>' and '<down>')
cmd-history-prev (default '<c-p>' and '<up>')
.EE
.PP
Go to next/previous item in the history.
Expand Down
2 changes: 2 additions & 0 deletions opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ func init() {
gOpts.cmdkeys["<tab>"] = &callExpr{"cmd-complete", nil, 1}
gOpts.cmdkeys["<enter>"] = &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["<up>"] = &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["<c-d>"] = &callExpr{"cmd-delete", nil, 1}
Expand Down

0 comments on commit cae576b

Please sign in to comment.