package main type Opts struct { hidden bool preview bool scrolloff int tabstop int ifs string previewer string shell string showinfo string sortby string ratios []int keys map[string]Expr cmds map[string]Expr } var gOpts Opts func init() { gOpts.hidden = false gOpts.preview = true gOpts.scrolloff = 0 gOpts.tabstop = 8 gOpts.shell = envShell gOpts.showinfo = "none" gOpts.sortby = "name" gOpts.ratios = []int{1, 2, 3} gOpts.keys = make(map[string]Expr) gOpts.keys["k"] = &CallExpr{"up", nil} gOpts.keys[""] = &CallExpr{"up", nil} gOpts.keys[""] = &CallExpr{"half-up", nil} gOpts.keys[""] = &CallExpr{"page-up", nil} gOpts.keys["j"] = &CallExpr{"down", nil} gOpts.keys[""] = &CallExpr{"down", nil} gOpts.keys[""] = &CallExpr{"half-down", nil} gOpts.keys[""] = &CallExpr{"page-down", nil} gOpts.keys["h"] = &CallExpr{"updir", nil} gOpts.keys[""] = &CallExpr{"updir", nil} gOpts.keys["l"] = &CallExpr{"open", nil} gOpts.keys[""] = &CallExpr{"open", nil} gOpts.keys["q"] = &CallExpr{"quit", nil} gOpts.keys["G"] = &CallExpr{"bot", nil} gOpts.keys["gg"] = &CallExpr{"top", nil} gOpts.keys[":"] = &CallExpr{"read", nil} gOpts.keys["$"] = &CallExpr{"read-shell", nil} gOpts.keys["!"] = &CallExpr{"read-shell-wait", nil} gOpts.keys["&"] = &CallExpr{"read-shell-async", nil} gOpts.keys["/"] = &CallExpr{"search", nil} gOpts.keys["?"] = &CallExpr{"search-back", nil} gOpts.keys[""] = &CallExpr{"toggle", nil} gOpts.keys["y"] = &CallExpr{"yank", nil} gOpts.keys["d"] = &CallExpr{"delete", nil} gOpts.keys["p"] = &CallExpr{"paste", nil} gOpts.keys[""] = &CallExpr{"renew", nil} gOpts.cmds = make(map[string]Expr) }