dirtyfiles: files that don't require cleaning before previewing them (#729)
* dirtyfiles * wrong default on man page * respect alphabetic order for options * clean on shell commands * formating if
This commit is contained in:
1 parent
d879e8f8f8
commit
673dad9f07
9 files changed
+73
-4
No files matched your search
@@ -68,6 +68,24 @@ func (e *setExpr) eval(app *app, args []string) {
|
||||
gOpts.sortType.option ^= dirfirstSort
|
||||
app.nav.sort()
|
||||
app.ui.sort()
|
||||
case "dirtyfiles":
|
||||
toks := strings.Split(e.val, ":")
|
||||
for _, s := range toks {
|
||||
if s == "" {
|
||||
app.ui.echoerr("dirtyfiles: glob should be non-empty")
|
||||
return
|
||||
}
|
||||
_, err := filepath.Match(s, "a")
|
||||
if err != nil {
|
||||
app.ui.echoerrf("dirtyfiles: %s", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
gOpts.dirtyfiles = toks
|
||||
app.nav.sort()
|
||||
app.nav.position()
|
||||
app.ui.sort()
|
||||
app.ui.loadFile(app.nav, true)
|
||||
case "drawbox":
|
||||
gOpts.drawbox = true
|
||||
app.ui.renew()
|
||||
|
||||
Reference in new issue
Block a user