add builtin 'select' command to change selection

This commit is contained in:
Gokcehan committed 2018-03-27 20:47:17 +03:00
1 parent 32d729eac1
commit 4f05975e77
5 files changed
+39

No files matched your search

+11
View File
@@ -387,6 +387,17 @@ func (e *callExpr) eval(app *app, args []string) {
}
app.ui.loadFile(app.nav)
app.ui.loadFileInfo(app.nav)
case "select":
if len(e.args) != 1 {
app.ui.print("select: requires an argument")
return
}
if err := app.nav.find(e.args[0]); err != nil {
app.ui.printf("%s", err)
return
}
app.ui.loadFile(app.nav)
app.ui.loadFileInfo(app.nav)
case "push":
if len(e.args) > 0 {
log.Println("pushing keys", e.args[0])