added history options (#866)
* added history options * sorry forgot to update docs
This commit is contained in:
1 parent
aee5c3371f
commit
da2d8a2979
6 files changed
+13
No files matched your search
@@ -59,9 +59,11 @@ func newApp(ui *ui, nav *nav) *app {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (app *app) quit() {
|
func (app *app) quit() {
|
||||||
|
if gOpts.history {
|
||||||
if err := app.writeHistory(); err != nil {
|
if err := app.writeHistory(); err != nil {
|
||||||
log.Printf("writing history file: %s", err)
|
log.Printf("writing history file: %s", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !gSingleMode {
|
if !gSingleMode {
|
||||||
if err := remote(fmt.Sprintf("drop %d", gClientID)); err != nil {
|
if err := remote(fmt.Sprintf("drop %d", gClientID)); err != nil {
|
||||||
log.Printf("dropping connection: %s", err)
|
log.Printf("dropping connection: %s", err)
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ The following options can be used to customize the behavior of lf:
|
|||||||
globsearch bool (default off)
|
globsearch bool (default off)
|
||||||
hidden bool (default off)
|
hidden bool (default off)
|
||||||
hiddenfiles []string (default '.*')
|
hiddenfiles []string (default '.*')
|
||||||
|
history bool (default on)
|
||||||
icons bool (default off)
|
icons bool (default off)
|
||||||
ifs string (default '')
|
ifs string (default '')
|
||||||
ignorecase bool (default on)
|
ignorecase bool (default on)
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ The following options can be used to customize the behavior of lf:
|
|||||||
globsearch bool (default off)
|
globsearch bool (default off)
|
||||||
hidden bool (default off)
|
hidden bool (default off)
|
||||||
hiddenfiles []string (default '.*')
|
hiddenfiles []string (default '.*')
|
||||||
|
history bool (default on)
|
||||||
icons bool (default off)
|
icons bool (default off)
|
||||||
ifs string (default '')
|
ifs string (default '')
|
||||||
ignorecase bool (default on)
|
ignorecase bool (default on)
|
||||||
|
|||||||
@@ -125,6 +125,12 @@ func (e *setExpr) eval(app *app, args []string) {
|
|||||||
app.nav.position()
|
app.nav.position()
|
||||||
app.ui.sort()
|
app.ui.sort()
|
||||||
app.ui.loadFile(app.nav, true)
|
app.ui.loadFile(app.nav, true)
|
||||||
|
case "history":
|
||||||
|
gOpts.history = true
|
||||||
|
case "nohistory":
|
||||||
|
gOpts.history = false
|
||||||
|
case "history!":
|
||||||
|
gOpts.history = !gOpts.history
|
||||||
case "icons":
|
case "icons":
|
||||||
gOpts.icons = true
|
gOpts.icons = true
|
||||||
case "noicons":
|
case "noicons":
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ The following options can be used to customize the behavior of lf:
|
|||||||
globsearch bool (default off)
|
globsearch bool (default off)
|
||||||
hidden bool (default off)
|
hidden bool (default off)
|
||||||
hiddenfiles []string (default '.*')
|
hiddenfiles []string (default '.*')
|
||||||
|
history bool (default on)
|
||||||
icons bool (default off)
|
icons bool (default off)
|
||||||
ifs string (default '')
|
ifs string (default '')
|
||||||
ignorecase bool (default on)
|
ignorecase bool (default on)
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ var gOpts struct {
|
|||||||
truncatechar string
|
truncatechar string
|
||||||
ratios []int
|
ratios []int
|
||||||
hiddenfiles []string
|
hiddenfiles []string
|
||||||
|
history bool
|
||||||
info []string
|
info []string
|
||||||
shellopts []string
|
shellopts []string
|
||||||
keys map[string]expr
|
keys map[string]expr
|
||||||
@@ -117,6 +118,7 @@ func init() {
|
|||||||
gOpts.truncatechar = "~"
|
gOpts.truncatechar = "~"
|
||||||
gOpts.ratios = []int{1, 2, 3}
|
gOpts.ratios = []int{1, 2, 3}
|
||||||
gOpts.hiddenfiles = []string{".*"}
|
gOpts.hiddenfiles = []string{".*"}
|
||||||
|
gOpts.history = true
|
||||||
gOpts.info = nil
|
gOpts.info = nil
|
||||||
gOpts.shellopts = nil
|
gOpts.shellopts = nil
|
||||||
gOpts.sortType = sortType{naturalSort, dirfirstSort}
|
gOpts.sortType = sortType{naturalSort, dirfirstSort}
|
||||||
|
|||||||
Reference in new issue
Block a user