forked from gokcehan/lf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lf.1
1718 lines (1718 loc) · 62.2 KB
/
lf.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" Code generated by gen/man.sh DO NOT EDIT.
.TH LF 1
.SH NAME
lf \- terminal file manager
.SH SYNOPSIS
.SY lf
.OP \-command command
.OP \-config path
.OP \-cpuprofile path
.OP \-doc
.OP \-last-dir-path path
.OP \-log path
.OP \-memprofile path
.OP \-remote command
.OP \-selection-path path
.OP \-server
.OP \-single
.OP \-version
.OP \-help
.RI [ cd-or-select-path ]
.YS
.SH DESCRIPTION
lf is a terminal file manager.
.PP
Source code can be found in the repository at https://github.com/gokcehan/lf
.PP
This documentation can either be read from terminal using 'lf -doc' or online at https://pkg.go.dev/github.com/gokcehan/lf You can also use 'doc' command (default '<f-1>') inside lf to view the documentation in a pager. A man page with the same content is also available in the repository at https://github.com/gokcehan/lf/blob/master/lf.1
.PP
You can run 'lf -help' to see descriptions of command line options.
.SH QUICK REFERENCE
The following commands are provided by lf:
.PP
.EX
quit (default 'q')
up (default 'k' and '<up>')
half-up (default '<c-u>')
page-up (default '<c-b>' and '<pgup>')
scroll-up (default '<c-y>')
down (default 'j' and '<down>')
half-down (default '<c-d>')
page-down (default '<c-f>' and '<pgdn>')
scroll-down (default '<c-e>')
updir (default 'h' and '<left>')
open (default 'l' and '<right>')
jump-next (default ']')
jump-prev (default '[')
top (default 'gg' and '<home>')
bottom (default 'G' and '<end>')
high (default 'H')
middle (default 'M')
low (default 'L')
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 '<c-l>')
load
reload (default '<c-r>')
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:
.PP
.EX
cmd-escape (default '<esc>')
cmd-complete (default '<tab>')
cmd-menu-complete
cmd-menu-complete-back
cmd-menu-accept
cmd-enter (default '<c-j>' and '<enter>')
cmd-interrupt (default '<c-c>')
cmd-history-next (default '<c-n>')
cmd-history-prev (default '<c-p>')
cmd-left (default '<c-b>' and '<left>')
cmd-right (default '<c-f>' and '<right>')
cmd-home (default '<c-a>' and '<home>')
cmd-end (default '<c-e>' and '<end>')
cmd-delete (default '<c-d>' and '<delete>')
cmd-delete-back (default '<backspace>' and '<backspace2>')
cmd-delete-home (default '<c-u>')
cmd-delete-end (default '<c-k>')
cmd-delete-unix-word (default '<c-w>')
cmd-yank (default '<c-y>')
cmd-transpose (default '<c-t>')
cmd-transpose-word (default '<a-t>')
cmd-word (default '<a-f>')
cmd-word-back (default '<a-b>')
cmd-delete-word (default '<a-d>')
cmd-capitalize-word (default '<a-c>')
cmd-uppercase-word (default '<a-u>')
cmd-lowercase-word (default '<a-l>')
.EE
.PP
The following options can be used to customize the behavior of lf:
.PP
.EX
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)
dirpreviews 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 '.*')
history bool (default on)
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)
selmode string (default 'all')
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)
user_{key} string (default none)
.EE
.PP
The following environment variables are exported for shell commands:
.PP
.EX
f
fs
fx
id
PWD
OLDPWD
LF_LEVEL
OPENER
EDITOR
PAGER
SHELL
lf_{option}
lf_user_{key}
.EE
.PP
The following special shell commands are used to customize the behavior of lf when defined:
.PP
.EX
open
paste
rename
delete
pre-cd
on-cd
on-select
on-quit
.EE
.PP
The following commands/keybindings are provided by default:
.PP
.EX
Unix Windows
cmd open &$OPENER "$f" cmd open &%OPENER% %f%
map e $$EDITOR "$f" map e $%EDITOR% %f%
map i $$PAGER "$f" map i !%PAGER% %f%
map w $$SHELL map w $%SHELL%
.EE
.PP
The following additional keybindings are provided by default:
.PP
.EX
map zh set hidden!
map zr set reverse!
map zn set info
map zs set info size
map zt set info time
map za set info size:time
map sn :set sortby natural; set info
map ss :set sortby size; set info size
map st :set sortby time; set info time
map sa :set sortby atime; set info atime
map sc :set sortby ctime; set info ctime
map se :set sortby ext; set info
map gh cd ~
map <space> :toggle; down
.EE
.SH CONFIGURATION
Configuration files should be located at:
.PP
.EX
OS system-wide user-specific
Unix /etc/lf/lfrc ~/.config/lf/lfrc
Windows C:\eProgramData\elf\elfrc C:\eUsers\e<user>\eAppData\eLocal\elf\elfrc
.EE
.PP
Colors file should be located at:
.PP
.EX
OS system-wide user-specific
Unix /etc/lf/colors ~/.config/lf/colors
Windows C:\eProgramData\elf\ecolors C:\eUsers\e<user>\eAppData\eLocal\elf\ecolors
.EE
.PP
Icons file should be located at:
.PP
.EX
OS system-wide user-specific
Unix /etc/lf/icons ~/.config/lf/icons
Windows C:\eProgramData\elf\eicons C:\eUsers\e<user>\eAppData\eLocal\elf\eicons
.EE
.PP
Selection file should be located at:
.PP
.EX
Unix ~/.local/share/lf/files
Windows C:\eUsers\e<user>\eAppData\eLocal\elf\efiles
.EE
.PP
Marks file should be located at:
.PP
.EX
Unix ~/.local/share/lf/marks
Windows C:\eUsers\e<user>\eAppData\eLocal\elf\emarks
.EE
.PP
Tags file should be located at:
.PP
.EX
Unix ~/.local/share/lf/tags
Windows C:\eUsers\e<user>\eAppData\eLocal\elf\etags
.EE
.PP
History file should be located at:
.PP
.EX
Unix ~/.local/share/lf/history
Windows C:\eUsers\e<user>\eAppData\eLocal\elf\ehistory
.EE
.PP
You can configure the default values of following variables to change these locations:
.PP
.EX
$XDG_CONFIG_HOME ~/.config
$XDG_DATA_HOME ~/.local/share
%ProgramData% C:\eProgramData
%LOCALAPPDATA% C:\eUsers\e<user>\eAppData\eLocal
.EE
.PP
A sample configuration file can be found at https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
.SH COMMANDS
This section shows information about builtin commands. Modal commands do not take any arguments, but instead change the operation mode to read their input conveniently, and so they are meant to be assigned to keybindings.
.PP
.EX
quit (default 'q')
.EE
.PP
Quit lf and return to the shell.
.PP
.EX
up (default 'k' and '<up>')
half-up (default '<c-u>')
page-up (default '<c-b>' and '<pgup>')
scroll-up (default '<c-y>')
down (default 'j' and '<down>')
half-down (default '<c-d>')
page-down (default '<c-f>' and '<pgdn>')
scroll-down (default '<c-e>')
.EE
.PP
Move/scroll the current file selection upwards/downwards by one/half a page/full page.
.PP
.EX
updir (default 'h' and '<left>')
.EE
.PP
Change the current working directory to the parent directory.
.PP
.EX
open (default 'l' and '<right>')
.EE
.PP
If the current file is a directory, then change the current directory to it, otherwise, execute the 'open' command. A default 'open' command is provided to call the default system opener asynchronously with the current file as the argument. A custom 'open' command can be defined to override this default.
.PP
.EX
jump-next (default ']')
jump-prev (default '[')
.EE
.PP
Change the current working directory to the next/previous jumplist item.
.PP
.EX
top (default 'gg' and '<home>')
bottom (default 'G' and '<end>')
.EE
.PP
Move the current file selection to the top/bottom of the directory.
.PP
.EX
high (default 'H')
middle (default 'M')
low (default 'L')
.EE
.PP
Move the current file selection to the high/middle/low of the screen.
.PP
.EX
toggle
.EE
.PP
Toggle the selection of the current file or files given as arguments.
.PP
.EX
invert (default 'v')
.EE
.PP
Reverse the selection of all files in the current directory (i.e. 'toggle' all files). Selections in other directories are not effected by this command. You can define a new command to select all files in the directory by combining 'invert' with 'unselect' (i.e. 'cmd select-all :unselect; invert'), though this will also remove selections in other directories.
.PP
.EX
unselect (default 'u')
.EE
.PP
Remove the selection of all files in all directories.
.PP
.EX
glob-select
glob-unselect
.EE
.PP
Select/unselect files that match the given glob.
.PP
.EX
calcdirsize
.EE
.PP
Calculate the total size for each of the selected directories. Option 'info' should include 'size' and option 'dircounts' should be disabled to show this size. If the total size of a directory is not calculated, it will be shown as '-'.
.PP
.EX
copy (default 'y')
.EE
.PP
If there are no selections, save the path of the current file to the copy buffer, otherwise, copy the paths of selected files.
.PP
.EX
cut (default 'd')
.EE
.PP
If there are no selections, save the path of the current file to the cut buffer, otherwise, copy the paths of selected files.
.PP
.EX
paste (default 'p')
.EE
.PP
Copy/Move files in copy/cut buffer to the current working directory. A custom 'paste' command can be defined to override this default.
.PP
.EX
clear (default 'c')
.EE
.PP
Clear file paths in copy/cut buffer.
.PP
.EX
sync
.EE
.PP
Synchronize copied/cut files with server. This command is automatically called when required.
.PP
.EX
draw
.EE
.PP
Draw the screen. This command is automatically called when required.
.PP
.EX
redraw (default '<c-l>')
.EE
.PP
Synchronize the terminal and redraw the screen.
.PP
.EX
load
.EE
.PP
Load modified files and directories. This command is automatically called when required.
.PP
.EX
reload (default '<c-r>')
.EE
.PP
Flush the cache and reload all files and directories.
.PP
.EX
echo
.EE
.PP
Print given arguments to the message line at the bottom.
.PP
.EX
echomsg
.EE
.PP
Print given arguments to the message line at the bottom and also to the log file.
.PP
.EX
echoerr
.EE
.PP
Print given arguments to the message line at the bottom as 'errorfmt' and also to the log file.
.PP
.EX
cd
.EE
.PP
Change the working directory to the given argument.
.PP
.EX
select
.EE
.PP
Change the current file selection to the given argument.
.PP
.EX
delete (modal)
.EE
.PP
Remove the current file or selected file(s). A custom 'delete' command can be defined to override this default.
.PP
.EX
rename (modal) (default 'r')
.EE
.PP
Rename the current file using the builtin method. A custom 'rename' command can be defined to override this default.
.PP
.EX
source
.EE
.PP
Read the configuration file given in the argument.
.PP
.EX
push
.EE
.PP
Simulate key pushes given in the argument.
.PP
.EX
read (modal) (default ':')
.EE
.PP
Read a command to evaluate.
.PP
.EX
shell (modal) (default '$')
.EE
.PP
Read a shell command to execute.
.PP
.EX
shell-pipe (modal) (default '%')
.EE
.PP
Read a shell command to execute piping its standard I/O to the bottom statline.
.PP
.EX
shell-wait (modal) (default '!')
.EE
.PP
Read a shell command to execute and wait for a key press in the end.
.PP
.EX
shell-async (modal) (default '&')
.EE
.PP
Read a shell command to execute asynchronously without standard I/O.
.PP
.EX
find (modal) (default 'f')
find-back (modal) (default 'F')
find-next (default ';')
find-prev (default ',')
.EE
.PP
Read key(s) to find the appropriate file name match in the forward/backward direction and jump to the next/previous match.
.PP
.EX
search (default '/')
search-back (default '?')
search-next (default 'n')
search-prev (default 'N')
.EE
.PP
Read a pattern to search for a file name match in the forward/backward direction and jump to the next/previous match.
.PP
.EX
filter (modal)
setfilter
.EE
.PP
Command 'filter' reads a pattern to filter out and only view files matching the pattern. Command 'setfilter' does the same but uses an argument to set the filter immediately. You can supply an argument to 'filter', in order to use that as the starting prompt.
.PP
.EX
mark-save (modal) (default 'm')
.EE
.PP
Save the current directory as a bookmark assigned to the given key.
.PP
.EX
mark-load (modal) (default "'")
.EE
.PP
Change the current directory to the bookmark assigned to the given key. A special bookmark "'" holds the previous directory after a 'mark-load', 'cd', or 'select' command.
.PP
.EX
mark-remove (modal) (default '"')
.EE
.PP
Remove a bookmark assigned to the given key.
.PP
.EX
tag
.EE
.PP
Tag a file with '*' or a single width character given in the argument. You can define a new tag clearing command by combining 'tag' with 'tag-toggle' (i.e. 'cmd tag-clear :tag; tag-toggle').
.PP
.EX
tag-toggle (default 't')
.EE
.PP
Tag a file with '*' or a single width character given in the argument if the file is untagged, otherwise remove the tag.
.SH COMMAND LINE COMMANDS
The prompt character specifies which of the several command-line modes you are in. For example, the 'read' command takes you to the ':' mode.
.PP
When the cursor is at the first character in ':' mode, pressing one of the keys '!', '$', '%', or '&' takes you to the corresponding mode. You can go back with 'cmd-delete-back' ('<backspace>' by default).
.PP
The command line commands should be mostly compatible with readline keybindings. A character refers to a unicode code point, a word consists of letters and digits, and a unix word consists of any non-blank characters.
.PP
.EX
cmd-escape (default '<esc>')
.EE
.PP
Quit command line mode and return to normal mode.
.PP
.EX
cmd-complete (default '<tab>')
.EE
.PP
Autocomplete the current word.
.PP
.EX
cmd-menu-complete
cmd-menu-complete-back
.EE
.PP
Autocomplete the current word with menu selection. You need to assign keys to these commands (e.g. 'cmap <tab> cmd-menu-complete; cmap <backtab> cmd-menu-complete-back'). You can use the assigned keys assigned to display the menu and then cycle through completion options.
.PP
.EX
cmd-menu-accept
.EE
.PP
Accept the currently selected match in menu completion and close the menu.
.PP
.EX
cmd-enter (default '<c-j>' and '<enter>')
.EE
.PP
Execute the current line.
.PP
.EX
cmd-interrupt (default '<c-c>')
.EE
.PP
Interrupt the current shell-pipe command and return to the normal mode.
.PP
.EX
cmd-history-next (default '<c-n>')
cmd-history-prev (default '<c-p>')
.EE
.PP
Go to next/previous item in the history.
.PP
.EX
cmd-left (default '<c-b>' and '<left>')
cmd-right (default '<c-f>' and '<right>')
.EE
.PP
Move the cursor to the left/right.
.PP
.EX
cmd-home (default '<c-a>' and '<home>')
cmd-end (default '<c-e>' and '<end>')
.EE
.PP
Move the cursor to the beginning/end of line.
.PP
.EX
cmd-delete (default '<c-d>' and '<delete>')
.EE
.PP
Delete the next character.
.PP
.EX
cmd-delete-back (default '<backspace>' and '<backspace2>')
.EE
.PP
Delete the previous character. When at the beginning of a prompt, returns either to normal mode or to ':' mode.
.PP
.EX
cmd-delete-home (default '<c-u>')
cmd-delete-end (default '<c-k>')
.EE
.PP
Delete everything up to the beginning/end of line.
.PP
.EX
cmd-delete-unix-word (default '<c-w>')
.EE
.PP
Delete the previous unix word.
.PP
.EX
cmd-yank (default '<c-y>')
.EE
.PP
Paste the buffer content containing the last deleted item.
.PP
.EX
cmd-transpose (default '<c-t>')
cmd-transpose-word (default '<a-t>')
.EE
.PP
Transpose the positions of last two characters/words.
.PP
.EX
cmd-word (default '<a-f>')
cmd-word-back (default '<a-b>')
.EE
.PP
Move the cursor by one word in forward/backward direction.
.PP
.EX
cmd-delete-word (default '<a-d>')
.EE
.PP
Delete the next word in forward direction.
.PP
.EX
cmd-capitalize-word (default '<a-c>')
cmd-uppercase-word (default '<a-u>')
cmd-lowercase-word (default '<a-l>')
.EE
.PP
Capitalize/uppercase/lowercase the current word and jump to the next word.
.SH OPTIONS
This section shows information about options to customize the behavior. Character ':' is used as the separator for list options '[]int' and '[]string'.
.PP
.EX
anchorfind bool (default on)
.EE
.PP
When this option is enabled, find command starts matching patterns from the beginning of file names, otherwise, it can match at an arbitrary position.
.PP
.EX
autoquit bool (default off)
.EE
.PP
Automatically quit server when there are no clients left connected.
.PP
.EX
cleaner string (default '') (not called if empty)
.EE
.PP
Set the path of a cleaner file. The file should be executable. This file is called if previewing is enabled, the previewer is set, and the previously selected file had its preview cache disabled. Five arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively. Preview clearing is disabled when the value of this option is left empty.
.PP
.EX
dircache bool (default on)
.EE
.PP
Cache directory contents.
.PP
.EX
dircounts bool (default off)
.EE
.PP
When this option is enabled, directory sizes show the number of items inside instead of the total size of the directory, which needs to be calculated for each directory using 'calcdirsize'. This information needs to be calculated by reading the directory and counting the items inside. Therefore, this option is disabled by default for performance reasons. This option only has an effect when 'info' has a 'size' field and the pane is wide enough to show the information. 999 items are counted per directory at most, and bigger directories are shown as '999+'.
.PP
.EX
dirfirst bool (default on)
.EE
.PP
Show directories first above regular files.
.PP
.EX
dironly bool (default off)
.EE
.PP
If enabled, directories will also be passed to the previewer script. This allows custom previews for directories.
.PP
.EX
dirpreviews bool (default off)
.EE
.PP
Show only directories.
.PP
.EX
drawbox bool (default off)
.EE
.PP
Draw boxes around panes with box drawing characters.
.PP
.EX
errorfmt string (default "\e033[7;31;47m%s\e033[0m")
.EE
.PP
Format string of error messages shown in the bottom message line.
.PP
.EX
filesep string (default "\en")
.EE
.PP
File separator used in environment variables 'fs' and 'fx'.
.PP
.EX
findlen int (default 1)
.EE
.PP
Number of characters prompted for the find command. When this value is set to 0, find command prompts until there is only a single match left.
.PP
.EX
globsearch bool (default off)
.EE
.PP
When this option is enabled, search command patterns are considered as globs, otherwise they are literals. With globbing, '*' matches any sequence, '?' matches any character, and '[...]' or '[^...] matches character sets or ranges. Otherwise, these characters are interpreted as they are.
.PP
.EX
hidden bool (default off)
.EE
.PP
Show hidden files. On Unix systems, hidden files are determined by the value of 'hiddenfiles'. On Windows, only files with hidden attributes are considered hidden files.
.PP
.EX
hiddenfiles []string (default '.*')
.EE
.PP
List of hidden file glob patterns. Patterns can be given as relative or absolute paths. Globbing supports the usual special characters, '*' to match any sequence, '?' to match any character, and '[...]' or '[^...] to match character sets or ranges. In addition, if a pattern starts with '!', then its matches are excluded from hidden files.
.PP
.EX
history bool (default on)
.EE
.PP
Save command history.
.PP
.EX
icons bool (default off)
.EE
.PP
Show icons before each item in the list.
.PP
.EX
ifs string (default '')
.EE
.PP
Sets 'IFS' variable in shell commands. It works by adding the assignment to the beginning of the command string as "IFS='...'; ...". The reason is that 'IFS' variable is not inherited by the shell for security reasons. This method assumes a POSIX shell syntax and so it can fail for non-POSIX shells. This option has no effect when the value is left empty. This option does not have any effect on Windows.
.PP
.EX
ignorecase bool (default on)
.EE
.PP
Ignore case in sorting and search patterns.
.PP
.EX
ignoredia bool (default on)
.EE
.PP
Ignore diacritics in sorting and search patterns.
.PP
.EX
incsearch bool (default off)
.EE
.PP
Jump to the first match after each keystroke during searching.
.PP
.EX
incfilter bool (default off)
.EE
.PP
Apply filter pattern after each keystroke during filtering.
.PP
.EX
info []string (default '')
.EE
.PP
List of information shown for directory items at the right side of pane. Currently supported information types are 'size', 'time', 'atime', and 'ctime'. Information is only shown when the pane width is more than twice the width of information.
.PP
.EX
infotimefmtnew string (default 'Jan _2 15:04')
.EE
.PP
Format string of the file time shown in the info column when it matches this year.
.PP
.EX
infotimefmtold string (default 'Jan _2 2006')
.EE
.PP
Format string of the file time shown in the info column when it doesn't match this year.
.PP
.EX
mouse bool (default off)
.EE
.PP
Send mouse events as input.
.PP
.EX
number bool (default off)
.EE
.PP
Show the position number for directory items at the left side of pane. When 'relativenumber' option is enabled, only the current line shows the absolute position and relative positions are shown for the rest.
.PP
.EX
period int (default 0)
.EE
.PP
Set the interval in seconds for periodic checks of directory updates. This works by periodically calling the 'load' command. Note that directories are already updated automatically in many cases. This option can be useful when there is an external process changing the displayed directory and you are not doing anything in lf. Periodic checks are disabled when the value of this option is set to zero.
.PP
.EX
preview bool (default on)
.EE
.PP
Show previews of files and directories at the right most pane. If the file has more lines than the preview pane, rest of the lines are not read. Files containing the null character (U+0000) in the read portion are considered binary files and displayed as 'binary'.
.PP
.EX
previewer string (default '') (not filtered if empty)
.EE
.PP
Set the path of a previewer file to filter the content of regular files for previewing. The file should be executable. Five arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively. SIGPIPE signal is sent when enough lines are read. If the previewer returns a non-zero exit code, then the preview cache for the given file is disabled. This means that if the file is selected in the future, the previewer is called once again. Preview filtering is disabled and files are displayed as they are when the value of this option is left empty.
.PP
.EX
promptfmt string (default "\e033[32;1m%u@%h\e033[0m:\e033[34;1m%d\e033[0m\e033[1m%f\e033[0m")
.EE
.PP
Format string of the prompt shown in the top line. Special expansions are provided, '%u' as the user name, '%h' as the host name, '%w' as the working directory, '%d' as the working directory with a trailing path separator, '%f' as the file name, and '%F' as the current filter. '%S' may be used once and will provide a spacer so that the following parts are right aligned on the screen. Home folder is shown as '~' in the working directory expansion. Directory names are automatically shortened to a single character starting from the left most parent when the prompt does not fit to the screen.
.PP
.EX
ratios []int (default '1:2:3')
.EE
.PP
List of ratios of pane widths. Number of items in the list determines the number of panes in the ui. When 'preview' option is enabled, the right most number is used for the width of preview pane.
.PP
.EX
relativenumber bool (default off)
.EE
.PP
Show the position number relative to the current line. When 'number' is enabled, current line shows the absolute position, otherwise nothing is shown.
.PP
.EX
reverse bool (default off)
.EE
.PP
Reverse the direction of sort.
.PP
.EX
selmode string (default 'all')
.EE
.PP
Selection mode for commands. When set to 'all' it will use the selected files from all directories. When set to 'dir' it will only use the selected files in the current directory.
.PP
.EX
scrolloff int (default 0)
.EE
.PP
Minimum number of offset lines shown at all times in the top and the bottom of the screen when scrolling. The current line is kept in the middle when this option is set to a large value that is bigger than the half of number of lines. A smaller offset can be used when the current file is close to the beginning or end of the list to show the maximum number of items.
.PP
.EX
shell string (default 'sh' for Unix and 'cmd' for Windows)
.EE
.PP
Shell executable to use for shell commands. Shell commands are executed as 'shell shellopts shellflag command -- arguments'.
.PP
.EX
shellflag string (default '-c' for Unix and '/c' for Windows)
.EE
.PP
Command line flag used to pass shell commands.
.PP
.EX
shellopts []string (default '')
.EE
.PP
List of shell options to pass to the shell executable.
.PP
.EX
smartcase bool (default on)
.EE
.PP
Override 'ignorecase' option when the pattern contains an uppercase character. This option has no effect when 'ignorecase' is disabled.
.PP
.EX
smartdia bool (default off)
.EE
.PP
Override 'ignoredia' option when the pattern contains a character with diacritic. This option has no effect when 'ignoredia' is disabled.
.PP
.EX
sortby string (default 'natural')
.EE
.PP
Sort type for directories. Currently supported sort types are 'natural', 'name', 'size', 'time', 'ctime', 'atime', and 'ext'.
.PP
.EX
tabstop int (default 8)
.EE
.PP
Number of space characters to show for horizontal tabulation (U+0009) character.
.PP
.EX
tagfmt string (default "\e033[31m%s\e033[0m")
.EE
.PP
Format string of the tags.
.PP
.EX
tempmarks string (default '')
.EE
.PP
Marks to be considered temporary (e.g. 'abc' refers to marks 'a', 'b', and 'c'). These marks are not synced to other clients and they are not saved in the bookmarks file. Note that the special bookmark "'" is always treated as temporary and it does not need to be specified.
.PP
.EX
timefmt string (default 'Mon Jan _2 15:04:05 2006')
.EE
.PP
Format string of the file modification time shown in the bottom line.
.PP
.EX
truncatechar string (default '~')
.EE
.PP
Truncate character shown at the end when the file name does not fit to the pane.
.PP
.EX
waitmsg string (default 'Press any key to continue')
.EE
.PP
String shown after commands of shell-wait type.
.PP