diff --git a/doc.go b/doc.go index 21aa98f..9f7ddf3 100644 --- a/doc.go +++ b/doc.go @@ -71,8 +71,8 @@ The following commands are provided by lf: mark-save (modal) (default 'm') mark-load (modal) (default "'") mark-remove (modal) (default `"`) - tag-toggle (default t) - tag + tag + tag-toggle (default t) The following command line commands are provided by lf: @@ -107,6 +107,7 @@ The following options can be used to customize the behavior of lf: anchorfind bool (default on) autoquit bool (default off) + cleaner string (default '') dircache bool (default on) dircounts bool (default off) dirfirst bool (default on) @@ -125,12 +126,13 @@ The following options can be used to customize the behavior of lf: incfilter bool (default off) incsearch bool (default off) info []string (default '') + infotimefmtnew string (default 'Jan _2 15:04') + infotimefmtold string (default 'Jan _2 2006') mouse bool (default off) number bool (default off) period int (default 0) preview bool (default on) previewer string (default '') - cleaner string (default '') promptfmt string (default "\033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m") ratios []int (default '1:2:3') relativenumber bool (default off) @@ -143,15 +145,13 @@ The following options can be used to customize the behavior of lf: smartdia bool (default off) sortby string (default 'natural') tabstop int (default 8) + tagfmt string (default "\033[31m%s\033[0m") tempmarks string (default '') timefmt string (default 'Mon Jan _2 15:04:05 2006') - infotimefmtnew string (default 'Jan _2 15:04') - infotimefmtold string (default 'Jan _2 2006') truncatechar string (default '~') waitmsg string (default 'Press any key to continue') wrapscan bool (default on) wrapscroll bool (default off) - tagfmt string (default "\033[31m%s\033[0m") The following environment variables are exported for shell commands: @@ -469,7 +469,7 @@ Remove a bookmark assigned to the given key. Tag a file with a single width character given in the argument. - tag-toggle (modal) (default 't') + tag-toggle (default 't') Tag a file with a single width character given in the argument if the file is untagged, otherwise remove the tag. diff --git a/docstring.go b/docstring.go index 5144ed2..f64113f 100644 --- a/docstring.go +++ b/docstring.go @@ -21,63 +21,63 @@ Quick Reference The following commands are provided by lf: - quit (default 'q') - up (default 'k' and '') - half-up (default '') - page-up (default '' and '') - scrollup (default '') - down (default 'j' and '') - half-down (default '') - page-down (default '' and '') - scrolldown (default '') - updir (default 'h' and '') - open (default 'l' and '') - top (default 'gg' and '') - bottom (default 'G' and '') - toggle - invert (default 'v') - unselect (default 'u') - glob-select - glob-unselect - calcdirsize - copy (default 'y') - cut (default 'd') - paste (default 'p') - clear (default 'c') - sync - draw - redraw (default '') - load - reload (default '') - echo - echomsg - echoerr - cd - select - delete (modal) - rename (modal) (default 'r') - source - push - read (modal) (default ':') - shell (modal) (default '$') - shell-pipe (modal) (default '%') - shell-wait (modal) (default '!') - shell-async (modal) (default '&') - find (modal) (default 'f') - find-back (modal) (default 'F') - find-next (default ';') - find-prev (default ',') - search (modal) (default '/') - search-back (modal) (default '?') - search-next (default 'n') - search-prev (default 'N') - filter (modal) - setfilter - mark-save (modal) (default 'm') - mark-load (modal) (default "'") - mark-remove (modal) (default '"') - tag-toggle (default t) - tag + quit (default 'q') + up (default 'k' and '') + half-up (default '') + page-up (default '' and '') + scrollup (default '') + down (default 'j' and '') + half-down (default '') + page-down (default '' and '') + scrolldown (default '') + updir (default 'h' and '') + open (default 'l' and '') + top (default 'gg' and '') + bottom (default 'G' and '') + toggle + invert (default 'v') + unselect (default 'u') + glob-select + glob-unselect + calcdirsize + copy (default 'y') + cut (default 'd') + paste (default 'p') + clear (default 'c') + sync + draw + redraw (default '') + load + reload (default '') + echo + echomsg + echoerr + cd + select + delete (modal) + rename (modal) (default 'r') + source + push + read (modal) (default ':') + shell (modal) (default '$') + shell-pipe (modal) (default '%') + shell-wait (modal) (default '!') + shell-async (modal) (default '&') + find (modal) (default 'f') + find-back (modal) (default 'F') + find-next (default ';') + find-prev (default ',') + search (modal) (default '/') + search-back (modal) (default '?') + search-next (default 'n') + search-prev (default 'N') + filter (modal) + setfilter + mark-save (modal) (default 'm') + mark-load (modal) (default "'") + mark-remove (modal) (default '"') + tag + tag-toggle (default t) The following command line commands are provided by lf: @@ -110,53 +110,53 @@ The following command line commands are provided by lf: The following options can be used to customize the behavior of lf: - anchorfind bool (default on) - autoquit bool (default off) - dircache bool (default on) - dircounts bool (default off) - dirfirst bool (default on) - dironly bool (default off) - drawbox bool (default off) - errorfmt string (default "\033[7;31;47m%s\033[0m") - filesep string (default "\n") - findlen int (default 1) - globsearch bool (default off) - hidden bool (default off) - hiddenfiles []string (default '.*') - icons bool (default off) - ifs string (default '') - ignorecase bool (default on) - ignoredia bool (default on) - incfilter bool (default off) - incsearch bool (default off) - info []string (default '') - mouse bool (default off) - number bool (default off) - period int (default 0) - preview bool (default on) - previewer string (default '') - cleaner string (default '') - promptfmt string (default "\033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m") - ratios []int (default '1:2:3') - relativenumber bool (default off) - reverse bool (default off) - scrolloff int (default 0) - shell string (default 'sh' for unix and 'cmd' for windows) - shellflag string (default '-c' for unix and '/c' for windows) - shellopts []string (default '') - smartcase bool (default on) - smartdia bool (default off) - sortby string (default 'natural') - tabstop int (default 8) - tempmarks string (default '') - timefmt string (default 'Mon Jan _2 15:04:05 2006') - infotimefmtnew string (default 'Jan _2 15:04') - infotimefmtold string (default 'Jan _2 2006') - truncatechar string (default '~') - waitmsg string (default 'Press any key to continue') - wrapscan bool (default on) - wrapscroll bool (default off) - tagfmt string (default "\033[31m%s\033[0m") + anchorfind bool (default on) + autoquit bool (default off) + cleaner string (default '') + dircache bool (default on) + dircounts bool (default off) + dirfirst bool (default on) + dironly bool (default off) + drawbox bool (default off) + errorfmt string (default "\033[7;31;47m%s\033[0m") + filesep string (default "\n") + findlen int (default 1) + globsearch bool (default off) + hidden bool (default off) + hiddenfiles []string (default '.*') + icons bool (default off) + ifs string (default '') + ignorecase bool (default on) + ignoredia bool (default on) + incfilter bool (default off) + incsearch bool (default off) + info []string (default '') + infotimefmtnew string (default 'Jan _2 15:04') + infotimefmtold string (default 'Jan _2 2006') + mouse bool (default off) + number bool (default off) + period int (default 0) + preview bool (default on) + previewer string (default '') + promptfmt string (default "\033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m") + ratios []int (default '1:2:3') + relativenumber bool (default off) + reverse bool (default off) + scrolloff int (default 0) + shell string (default 'sh' for unix and 'cmd' for windows) + shellflag string (default '-c' for unix and '/c' for windows) + shellopts []string (default '') + smartcase bool (default on) + smartdia bool (default off) + sortby string (default 'natural') + tabstop int (default 8) + tagfmt string (default "\033[31m%s\033[0m") + tempmarks string (default '') + timefmt string (default 'Mon Jan _2 15:04:05 2006') + truncatechar string (default '~') + waitmsg string (default 'Press any key to continue') + wrapscan bool (default on) + wrapscroll bool (default off) The following environment variables are exported for shell commands: @@ -494,7 +494,7 @@ Remove a bookmark assigned to the given key. Tag a file with a single width character given in the argument. - tag-toggle (modal) (default 't') + tag-toggle (default 't') Tag a file with a single width character given in the argument if the file is untagged, otherwise remove the tag. diff --git a/lf.1 b/lf.1 index 909e735..b8b54d2 100644 --- a/lf.1 +++ b/lf.1 @@ -31,63 +31,63 @@ You can run 'lf -help' to see descriptions of command line options. The following commands are provided by lf: .PP .EX - quit (default 'q') - up (default 'k' and '') - half-up (default '') - page-up (default '' and '') - scrollup (default '') - down (default 'j' and '') - half-down (default '') - page-down (default '' and '') - scrolldown (default '') - updir (default 'h' and '') - open (default 'l' and '') - top (default 'gg' and '') - bottom (default 'G' and '') - toggle - invert (default 'v') - unselect (default 'u') - glob-select - glob-unselect - calcdirsize - copy (default 'y') - cut (default 'd') - paste (default 'p') - clear (default 'c') - sync - draw - redraw (default '') - load - reload (default '') - echo - echomsg - echoerr - cd - select - delete (modal) - rename (modal) (default 'r') - source - push - read (modal) (default ':') - shell (modal) (default '$') - shell-pipe (modal) (default '%') - shell-wait (modal) (default '!') - shell-async (modal) (default '&') - find (modal) (default 'f') - find-back (modal) (default 'F') - find-next (default ';') - find-prev (default ',') - search (modal) (default '/') - search-back (modal) (default '?') - search-next (default 'n') - search-prev (default 'N') - filter (modal) - setfilter - mark-save (modal) (default 'm') - mark-load (modal) (default "'") - mark-remove (modal) (default `"`) - tag-toggle (default t) - tag + quit (default 'q') + up (default 'k' and '') + half-up (default '') + page-up (default '' and '') + scrollup (default '') + down (default 'j' and '') + half-down (default '') + page-down (default '' and '') + scrolldown (default '') + updir (default 'h' and '') + open (default 'l' and '') + top (default 'gg' and '') + bottom (default 'G' and '') + toggle + invert (default 'v') + unselect (default 'u') + glob-select + glob-unselect + calcdirsize + copy (default 'y') + cut (default 'd') + paste (default 'p') + clear (default 'c') + sync + draw + redraw (default '') + load + reload (default '') + echo + echomsg + echoerr + cd + select + delete (modal) + rename (modal) (default 'r') + source + push + read (modal) (default ':') + shell (modal) (default '$') + shell-pipe (modal) (default '%') + shell-wait (modal) (default '!') + shell-async (modal) (default '&') + find (modal) (default 'f') + find-back (modal) (default 'F') + find-next (default ';') + find-prev (default ',') + search (modal) (default '/') + search-back (modal) (default '?') + search-next (default 'n') + search-prev (default 'N') + filter (modal) + setfilter + mark-save (modal) (default 'm') + mark-load (modal) (default "'") + mark-remove (modal) (default `"`) + tag + tag-toggle (default t) .EE .PP The following command line commands are provided by lf: @@ -124,53 +124,53 @@ The following command line commands are provided by lf: The following options can be used to customize the behavior of lf: .PP .EX - anchorfind bool (default on) - autoquit bool (default off) - dircache bool (default on) - dircounts bool (default off) - dirfirst bool (default on) - dironly bool (default off) - drawbox bool (default off) - errorfmt string (default "\e033[7;31;47m%s\e033[0m") - filesep string (default "\en") - findlen int (default 1) - globsearch bool (default off) - hidden bool (default off) - hiddenfiles []string (default '.*') - icons bool (default off) - ifs string (default '') - ignorecase bool (default on) - ignoredia bool (default on) - incfilter bool (default off) - incsearch bool (default off) - info []string (default '') - mouse bool (default off) - number bool (default off) - period int (default 0) - preview bool (default on) - previewer string (default '') - cleaner string (default '') - promptfmt string (default "\e033[32;1m%u@%h\e033[0m:\e033[34;1m%d\e033[0m\e033[1m%f\e033[0m") - ratios []int (default '1:2:3') - relativenumber bool (default off) - reverse bool (default off) - scrolloff int (default 0) - shell string (default 'sh' for unix and 'cmd' for windows) - shellflag string (default '-c' for unix and '/c' for windows) - shellopts []string (default '') - smartcase bool (default on) - smartdia bool (default off) - sortby string (default 'natural') - tabstop int (default 8) - tempmarks string (default '') - timefmt string (default 'Mon Jan _2 15:04:05 2006') - infotimefmtnew string (default 'Jan _2 15:04') - infotimefmtold string (default 'Jan _2 2006') - truncatechar string (default '~') - waitmsg string (default 'Press any key to continue') - wrapscan bool (default on) - wrapscroll bool (default off) - tagfmt string (default "\e033[31m%s\e033[0m") + anchorfind bool (default on) + autoquit bool (default off) + cleaner string (default '') + dircache bool (default on) + dircounts bool (default off) + dirfirst bool (default on) + dironly bool (default off) + drawbox bool (default off) + errorfmt string (default "\e033[7;31;47m%s\e033[0m") + filesep string (default "\en") + findlen int (default 1) + globsearch bool (default off) + hidden bool (default off) + hiddenfiles []string (default '.*') + icons bool (default off) + ifs string (default '') + ignorecase bool (default on) + ignoredia bool (default on) + incfilter bool (default off) + incsearch bool (default off) + info []string (default '') + infotimefmtnew string (default 'Jan _2 15:04') + infotimefmtold string (default 'Jan _2 2006') + mouse bool (default off) + number bool (default off) + period int (default 0) + preview bool (default on) + previewer string (default '') + promptfmt string (default "\e033[32;1m%u@%h\e033[0m:\e033[34;1m%d\e033[0m\e033[1m%f\e033[0m") + ratios []int (default '1:2:3') + relativenumber bool (default off) + reverse bool (default off) + scrolloff int (default 0) + shell string (default 'sh' for unix and 'cmd' for windows) + shellflag string (default '-c' for unix and '/c' for windows) + shellopts []string (default '') + smartcase bool (default on) + smartdia bool (default off) + sortby string (default 'natural') + tabstop int (default 8) + tagfmt string (default "\e033[31m%s\e033[0m") + tempmarks string (default '') + timefmt string (default 'Mon Jan _2 15:04:05 2006') + truncatechar string (default '~') + waitmsg string (default 'Press any key to continue') + wrapscan bool (default on) + wrapscroll bool (default off) .EE .PP The following environment variables are exported for shell commands: @@ -582,7 +582,7 @@ Remove a bookmark assigned to the given key. Tag a file with a single width character given in the argument. .PP .EX - tag-toggle (modal) (default 't') + tag-toggle (default 't') .EE .PP Tag a file with a single width character given in the argument if the file is untagged, otherwise remove the tag. diff --git a/ui.go b/ui.go index 524ba9f..b9d91be 100644 --- a/ui.go +++ b/ui.go @@ -452,13 +452,10 @@ func (win *win) printDir(screen tcell.Screen, dir *dir, selections map[string]in tag, ok := tags[path] if ok { - st = st.Reverse(false) - fg, bg, _ := st.Decompose() - if i == dir.pos { - win.print(screen, lnwidth+1, i, st.Background(fg), fmt.Sprintf(gOpts.tagfmt, tag)) + win.print(screen, lnwidth+1, i, tcell.StyleDefault.Reverse(true), fmt.Sprintf(gOpts.tagfmt, tag)) } else { - win.print(screen, lnwidth+1, i, st.Background(bg), fmt.Sprintf(gOpts.tagfmt, tag)) + win.print(screen, lnwidth+1, i, tcell.StyleDefault, fmt.Sprintf(gOpts.tagfmt, tag)) } } }