1 parent
a59a5aa712
commit
4420e41c76
7 files changed
+18
-1
No files matched your search
@@ -60,6 +60,9 @@ var (
|
||||
}
|
||||
|
||||
gOptWords = []string{
|
||||
"anchorfind",
|
||||
"noanchorfind",
|
||||
"anchorfind!",
|
||||
"dircounts",
|
||||
"nodircounts",
|
||||
"dircounts!",
|
||||
|
||||
@@ -93,6 +93,7 @@ keybindings:
|
||||
|
||||
The following options can be used to customize the behavior of lf:
|
||||
|
||||
anchorfind boolean (default on)
|
||||
dircounts boolean (default off)
|
||||
dirfirst boolean (default on)
|
||||
drawbox boolean (default off)
|
||||
|
||||
@@ -96,6 +96,7 @@ keybindings:
|
||||
|
||||
The following options can be used to customize the behavior of lf:
|
||||
|
||||
anchorfind boolean (default on)
|
||||
dircounts boolean (default off)
|
||||
dirfirst boolean (default on)
|
||||
drawbox boolean (default off)
|
||||
|
||||
@@ -14,6 +14,12 @@ import (
|
||||
|
||||
func (e *setExpr) eval(app *app, args []string) {
|
||||
switch e.opt {
|
||||
case "anchorfind":
|
||||
gOpts.anchorfind = true
|
||||
case "noanchorfind":
|
||||
gOpts.anchorfind = false
|
||||
case "anchorfind!":
|
||||
gOpts.anchorfind = !gOpts.anchorfind
|
||||
case "dircounts":
|
||||
gOpts.dircounts = true
|
||||
case "nodircounts":
|
||||
|
||||
@@ -108,6 +108,7 @@ The following command line commands are provided by lf with default keybindings:
|
||||
The following options can be used to customize the behavior of lf:
|
||||
.PP
|
||||
.EX
|
||||
anchorfind boolean (default on)
|
||||
dircounts boolean (default off)
|
||||
dirfirst boolean (default on)
|
||||
drawbox boolean (default off)
|
||||
|
||||
@@ -663,7 +663,10 @@ func findMatch(name, pattern string) bool {
|
||||
name = strings.ToLower(name)
|
||||
}
|
||||
}
|
||||
return strings.HasPrefix(name, pattern)
|
||||
if gOpts.anchorfind {
|
||||
return strings.HasPrefix(name, pattern)
|
||||
}
|
||||
return strings.Contains(name, pattern)
|
||||
}
|
||||
|
||||
func (nav *nav) findSingle() int {
|
||||
|
||||
Reference in new issue
Block a user