add timefmt option for time format in status line

Mentioned in #41.
This commit is contained in:
Gokcehan committed 2016-11-21 23:13:33 +03:00
1 parent fdf8e9d480
commit c8202bbc7a
6 files changed
+26 -18

No files matched your search

+11 -9
View File
@@ -11,6 +11,15 @@ import (
func (e *SetExpr) eval(app *App, args []string) {
switch e.opt {
case "dirfirst":
gOpts.dirfirst = true
app.nav.renew(app.nav.height)
case "nodirfirst":
gOpts.dirfirst = false
app.nav.renew(app.nav.height)
case "dirfirst!":
gOpts.dirfirst = !gOpts.dirfirst
app.nav.renew(app.nav.height)
case "hidden":
gOpts.hidden = true
app.nav.renew(app.nav.height)
@@ -26,15 +35,6 @@ func (e *SetExpr) eval(app *App, args []string) {
gOpts.preview = false
case "preview!":
gOpts.preview = !gOpts.preview
case "dirfirst":
gOpts.dirfirst = true
app.nav.renew(app.nav.height)
case "nodirfirst":
gOpts.dirfirst = false
app.nav.renew(app.nav.height)
case "dirfirst!":
gOpts.dirfirst = !gOpts.dirfirst
app.nav.renew(app.nav.height)
case "scrolloff":
n, err := strconv.Atoi(e.val)
if err != nil {
@@ -92,6 +92,8 @@ func (e *SetExpr) eval(app *App, args []string) {
}
gOpts.sortby = e.val
app.nav.renew(app.nav.height)
case "timefmt":
gOpts.timefmt = e.val
case "ratios":
toks := strings.Split(e.val, ":")
var rats []int