forked from gokcehan/lf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lf.1
2378 lines (2369 loc) · 78.8 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
.\" Automatically generated by Pandoc 2.5
.\"
.TH "LF" "1" "2023\-11\-06" "r31\-17\-g31402e6" "DOCUMENTATION"
.hy
.SH NAME
.PP
lf \- terminal file manager
.SH SYNOPSIS
.PP
\f[B]lf\f[R] [\f[B]\-command\f[R] \f[I]command\f[R]] [\f[B]\-config\f[R]
\f[I]path\f[R]] [\f[B]\-cpuprofile\f[R] \f[I]path\f[R]]
[\f[B]\-doc\f[R]] [\f[B]\-last\-dir\-path\f[R] \f[I]path\f[R]]
[\f[B]\-log path\f[R]] [\f[B]\-memprofile\f[R] \f[I]path\f[R]]
[\f[B]\-print\-last\-dir\f[R]] [\f[B]\-print\-selection\f[R]]
[\f[B]\-remote\f[R] \f[I]command\f[R]] [\f[B]\-selection\-path\f[R]
\f[I]path\f[R]] [\f[B]\-server\f[R]] [\f[B]\-single\f[R]]
[\f[B]\-version\f[R]] [\f[B]\-help\f[R]]
[\f[I]cd\-or\-select\-path\f[R]]
.SH DESCRIPTION
.PP
lf is a terminal file manager.
.PP
Source code can be found in the repository at
https://github.com/gokcehan/lf (https://github.com/gokcehan/lf)
.PP
This documentation can either be read from terminal using
\f[C]lf \-doc\f[R] or online at
https://github.com/gokcehan/lf/blob/master/doc.md (https://github.com/gokcehan/lf/blob/master/doc.md)
You can also use \f[C]doc\f[R] command (default \f[C]<f\-1>\f[R]) 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 (https://github.com/gokcehan/lf/blob/master/lf.1)
.PP
You can run \f[C]lf \-help\f[R] to see descriptions of command line
options.
.SH QUICK REFERENCE
.PP
The following commands are provided by lf:
.IP
.nf
\f[C]
quit (default \[aq]q\[aq])
up (default \[aq]k\[aq] and \[aq]<up>\[aq])
half\-up (default \[aq]<c\-u>\[aq])
page\-up (default \[aq]<c\-b>\[aq] and \[aq]<pgup>\[aq])
scroll\-up (default \[aq]<c\-y>\[aq])
down (default \[aq]j\[aq] and \[aq]<down>\[aq])
half\-down (default \[aq]<c\-d>\[aq])
page\-down (default \[aq]<c\-f>\[aq] and \[aq]<pgdn>\[aq])
scroll\-down (default \[aq]<c\-e>\[aq])
updir (default \[aq]h\[aq] and \[aq]<left>\[aq])
open (default \[aq]l\[aq] and \[aq]<right>\[aq])
jump\-next (default \[aq]]\[aq])
jump\-prev (default \[aq][\[aq])
top (default \[aq]gg\[aq] and \[aq]<home>\[aq])
bottom (default \[aq]G\[aq] and \[aq]<end>\[aq])
high (default \[aq]H\[aq])
middle (default \[aq]M\[aq])
low (default \[aq]L\[aq])
toggle
invert (default \[aq]v\[aq])
invert\-below
unselect (default \[aq]u\[aq])
glob\-select
glob\-unselect
calcdirsize
clearmaps
copy (default \[aq]y\[aq])
cut (default \[aq]d\[aq])
paste (default \[aq]p\[aq])
clear (default \[aq]c\[aq])
sync
draw
redraw (default \[aq]<c\-l>\[aq])
load
reload (default \[aq]<c\-r>\[aq])
echo
echomsg
echoerr
cd
select
delete (modal)
rename (modal) (default \[aq]r\[aq])
source
push
read (modal) (default \[aq]:\[aq])
shell (modal) (default \[aq]$\[aq])
shell\-pipe (modal) (default \[aq]%\[aq])
shell\-wait (modal) (default \[aq]!\[aq])
shell\-async (modal) (default \[aq]&\[aq])
find (modal) (default \[aq]f\[aq])
find\-back (modal) (default \[aq]F\[aq])
find\-next (default \[aq];\[aq])
find\-prev (default \[aq],\[aq])
search (modal) (default \[aq]/\[aq])
search\-back (modal) (default \[aq]?\[aq])
search\-next (default \[aq]n\[aq])
search\-prev (default \[aq]N\[aq])
filter (modal)
setfilter
mark\-save (modal) (default \[aq]m\[aq])
mark\-load (modal) (default \[dq]\[aq]\[dq])
mark\-remove (modal) (default \[aq]\[dq]\[aq])
tag
tag\-toggle (default \[aq]t\[aq])
\f[R]
.fi
.PP
The following command line commands are provided by lf:
.IP
.nf
\f[C]
cmd\-escape (default \[aq]<esc>\[aq])
cmd\-complete (default \[aq]<tab>\[aq])
cmd\-menu\-complete
cmd\-menu\-complete\-back
cmd\-menu\-accept
cmd\-enter (default \[aq]<c\-j>\[aq] and \[aq]<enter>\[aq])
cmd\-interrupt (default \[aq]<c\-c>\[aq])
cmd\-history\-next (default \[aq]<c\-n>\[aq] and \[aq]<down>\[aq])
cmd\-history\-prev (default \[aq]<c\-p>\[aq] and \[aq]<up>\[aq])
cmd\-left (default \[aq]<c\-b>\[aq] and \[aq]<left>\[aq])
cmd\-right (default \[aq]<c\-f>\[aq] and \[aq]<right>\[aq])
cmd\-home (default \[aq]<c\-a>\[aq] and \[aq]<home>\[aq])
cmd\-end (default \[aq]<c\-e>\[aq] and \[aq]<end>\[aq])
cmd\-delete (default \[aq]<c\-d>\[aq] and \[aq]<delete>\[aq])
cmd\-delete\-back (default \[aq]<backspace>\[aq] and \[aq]<backspace2>\[aq])
cmd\-delete\-home (default \[aq]<c\-u>\[aq])
cmd\-delete\-end (default \[aq]<c\-k>\[aq])
cmd\-delete\-unix\-word (default \[aq]<c\-w>\[aq])
cmd\-yank (default \[aq]<c\-y>\[aq])
cmd\-transpose (default \[aq]<c\-t>\[aq])
cmd\-transpose\-word (default \[aq]<a\-t>\[aq])
cmd\-word (default \[aq]<a\-f>\[aq])
cmd\-word\-back (default \[aq]<a\-b>\[aq])
cmd\-delete\-word (default \[aq]<a\-d>\[aq])
cmd\-delete\-word\-back (default \[aq]<a\-backspace>\[aq] and \[aq]<a\-backspace2>\[aq])
cmd\-capitalize\-word (default \[aq]<a\-c>\[aq])
cmd\-uppercase\-word (default \[aq]<a\-u>\[aq])
cmd\-lowercase\-word (default \[aq]<a\-l>\[aq])
\f[R]
.fi
.PP
The following options can be used to customize the behavior of lf:
.IP
.nf
\f[C]
anchorfind bool (default true)
autoquit bool (default false)
borderfmt string (default \[dq]\[rs]033[0m\[dq])
cleaner string (default \[aq]\[aq])
cursoractivefmt string (default \[dq]\[rs]033[7m\[dq])
cursorparentfmt string (default \[dq]\[rs]033[7m\[dq])
cursorpreviewfmt string (default \[dq]\[rs]033[4m\[dq])
dircache bool (default true)
dircounts bool (default false)
dirfirst bool (default true)
dironly bool (default false)
dirpreviews bool (default false)
drawbox bool (default false)
dupfilefmt string (default \[aq]%f.\[ti]%n\[ti]\[aq])
errorfmt string (default \[dq]\[rs]033[7;31;47m\[dq])
filesep string (default \[dq]\[rs]n\[dq])
findlen int (default 1)
globsearch bool (default false)
hidden bool (default false)
hiddenfiles []string (default \[aq].*\[aq])
history bool (default true)
icons bool (default false)
ifs string (default \[aq]\[aq])
ignorecase bool (default true)
ignoredia bool (default true)
incfilter bool (default false)
incsearch bool (default false)
info []string (default \[aq]\[aq])
infotimefmtnew string (default \[aq]Jan _2 15:04\[aq])
infotimefmtold string (default \[aq]Jan _2 2006\[aq])
mouse bool (default false)
number bool (default false)
numberfmt string (default \[dq]\[rs]033[33m\[dq])
period int (default 0)
preserve []string (default \[dq]mode\[dq])
preview bool (default true)
previewer string (default \[aq]\[aq])
promptfmt string (default \[dq]\[rs]033[32;1m%u\[at]%h\[rs]033[0m:\[rs]033[34;1m%d\[rs]033[0m\[rs]033[1m%f\[rs]033[0m\[dq])
ratios []int (default \[aq]1:2:3\[aq])
relativenumber bool (default false)
reverse bool (default false)
ruler []string (default \[aq]acc:progress:selection:filter:ind\[aq])
rulerfmt string (default \[dq] %a| %p| \[rs]033[7;31m %m \[rs]033[0m| \[rs]033[7;33m %c \[rs]033[0m| \[rs]033[7;35m %s \[rs]033[0m| \[rs]033[7;34m %f \[rs]033[0m| %i/%t\[dq])
scrolloff int (default 0)
selmode string (default \[aq]all\[aq])
shell string (default \[aq]sh\[aq] for Unix and \[aq]cmd\[aq] for Windows)
shellflag string (default \[aq]\-c\[aq] for Unix and \[aq]/c\[aq] for Windows)
shellopts []string (default \[aq]\[aq])
sixel bool (default false)
smartcase bool (default true)
smartdia bool (default false)
sortby string (default \[aq]natural\[aq])
statfmt string (default \[dq]\[rs]033[36m%p\[rs]033[0m| %c| %u| %g| %S| %t| \-> %l\[dq])
tabstop int (default 8)
tagfmt string (default \[dq]\[rs]033[31m\[dq])
tempmarks string (default \[aq]\[aq])
timefmt string (default \[aq]Mon Jan _2 15:04:05 2006\[aq])
truncatechar string (default \[aq]\[ti]\[aq])
truncatepct int (default 100)
waitmsg string (default \[aq]Press any key to continue\[aq])
wrapscan bool (default true)
wrapscroll bool (default false)
user_{option} string (default none)
\f[R]
.fi
.PP
The following environment variables are exported for shell commands:
.IP
.nf
\f[C]
f
fs
fx
id
PWD
OLDPWD
LF_LEVEL
OPENER
VISUAL
EDITOR
PAGER
SHELL
lf
lf_{option}
lf_user_{option}
lf_width
lf_height
lf_count
\f[R]
.fi
.PP
The following special shell commands are used to customize the behavior
of lf when defined:
.IP
.nf
\f[C]
open
paste
rename
delete
pre\-cd
on\-cd
on\-select
on\-redraw
on\-quit
\f[R]
.fi
.PP
The following commands/keybindings are provided by default:
.IP
.nf
\f[C]
Unix
cmd open &$OPENER \[dq]$f\[dq]
map e $$EDITOR \[dq]$f\[dq]
map i $$PAGER \[dq]$f\[dq]
map w $$SHELL
cmd doc $$lf \-doc | $PAGER
map <f\-1> doc
cmd maps $lf \-remote \[dq]query $id maps\[dq] | $PAGER
cmd cmaps $lf \-remote \[dq]query $id cmaps\[dq] | $PAGER
cmd cmds $lf \-remote \[dq]query $id cmds\[dq] | $PAGER
Windows
cmd open &%OPENER% %f%
map e $%EDITOR% %f%
map i !%PAGER% %f%
map w $%SHELL%
cmd doc !%lf% \-doc | %PAGER%
map <f\-1> doc
cmd maps !%lf% \-remote \[dq]query %id% maps\[dq] | %PAGER%
cmd cmaps !%lf% \-remote \[dq]query %id% cmaps\[dq] | %PAGER%
cmd cmds !%lf% \-remote \[dq]query %id% cmds\[dq] | %PAGER%
\f[R]
.fi
.PP
The following additional keybindings are provided by default:
.IP
.nf
\f[C]
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 \[ti]
map <space> :toggle; down
\f[R]
.fi
.PP
If the \f[C]mouse\f[R] option is enabled, mouse buttons have the
following default effects:
.IP
.nf
\f[C]
Left mouse button
Click on a file or directory to select it.
Right mouse button
Enter a directory or open a file. Also works on the preview window.
Scroll wheel
Move up or down. If Ctrl is pressed, scroll up or down.
\f[R]
.fi
.SH CONFIGURATION
.PP
Configuration files should be located at:
.IP
.nf
\f[C]
OS system\-wide user\-specific
Unix /etc/lf/lfrc \[ti]/.config/lf/lfrc
Windows C:\[rs]ProgramData\[rs]lf\[rs]lfrc C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local\[rs]lf\[rs]lfrc
\f[R]
.fi
.PP
Colors file should be located at:
.IP
.nf
\f[C]
OS system\-wide user\-specific
Unix /etc/lf/colors \[ti]/.config/lf/colors
Windows C:\[rs]ProgramData\[rs]lf\[rs]colors C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local\[rs]lf\[rs]colors
\f[R]
.fi
.PP
Icons file should be located at:
.IP
.nf
\f[C]
OS system\-wide user\-specific
Unix /etc/lf/icons \[ti]/.config/lf/icons
Windows C:\[rs]ProgramData\[rs]lf\[rs]icons C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local\[rs]lf\[rs]icons
\f[R]
.fi
.PP
Selection file should be located at:
.IP
.nf
\f[C]
Unix \[ti]/.local/share/lf/files
Windows C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local\[rs]lf\[rs]files
\f[R]
.fi
.PP
Marks file should be located at:
.IP
.nf
\f[C]
Unix \[ti]/.local/share/lf/marks
Windows C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local\[rs]lf\[rs]marks
\f[R]
.fi
.PP
Tags file should be located at:
.IP
.nf
\f[C]
Unix \[ti]/.local/share/lf/tags
Windows C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local\[rs]lf\[rs]tags
\f[R]
.fi
.PP
History file should be located at:
.IP
.nf
\f[C]
Unix \[ti]/.local/share/lf/history
Windows C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local\[rs]lf\[rs]history
\f[R]
.fi
.PP
You can configure these locations with the following variables given
with their order of precedences and their default values:
.IP
.nf
\f[C]
Unix
$LF_CONFIG_HOME
$XDG_CONFIG_HOME
\[ti]/.config
$LF_DATA_HOME
$XDG_DATA_HOME
\[ti]/.local/share
Windows
%ProgramData%
C:\[rs]ProgramData
%LF_CONFIG_HOME%
%LOCALAPPDATA%
C:\[rs]Users\[rs]<user>\[rs]AppData\[rs]Local
\f[R]
.fi
.PP
A sample configuration file can be found at
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example (https://github.com/gokcehan/lf/blob/master/etc/lfrc.example)
.SH COMMANDS
.PP
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.
.SS quit (default \f[C]q\f[R])
.PP
Quit lf and return to the shell.
.SS up (default \f[C]k\f[R] and \f[C]<up>\f[R]), half\-up (default \f[C]<c\-u>\f[R]), page\-up (default \f[C]<c\-b>\f[R] and \f[C]<pgup>\f[R]), scroll\-up (default \f[C]<c\-y>\f[R]), down (default \f[C]j\f[R] and \f[C]<down>\f[R]), half\-down (default \f[C]<c\-d>\f[R]), page\-down (default \f[C]<c\-f>\f[R] and \f[C]<pgdn>\f[R]), scroll\-down (default \f[C]<c\-e>\f[R])
.PP
Move/scroll the current file selection upwards/downwards by one/half a
page/full page.
.SS updir (default \f[C]h\f[R] and \f[C]<left>\f[R])
.PP
Change the current working directory to the parent directory.
.SS open (default \f[C]l\f[R] and \f[C]<right>\f[R])
.PP
If the current file is a directory, then change the current directory to
it, otherwise, execute the \f[C]open\f[R] command.
A default \f[C]open\f[R] command is provided to call the default system
opener asynchronously with the current file as the argument.
A custom \f[C]open\f[R] command can be defined to override this default.
.SS jump\-next (default \f[C]]\f[R]), jump\-prev (default \f[C][\f[R])
.PP
Change the current working directory to the next/previous jumplist item.
.SS top (default \f[C]gg\f[R] and \f[C]<home>\f[R]), bottom (default \f[C]G\f[R] and \f[C]<end>\f[R])
.PP
Move the current file selection to the top/bottom of the directory.
A count can be specified to move to a specific line, for example use
\f[C]3G\f[R] to move to the third line.
.SS high (default \f[C]H\f[R]), middle (default \f[C]M\f[R]), low (default \f[C]L\f[R])
.PP
Move the current file selection to the high/middle/low of the screen.
.SS toggle
.PP
Toggle the selection of the current file or files given as arguments.
.SS invert (default \f[C]v\f[R])
.PP
Reverse the selection of all files in the current directory (i.e.
\f[C]toggle\f[R] 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 \f[C]invert\f[R] with \f[C]unselect\f[R] (i.e.
\f[C]cmd select\-all :unselect; invert\f[R]), though this will also
remove selections in other directories.
.SS invert\-below
.PP
Reverse the selection (i.e.
\f[C]toggle\f[R]) of all files at or after the current file in the
current directory.
.PP
To select a contiguous block of files, use this command on the first
file you want to select.
Then, move down to the first file you do \f[I]not\f[R] want to select
(the one after the end of the desired selection) and use this command
again.
This achieves an effect similar to the visual mode in vim.
.PP
This command is experimental and may be removed once a better
replacement for the visual mode is implemented in \f[C]lf\f[R].
If you\[aq]d like to experiment with using this command, you should bind
it to a key (e.g.
\f[C]V\f[R]) for a better experience.
.SS unselect (default \f[C]u\f[R])
.PP
Remove the selection of all files in all directories.
.SS glob\-select, glob\-unselect
.PP
Select/unselect files that match the given glob.
.SS calcdirsize
.PP
Calculate the total size for each of the selected directories.
Option \f[C]info\f[R] should include \f[C]size\f[R] and option
\f[C]dircounts\f[R] should be disabled to show this size.
If the total size of a directory is not calculated, it will be shown as
\f[C]\-\f[R].
.SS clearmaps
.PP
Remove all keybindings associated with the \f[C]map\f[R] command.
This command can be used in the config file to remove the default
keybindings.
For safety purposes, \f[C]:\f[R] is left mapped to the \f[C]read\f[R]
command, and \f[C]cmap\f[R] keybindings are retained so that it is still
possible to exit \f[C]lf\f[R] using \f[C]:quit\f[R].
.SS copy (default \f[C]y\f[R])
.PP
If there are no selections, save the path of the current file to the
copy buffer, otherwise, copy the paths of selected files.
.SS cut (default \f[C]d\f[R])
.PP
If there are no selections, save the path of the current file to the cut
buffer, otherwise, copy the paths of selected files.
.SS paste (default \f[C]p\f[R])
.PP
Copy/Move files in copy/cut buffer to the current working directory.
A custom \f[C]paste\f[R] command can be defined to override this
default.
.SS clear (default \f[C]c\f[R])
.PP
Clear file paths in copy/cut buffer.
.SS sync
.PP
Synchronize copied/cut files with server.
This command is automatically called when required.
.SS draw
.PP
Draw the screen.
This command is automatically called when required.
.SS redraw (default \f[C]<c\-l>\f[R])
.PP
Synchronize the terminal and redraw the screen.
.SS load
.PP
Load modified files and directories.
This command is automatically called when required.
.SS reload (default \f[C]<c\-r>\f[R])
.PP
Flush the cache and reload all files and directories.
.SS echo
.PP
Print given arguments to the message line at the bottom.
.SS echomsg
.PP
Print given arguments to the message line at the bottom and also to the
log file.
.SS echoerr
.PP
Print given arguments to the message line at the bottom as
\f[C]errorfmt\f[R] and also to the log file.
.SS cd
.PP
Change the working directory to the given argument.
.SS select
.PP
Change the current file selection to the given argument.
.SS delete (modal)
.PP
Remove the current file or selected file(s).
A custom \f[C]delete\f[R] command can be defined to override this
default.
.SS rename (modal) (default \f[C]r\f[R])
.PP
Rename the current file using the builtin method.
A custom \f[C]rename\f[R] command can be defined to override this
default.
.SS source
.PP
Read the configuration file given in the argument.
.SS push
.PP
Simulate key pushes given in the argument.
.SS read (modal) (default \f[C]:\f[R])
.PP
Read a command to evaluate.
.SS shell (modal) (default \f[C]$\f[R])
.PP
Read a shell command to execute.
.SS shell\-pipe (modal) (default \f[C]%\f[R])
.PP
Read a shell command to execute piping its standard I/O to the bottom
statline.
.SS shell\-wait (modal) (default \f[C]!\f[R])
.PP
Read a shell command to execute and wait for a key press in the end.
.SS shell\-async (modal) (default \f[C]&\f[R])
.PP
Read a shell command to execute asynchronously without standard I/O.
.SS find (modal) (default \f[C]f\f[R]), find\-back (modal) (default \f[C]F\f[R]), find\-next (default \f[C];\f[R]), find\-prev (default \f[C],\f[R])
.PP
Read key(s) to find the appropriate file name match in the
forward/backward direction and jump to the next/previous match.
.SS search (default \f[C]/\f[R]), search\-back (default \f[C]?\f[R]), search\-next (default \f[C]n\f[R]), search\-prev (default \f[C]N\f[R])
.PP
Read a pattern to search for a file name match in the forward/backward
direction and jump to the next/previous match.
.SS filter (modal), setfilter
.PP
Command \f[C]filter\f[R] reads a pattern to filter out and only view
files matching the pattern.
Command \f[C]setfilter\f[R] does the same but uses an argument to set
the filter immediately.
You can supply an argument to \f[C]filter\f[R], in order to use that as
the starting prompt.
.SS mark\-save (modal) (default \f[C]m\f[R])
.PP
Save the current directory as a bookmark assigned to the given key.
.SS mark\-load (modal) (default \f[C]\[aq]\f[R])
.PP
Change the current directory to the bookmark assigned to the given key.
A special bookmark \f[C]\[aq]\f[R] holds the previous directory after a
\f[C]mark\-load\f[R], \f[C]cd\f[R], or \f[C]select\f[R] command.
.SS mark\-remove (modal) (default \f[C]\[dq]\f[R])
.PP
Remove a bookmark assigned to the given key.
.SS tag
.PP
Tag a file with \f[C]*\f[R] or a single width character given in the
argument.
You can define a new tag clearing command by combining \f[C]tag\f[R]
with \f[C]tag\-toggle\f[R] (i.e.
\f[C]cmd tag\-clear :tag; tag\-toggle\f[R]).
.SS tag\-toggle (default \f[C]t\f[R])
.PP
Tag a file with \f[C]*\f[R] or a single width character given in the
argument if the file is untagged, otherwise remove the tag.
.SH COMMAND LINE COMMANDS
.PP
The prompt character specifies which of the several command\-line modes
you are in.
For example, the \f[C]read\f[R] command takes you to the \f[C]:\f[R]
mode.
.PP
When the cursor is at the first character in \f[C]:\f[R] mode, pressing
one of the keys \f[C]!\f[R], \f[C]$\f[R], \f[C]%\f[R], or \f[C]&\f[R]
takes you to the corresponding mode.
You can go back with \f[C]cmd\-delete\-back\f[R] (\f[C]<backspace>\f[R]
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.
.SS cmd\-escape (default \f[C]<esc>\f[R])
.PP
Quit command line mode and return to normal mode.
.SS cmd\-complete (default \f[C]<tab>\f[R])
.PP
Autocomplete the current word.
.SS cmd\-menu\-complete, cmd\-menu\-complete\-back
.PP
Autocomplete the current word with menu selection.
You need to assign keys to these commands (e.g.
\f[C]cmap <tab> cmd\-menu\-complete; cmap <backtab> cmd\-menu\-complete\-back\f[R]).
You can use the assigned keys assigned to display the menu and then
cycle through completion options.
.SS cmd\-menu\-accept
.PP
Accept the currently selected match in menu completion and close the
menu.
.SS cmd\-enter (default \f[C]<c\-j>\f[R] and \f[C]<enter>\f[R])
.PP
Execute the current line.
.SS cmd\-interrupt (default \f[C]<c\-c>\f[R])
.PP
Interrupt the current shell\-pipe command and return to the normal mode.
.SS cmd\-history\-next (default \f[C]<c\-n>\f[R] and \f[C]<down>\f[R]), cmd\-history\-prev (default \f[C]<c\-p>\f[R] and \f[C]<up>\f[R])
.PP
Go to next/previous item in the history.
.SS cmd\-left (default \f[C]<c\-b>\f[R] and \f[C]<left>\f[R]), cmd\-right (default \f[C]<c\-f>\f[R] and \f[C]<right>\f[R])
.PP
Move the cursor to the left/right.
.SS cmd\-home (default \f[C]<c\-a>\f[R] and \f[C]<home>\f[R]), cmd\-end (default \f[C]<c\-e>\f[R] and \f[C]<end>\f[R])
.PP
Move the cursor to the beginning/end of line.
.SS cmd\-delete (default \f[C]<c\-d>\f[R] and \f[C]<delete>\f[R])
.PP
Delete the next character.
.SS cmd\-delete\-back (default \f[C]<backspace>\f[R] and \f[C]<backspace2>\f[R])
.PP
Delete the previous character.
When at the beginning of a prompt, returns either to normal mode or to
\f[C]:\f[R] mode.
.SS cmd\-delete\-home (default \f[C]<c\-u>\f[R]), cmd\-delete\-end (default \f[C]<c\-k>\f[R])
.PP
Delete everything up to the beginning/end of line.
.SS cmd\-delete\-unix\-word (default \f[C]<c\-w>\f[R])
.PP
Delete the previous unix word.
.SS cmd\-yank (default \f[C]<c\-y>\f[R])
.PP
Paste the buffer content containing the last deleted item.
.SS cmd\-transpose (default \f[C]<c\-t>\f[R]), cmd\-transpose\-word (default \f[C]<a\-t>\f[R])
.PP
Transpose the positions of last two characters/words.
.SS cmd\-word (default \f[C]<a\-f>\f[R]), cmd\-word\-back (default \f[C]<a\-b>\f[R])
.PP
Move the cursor by one word in forward/backward direction.
.SS cmd\-delete\-word (default \f[C]<a\-d>\f[R])
.PP
Delete the next word in forward direction.
.SS cmd\-delete\-word\-back (default \f[C]<a\-backspace>\f[R] and \f[C]<a\-backspace2>\f[R])
.PP
Delete the previous word in backward direction.
.SS cmd\-capitalize\-word (default \f[C]<a\-c>\f[R]), cmd\-uppercase\-word (default \f[C]<a\-u>\f[R]), cmd\-lowercase\-word (default \f[C]<a\-l>\f[R])
.PP
Capitalize/uppercase/lowercase the current word and jump to the next
word.
.SH OPTIONS
.PP
This section shows information about options to customize the behavior.
Character \f[C]:\f[R] is used as the separator for list options
\f[C][]int\f[R] and \f[C][]string\f[R].
.SS anchorfind (bool) (default true)
.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.
.SS autoquit (bool) (default false)
.PP
Automatically quit server when there are no clients left connected.
.SS borderfmt (string) (default \f[C]\[rs]033[0m\f[R])
.PP
Format string of the box drawing characters enabled by the
\f[C]drawbox\f[R] option.
.SS cleaner (string) (default \[ga]\[ga]) (not called if empty)
.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.
The following arguments are passed to the file, (1) current file name,
(2) width, (3) height, (4) horizontal position, (5) vertical position of
preview pane and (6) next file name to be previewed respectively.
Preview cleaning is disabled when the value of this option is left
empty.
.SS cursoractivefmt (string) (default \f[C]\[rs]033[7m\f[R]), cursorparentfmt string (default \f[C]\[rs]033[7m\f[R]), cursorpreviewfmt string (default \f[C]\[rs]033[4m\f[R])
.PP
Format strings for highlighting the cursor.
\f[C]cursoractivefmt\f[R] applies in the current directory pane,
\f[C]cursorparentfmt\f[R] applies in panes that show parents of the
current directory, and \f[C]cursorpreviewfmt\f[R] applies in panes that
preview directories.
.PP
The default is to make the active cursor and the parent directory cursor
inverted.
The preview cursor is underlined.
.PP
Some other possibilities to consider for the preview or parent cursors:
an empty string for no cursor, \f[C]\[rs]033[7;2m\f[R] for dimmed
inverted text (visibility varies by terminal), \f[C]\[rs]033[7;90m\f[R]
for inverted text with grey (aka \[dq]brightblack\[dq]) background.
.PP
If the format string contains the characters \f[C]%s\f[R], it is
interpreted as a format string for \f[C]fmt.Sprintf\f[R].
Such a string should end with the terminal reset sequence.
For example, \f[C]\[rs]033[4m%s\[rs]033[0m\f[R] has the same effect as
\f[C]\[rs]033[4m\f[R].
.SS dircache (bool) (default true)
.PP
Cache directory contents.
.SS dircounts (bool) (default false)
.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 \f[C]calcdirsize\f[R].
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 \f[C]info\f[R] has a \f[C]size\f[R]
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 \f[C]999+\f[R].
.SS dirfirst (bool) (default true)
.PP
Show directories first above regular files.
.SS dironly (bool) (default false)
.PP
Show only directories.
.SS dirpreviews (bool) (default false)
.PP
If enabled, directories will also be passed to the previewer script.
This allows custom previews for directories.
.SS drawbox (bool) (default false)
.PP
Draw boxes around panes with box drawing characters.
.SS dupfilefmt (string) (default \f[C]%f.\[ti]%n\[ti]\f[R])
.PP
Format string of file name when creating duplicate files.
With the default format, copying a file \f[C]abc.txt\f[R] to the same
directory will result in a duplicate file called
\f[C]abc.txt.\[ti]1\[ti]\f[R].
Special expansions are provided, \f[C]%f\f[R] as the file name,
\f[C]%b\f[R] for basename (file name without extension), \f[C]%e\f[R] as
the extension (including the dot) and \f[C]%n\f[R] as the number of
duplicates.
.SS errorfmt (string) (default \f[C]\[rs]033[7;31;47m\f[R])
.PP
Format string of error messages shown in the bottom message line.
.PP
If the format string contains the characters \f[C]%s\f[R], it is
interpreted as a format string for \f[C]fmt.Sprintf\f[R].
Such a string should end with the terminal reset sequence.
For example, \f[C]\[rs]033[4m%s\[rs]033[0m\f[R] has the same effect as
\f[C]\[rs]033[4m\f[R].
.SS filesep (string) (default \f[C]\[rs]n\f[R])
.PP
File separator used in environment variables \f[C]fs\f[R] and
\f[C]fx\f[R].
.SS findlen (int) (default 1)
.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.
.SS globsearch (bool) (default false)
.PP
When this option is enabled, search command patterns are considered as
globs, otherwise they are literals.
With globbing, \f[C]*\f[R] matches any sequence, \f[C]?\f[R] matches any
character, and \f[C][...]\f[R] or \f[C][\[ha]...]\f[R] matches character
sets or ranges.
Otherwise, these characters are interpreted as they are.
.SS hidden (bool) (default false)
.PP
Show hidden files.
On Unix systems, hidden files are determined by the value of
\f[C]hiddenfiles\f[R].
On Windows, only files with hidden attributes are considered hidden
files.
.SS hiddenfiles ([]string) (default \f[C].*\f[R])
.PP
List of hidden file glob patterns.
Patterns can be given as relative or absolute paths.
Globbing supports the usual special characters, \f[C]*\f[R] to match any
sequence, \f[C]?\f[R] to match any character, and \f[C][...]\f[R] or
\f[C][\[ha]...]\f[R] to match character sets or ranges.
In addition, if a pattern starts with \f[C]!\f[R], then its matches are
excluded from hidden files.
To add multiple patterns, use \f[C]:\f[R] as a separator.
Example: \f[C].*:lost+found:*.bak\f[R]
.SS history (bool) (default true)
.PP
Save command history.
.SS icons (bool) (default false)
.PP
Show icons before each item in the list.
.SS ifs (string) (default \[ga]\[ga])
.PP
Sets \f[C]IFS\f[R] variable in shell commands.
It works by adding the assignment to the beginning of the command string
as \f[C]IFS=...; ...\f[R].
The reason is that \f[C]IFS\f[R] 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.
.SS ignorecase (bool) (default true)
.PP
Ignore case in sorting and search patterns.
.SS ignoredia (bool) (default true)
.PP
Ignore diacritics in sorting and search patterns.
.SS incsearch (bool) (default false)
.PP
Jump to the first match after each keystroke during searching.
.SS incfilter (bool) (default false)
.PP
Apply filter pattern after each keystroke during filtering.
.SS info ([]string) (default \[ga]\[ga])
.PP
List of information shown for directory items at the right side of pane.
Currently supported information types are \f[C]size\f[R],
\f[C]time\f[R], \f[C]atime\f[R], and \f[C]ctime\f[R].
Information is only shown when the pane width is more than twice the
width of information.
.SS infotimefmtnew (string) (default \f[C]Jan _2 15:04\f[R])
.PP
Format string of the file time shown in the info column when it matches
this year.
.SS infotimefmtold (string) (default \f[C]Jan _2 2006\f[R])
.PP
Format string of the file time shown in the info column when it
doesn\[aq]t match this year.
.SS mouse (bool) (default false)
.PP
Send mouse events as input.
.SS number (bool) (default false)
.PP
Show the position number for directory items at the left side of pane.
When \f[C]relativenumber\f[R] option is enabled, only the current line
shows the absolute position and relative positions are shown for the
rest.
.SS numberfmt (string) (default \f[C]\[rs]033[33m\f[R])
.PP
Format string of the position number for each line.
.SS period (int) (default 0)
.PP
Set the interval in seconds for periodic checks of directory updates.
This works by periodically calling the \f[C]load\f[R] 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.
.SS preserve ([]string) (default \f[C]mode\f[R])
.PP
List of attributes that are preserved when copying files.
Currently supported attributes are \f[C]mode\f[R] (i.a.
access mode) and \f[C]timestamps\f[R] (i.e.
modification time and access time).
Note, preserving other attribute like ownership of change/birth
timestamp is desirable, but not portably supported in Go.
.SS preview (bool) (default true)
.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 \f[C]binary\f[R].
.SS previewer (string) (default \[ga]\[ga]) (not filtered if empty)
.PP
Set the path of a previewer file to filter the content of regular files
for previewing.
The file should be executable.
The following 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.
.SS promptfmt (string) (default \f[C]\[rs]033[32;1m%u\[at]%h\[rs]033[0m:\[rs]033[34;1m%d\[rs]033[0m\[rs]033[1m%f\[rs]033[0m\f[R])
.PP
Format string of the prompt shown in the top line.
Special expansions are provided, \f[C]%u\f[R] as the user name,
\f[C]%h\f[R] as the host name, \f[C]%w\f[R] as the working directory,
\f[C]%d\f[R] as the working directory with a trailing path separator,
\f[C]%f\f[R] as the file name, and \f[C]%F\f[R] as the current filter.
\f[C]%S\f[R] 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 \f[C]\[ti]\f[R] 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.
.SS ratios ([]int) (default \f[C]1:2:3\f[R])
.PP
List of ratios of pane widths.
Number of items in the list determines the number of panes in the ui.
When \f[C]preview\f[R] option is enabled, the right most number is used
for the width of preview pane.
.SS relativenumber (bool) (default false)
.PP
Show the position number relative to the current line.
When \f[C]number\f[R] is enabled, current line shows the absolute
position, otherwise nothing is shown.
.SS reverse (bool) (default false)
.PP
Reverse the direction of sort.
.SS ruler ([]string) (default \f[C]acc:progress:selection:filter:ind\f[R])
.PP
This option is deprecated in favor of using the \f[C]rulerfmt\f[R]
option (see below).
List of information shown in status line ruler.
Currently supported information types are \f[C]acc\f[R],
\f[C]progress\f[R], \f[C]selection\f[R], \f[C]filter\f[R],
\f[C]ind\f[R], \f[C]df\f[R] and names starting with \f[C]lf_\f[R].
\f[C]acc\f[R] shows the pressed keys (e.g.
for bindings with multiple key presses or counts given to bindings).
\f[C]progress\f[R] shows the progress of file operations (e.g.
copying a large directory).
\f[C]selection\f[R] shows the number of files that are selected, or
designated for being cut/copied.
\f[C]filter\f[R] shows \f[C]F\f[R] if a filter is currently being
applied.
\f[C]ind\f[R] shows the current position of the cursor as well as the
number of files in the current directory.
\f[C]df\f[R] shows the amount of free disk space remaining.
Names starting with \f[C]lf_\f[R] show the value of environment
variables exported by lf.
This is useful for displaying the current settings (e.g.
\f[C]lf_selmode\f[R] displays the current setting for the
\f[C]selmode\f[R] option).
User defined options starting with \f[C]lf_user_\f[R] are also
supported, so it is possible to display information set from external
sources.
.SS rulerfmt (string) (default \f[C] %a| %p| \[rs]033[7;31m %m \[rs]033[0m| \[rs]033[7;33m %c \[rs]033[0m| \[rs]033[7;35m %s \[rs]033[0m| \[rs]033[7;34m %f \[rs]033[0m| %i/%t\f[R])
.PP
Format string of the ruler shown in the bottom right corner.
Special expansions are provided, \f[C]%a\f[R] as the pressed keys,
\f[C]%p\f[R] as the progress of file operations, \f[C]%m\f[R] as the
number of files to be cut (moved), \f[C]%c\f[R] as the number of files
to be copied, \f[C]%s\f[R] as the number of selected files, \f[C]%f\f[R]
as the filter, \f[C]%i\f[R] as the position of the cursor, \f[C]%t\f[R]
as the number of files shown in the current directory, \f[C]%h\f[R] as
the number of files hidden in the current directory, and \f[C]%d\f[R] as
the amount of free disk space remaining.
Additional expansions are provided for environment variables exported by
lf, in the form \f[C]%{lf_<name>}\f[R] (e.g.
\f[C]%{lf_selmode}\f[R]).
This is useful for displaying the current settings.
Expansions are also provided for user defined options, in the form
\f[C]%{lf_user_<name>}\f[R] (e.g.