diff --git a/comp.go b/complete.go similarity index 97% rename from comp.go rename to complete.go index c13ad76..91956e1 100644 --- a/comp.go +++ b/complete.go @@ -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) diff --git a/comp_test.go b/complete_test.go similarity index 100% rename from comp_test.go rename to complete_test.go diff --git a/doc.go b/doc.go index a165d15..831d802 100644 --- a/doc.go +++ b/doc.go @@ -55,7 +55,7 @@ The following command line commands are provided by lf with default keybindings: cmd-escape (default '') - cmd-comp (default '') + cmd-complete (default '') cmd-enter (default '' and '') cmd-hist-next (default '') cmd-hist-prev (default '') diff --git a/docstring.go b/docstring.go index 64c4fca..e0c8add 100644 --- a/docstring.go +++ b/docstring.go @@ -59,7 +59,7 @@ The following command line commands are provided by lf with default keybindings: cmd-escape (default '') - cmd-comp (default '') + cmd-complete (default '') cmd-enter (default '' and '') cmd-hist-next (default '') cmd-hist-prev (default '') diff --git a/eval.go b/eval.go index f792ce9..d4f14c1 100644 --- a/eval.go +++ b/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 { diff --git a/opts.go b/opts.go index 5ab2c17..bfbda4a 100644 --- a/opts.go +++ b/opts.go @@ -119,7 +119,7 @@ func init() { gOpts.cmdkeys[""] = &callExpr{"cmd-insert", []string{" "}, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-escape", nil, 1} - gOpts.cmdkeys[""] = &callExpr{"cmd-comp", nil, 1} + gOpts.cmdkeys[""] = &callExpr{"cmd-complete", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-enter", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-enter", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-hist-next", nil, 1}