rename 'comp' to 'complete'
This commit is contained in:
parent
3deea69c4d
commit
04f1d68d1e
@ -228,7 +228,7 @@ func matchFile(s string) (matches []string, longest string) {
|
||||
return
|
||||
}
|
||||
|
||||
func compCmd(acc []rune) (matches []string, longestAcc []rune) {
|
||||
func completeCmd(acc []rune) (matches []string, longestAcc []rune) {
|
||||
s := string(acc)
|
||||
f := tokenize(s)
|
||||
|
||||
@ -267,7 +267,7 @@ func compCmd(acc []rune) (matches []string, longestAcc []rune) {
|
||||
return
|
||||
}
|
||||
|
||||
func compShell(acc []rune) (matches []string, longestAcc []rune) {
|
||||
func completeShell(acc []rune) (matches []string, longestAcc []rune) {
|
||||
s := string(acc)
|
||||
f := tokenize(s)
|
||||
|
2
doc.go
2
doc.go
@ -55,7 +55,7 @@ The following command line commands are provided by lf with default
|
||||
keybindings:
|
||||
|
||||
cmd-escape (default '<esc>')
|
||||
cmd-comp (default '<tab>')
|
||||
cmd-complete (default '<tab>')
|
||||
cmd-enter (default '<c-j>' and '<enter>')
|
||||
cmd-hist-next (default '<c-n>')
|
||||
cmd-hist-prev (default '<c-p>')
|
||||
|
@ -59,7 +59,7 @@ The following command line commands are provided by lf with default
|
||||
keybindings:
|
||||
|
||||
cmd-escape (default '<esc>')
|
||||
cmd-comp (default '<tab>')
|
||||
cmd-complete (default '<tab>')
|
||||
cmd-enter (default '<c-j>' and '<enter>')
|
||||
cmd-hist-next (default '<c-n>')
|
||||
cmd-hist-prev (default '<c-p>')
|
||||
|
6
eval.go
6
eval.go
@ -455,12 +455,12 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.ui.cmdAccLeft = nil
|
||||
app.ui.cmdAccRight = nil
|
||||
app.ui.cmdPrefix = ""
|
||||
case "cmd-comp":
|
||||
case "cmd-complete":
|
||||
var matches []string
|
||||
if app.ui.cmdPrefix == ":" {
|
||||
matches, app.ui.cmdAccLeft = compCmd(app.ui.cmdAccLeft)
|
||||
matches, app.ui.cmdAccLeft = completeCmd(app.ui.cmdAccLeft)
|
||||
} else {
|
||||
matches, app.ui.cmdAccLeft = compShell(app.ui.cmdAccLeft)
|
||||
matches, app.ui.cmdAccLeft = completeShell(app.ui.cmdAccLeft)
|
||||
}
|
||||
app.ui.draw(app.nav)
|
||||
if len(matches) > 1 {
|
||||
|
2
opts.go
2
opts.go
@ -119,7 +119,7 @@ func init() {
|
||||
|
||||
gOpts.cmdkeys["<space>"] = &callExpr{"cmd-insert", []string{" "}, 1}
|
||||
gOpts.cmdkeys["<esc>"] = &callExpr{"cmd-escape", nil, 1}
|
||||
gOpts.cmdkeys["<tab>"] = &callExpr{"cmd-comp", nil, 1}
|
||||
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["<c-n>"] = &callExpr{"cmd-hist-next", nil, 1}
|
||||
|
Loading…
Reference in New Issue
Block a user