glob-select implementation (#184)

* glob-select logical implementation

* documentation

* indentation

* indentation

* indentation

* save

* merge glob selects

* check if selected before toggling

* glob-unselect

* identation ...

* return early
This commit is contained in:
Juris Arturs Majors authored and gokcehan committed 2019-06-20 18:17:47 +03:00
1 parent eb8e516cfb
commit bf39c7c63b
6 files changed
+53

No files matched your search

+21
View File
@@ -833,6 +833,27 @@ func (e *callExpr) eval(app *app, args []string) {
if wd != path {
app.nav.marks["'"] = wd
}
case "glob-select":
if len(e.args) != 1 {
app.ui.echoerr("glob-select: requires a pattern to match")
return
}
if err := app.nav.globSel(e.args[0], false); err != nil {
app.ui.echoerrf("%s", err)
return
}
case "glob-unselect":
if len(e.args) != 1 {
app.ui.echoerr("glob-unselect: requires a pattern to match")
return
}
if err := app.nav.globSel(e.args[0], true); err != nil {
app.ui.echoerrf("%s", err)
return
}
case "source":
if len(e.args) != 1 {
app.ui.echoerr("source: requires an argument")