-
Notifications
You must be signed in to change notification settings - Fork 360
Expand file tree
/
Copy pathdoc.txt
More file actions
2525 lines (1818 loc) · 83.9 KB
/
doc.txt
File metadata and controls
2525 lines (1818 loc) · 83.9 KB
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
NAME
lf - terminal file manager
SYNOPSIS
lf [-command command] [-config path] [-cpuprofile path] [-doc] [-help]
[-last-dir-path path] [-log path] [-memprofile path] [-print-last-dir]
[-print-selection] [-remote command] [-selection-path path] [-server]
[-single] [-version] [cd-or-select-path]
DESCRIPTION
lf is a terminal file manager.
The source code can be found in the repository at
https://github.com/gokcehan/lf
This documentation can either be read from the terminal using lf -doc or
online at https://github.com/gokcehan/lf/blob/master/doc.md You can also
use the help 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
OPTIONS
POSITIONAL ARGUMENTS
cd-or-select-path
Set the starting location. If path is a directory, start in there.
If it's a file, start in the file's parent directory and select the
file. When no path is supplied, lf uses the current directory. Only
accepts one argument.
META OPTIONS
-doc
Show lf's documentation (same content as this file) and exit.
-help
Show command-line usage and exit.
-version
Show version information and exit.
STARTUP & CONFIGURATION
-command command
Execute command during client initialization (i.e. after reading
configuration, before on-init). To execute more than one command,
you can either use the -command flag multiple times or pass multiple
commands at once by chaining them with ";".
-config path
Use the config file at path instead of the normal search locations.
This only affects which lfrc is read at startup.
SHELL INTEGRATION
-print-last-dir
Print the last directory to stdout when lf exits. This can be used
to let lf change your shells working directory. See
CHANGING DIRECTORY for more details.
-last-dir-path path
Same as -print-last-dir, but write the directory to path instead of
stdout.
-print-selection
Print selected files to stdout when opening a file in lf. This can
be used to use lf as an "open file" dialog. First, select the files
you want to pass to another program. Then, confirm the selection by
opening a file. This causes lf to quit and print out the selection.
Quitting lf prematurely discards the selection.
-selection-path path
Same as -print-selection, but write the newline-separated list to
path instead of stdout.
SERVER
-remote command
Send command to the running server (e.g. send, query or quit). See
REMOTE COMMANDS for more details.
-server
Start the (headless) server process explicitly. Runs in the
foreground and writes server logs to stderr (or the file set with
-log). Clients auto-start a server if none is running unless -single
is used.
-single
Start a stand-alone client without a server. Disables remote
control.
DIAGNOSTICS
-log path
Append runtime log messages to path.
-cpuprofile path
Write a CPU profile to path. The profile can be used by
go tool pprof.
-memprofile path
Write a memory profile to path. The profile can be used by
go tool pprof.
EXAMPLES
Use lf to select files (while hiding certain file types):
lf -command 'set nohidden' -command 'set hiddenfiles "*mp4:*pdf:*txt"' -print-selection
Another sophisticated "open file" dialog focusing on design:
lf -command 'set nopreview; set ratios 1; set drawbox; set promptfmt "Select files [%w] %S q: cancel, l: confirm"' -print-selection
Open Downloads and set sortby and info to creation date:
lf -command 'set sortby btime; set info btime' ~/Downloads
Temporarily prevent lf from modifying the command history:
lf -command 'set nohistory'
Use default settings and log current session:
lf -config /dev/null -log /tmp/lf.log
Force-quit the server:
lf -remote 'quit!'
Inherit lf's working directory in your shell:
cd "$(lf -print-last-dir)"
QUICK REFERENCE
The following commands are provided by lf:
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
copy (default 'y')
cut (default 'd')
paste (default 'p')
clear (default 'c')
sync
draw
redraw (default '<c-l>')
load
reload (default '<c-r>')
delete (modal)
rename (modal) (default 'r')
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')
echo
echomsg
echoerr
cd
select
source
push
addcustominfo
calcdirsize
clearmaps
tty-write
visual (default 'V')
The following Visual mode commands are provided by lf:
visual-accept (default 'V')
visual-unselect
visual-discard (default '<esc>')
visual-change (default 'o')
The following Command-line mode commands are provided by lf:
cmd-insert
cmd-escape (default '<esc>')
cmd-complete (default '<tab>')
cmd-menu-complete
cmd-menu-complete-back
cmd-menu-accept
cmd-menu-discard
cmd-enter (default '<c-j>' and '<enter>')
cmd-interrupt (default '<c-c>')
cmd-history-next (default '<c-n>' and '<down>')
cmd-history-prev (default '<c-p>' and '<up>')
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>')
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-delete-word-back (default '<a-backspace>')
cmd-capitalize-word (default '<a-c>')
cmd-uppercase-word (default '<a-u>')
cmd-lowercase-word (default '<a-l>')
The following options can be used to customize the behavior of lf:
anchorfind bool (default true)
autoquit bool (default true)
borderfmt string (default "\033[0m")
cleaner string (default '')
copyfmt string (default "\033[7;33m")
cursoractivefmt string (default "\033[7m")
cursorparentfmt string (default "\033[7m")
cursorpreviewfmt string (default "\033[4m")
cutfmt string (default "\033[7;31m")
dircounts bool (default false)
dirfirst bool (default true)
dironly bool (default false)
dirpreviews bool (default false)
drawbox bool (default false)
dupfilefmt string (default '%f.~%n~')
errorfmt string (default "\033[7;31;47m")
filesep string (default "\n")
filtermethod string (default 'text')
findlen int (default 1)
hidden bool (default false)
hiddenfiles []string (default '.*' for Unix and '' for Windows)
history bool (default true)
icons bool (default false)
ifs string (default '')
ignorecase bool (default true)
ignoredia bool (default true)
incfilter bool (default false)
incsearch bool (default false)
info []string (default '')
infotimefmtnew string (default 'Jan _2 15:04')
infotimefmtold string (default 'Jan _2 2006')
menufmt string (default "\033[0m")
menuheaderfmt string (default "\033[1m")
menuselectfmt string (default "\033[7m")
mouse bool (default false)
number bool (default false)
numberfmt string (default "\033[33m")
period int (default 0)
preload bool (default false)
preserve []string (default "mode")
preview bool (default true)
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 false)
reverse bool (default false)
roundbox bool (default false)
rulerfile bool (default false)
rulerfmt string (default " %a| %p| \033[7;31m %m \033[0m| \033[7;33m %c \033[0m| \033[7;35m %s \033[0m| \033[7;36m %v \033[0m| \033[7;34m %f \033[0m| %i/%t")
scrolloff int (default 0)
searchmethod string (default 'text')
selectfmt string (default "\033[7;35m")
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 '')
showbinds bool (default true)
sizeunits string (default 'binary')
smartcase bool (default true)
smartdia bool (default false)
sortby string (default 'natural')
statfmt string (default "\033[36m%p\033[0m| %c| %u| %g| %S| %t| -> %l")
tabstop int (default 8)
tagfmt string (default "\033[31m")
tempmarks string (default '')
timefmt string (default 'Mon Jan _2 15:04:05 2006')
truncatechar string (default '~')
truncatepct int (default 100)
visualfmt string (default "\033[7;36m")
waitmsg string (default 'Press any key to continue')
watch bool (default false)
wrapscan bool (default true)
wrapscroll bool (default false)
user_{option} string (default none)
The following environment variables are exported for shell commands:
f
fs
fv
fx
id
PWD
OLDPWD
LF_LEVEL
OPENER
VISUAL
EDITOR
PAGER
SHELL
lf
lf_{option}
lf_user_{option}
lf_flag_{flag}
lf_width
lf_height
lf_count
lf_mode
The following special shell commands are used to customize the behavior
of lf when defined:
open
paste
rename
delete
pre-cd
on-cd
on-load
on-focus-gained
on-focus-lost
on-init
on-select
on-redraw
on-quit
The following commands/keybindings are provided by default:
Unix
cmd open &$OPENER "$f"
map e $$EDITOR "$f"
map i $$PAGER "$f"
map w $$SHELL
cmd help $$lf -doc | $PAGER
map <f-1> help
cmd maps $lf -remote "query $id maps" | $PAGER
cmd nmaps $lf -remote "query $id nmaps" | $PAGER
cmd vmaps $lf -remote "query $id vmaps" | $PAGER
cmd cmaps $lf -remote "query $id cmaps" | $PAGER
cmd cmds $lf -remote "query $id cmds" | $PAGER
Windows
cmd open &%OPENER% %f%
map e $%EDITOR% %f%
map i !%PAGER% %f%
map w $%SHELL%
cmd help !%lf% -doc | %PAGER%
map <f-1> help
cmd maps !%lf% -remote "query %id% maps" | %PAGER%
cmd nmaps !%lf% -remote "query %id% nmaps" | %PAGER%
cmd vmaps !%lf% -remote "query %id% vmaps" | %PAGER%
cmd cmaps !%lf% -remote "query %id% cmaps" | %PAGER%
cmd cmds !%lf% -remote "query %id% cmds" | %PAGER%
The defaults for Windows are using cmd syntax. A PowerShell compatible
configuration file can be found at
https://github.com/gokcehan/lf/blob/master/etc/lfrc.ps1.example
The following additional keybindings are provided by default:
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 sb :set sortby btime; set info btime
map sc :set sortby ctime; set info ctime
map se :set sortby ext; set info
map gh cd ~
nmap <space> :toggle; down
If the mouse option is enabled, mouse buttons have the following default
effects:
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 pane.
Scroll wheel
Move up or down. If Ctrl is pressed, scroll up or down.
CONFIGURATION
Configuration files should be located at:
OS system-wide user-specific
Unix /etc/lf/lfrc ~/.config/lf/lfrc
Windows C:\ProgramData\lf\lfrc C:\Users\<user>\AppData\Roaming\lf\lfrc
The colors file should be located at:
OS system-wide user-specific
Unix /etc/lf/colors ~/.config/lf/colors
Windows C:\ProgramData\lf\colors C:\Users\<user>\AppData\Roaming\lf\colors
The icons file should be located at:
OS system-wide user-specific
Unix /etc/lf/icons ~/.config/lf/icons
Windows C:\ProgramData\lf\icons C:\Users\<user>\AppData\Roaming\lf\icons
The ruler file should be located at:
OS system-wide user-specific
Unix /etc/lf/ruler ~/.config/lf/ruler
Windows C:\ProgramData\lf\ruler C:\Users\<user>\AppData\Roaming\lf\ruler
The selection file should be located at:
Unix ~/.local/share/lf/files
Windows C:\Users\<user>\AppData\Local\lf\files
The marks file should be located at:
Unix ~/.local/share/lf/marks
Windows C:\Users\<user>\AppData\Local\lf\marks
The tags file should be located at:
Unix ~/.local/share/lf/tags
Windows C:\Users\<user>\AppData\Local\lf\tags
The history file should be located at:
Unix ~/.local/share/lf/history
Windows C:\Users\<user>\AppData\Local\lf\history
You can configure these locations with the following variables given
with their order of precedences and their default values:
Unix
$LF_CONFIG_HOME
$XDG_CONFIG_HOME
~/.config
$LF_DATA_HOME
$XDG_DATA_HOME
~/.local/share
Windows
%LF_CONFIG_HOME%
%XDG_CONFIG_HOME%
%APPDATA%
%LF_DATA_HOME%
%XDG_DATA_HOME%
%LOCALAPPDATA%
A sample configuration file can be found at
https://github.com/gokcehan/lf/blob/master/etc/lfrc.example
COMMANDS
This section shows information about built-in 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.
quit (default q)
Quit lf and return to the shell.
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>)
Move/scroll the current file selection upwards/downwards by one/half a
page/full page.
updir (default h and <left>)
Change the current working directory to the parent directory.
open (default l and <right>)
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.
jump-next (default ]), jump-prev (default [)
Change the current working directory to the next/previous jumplist item.
top (default gg and <home>), bottom (default G and <end>)
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 3G
to move to the third line.
high (default H), middle (default M), low (default L)
Move the current file selection to the high/middle/low of the screen.
toggle
Toggle the selection of the current file or files given as arguments.
invert (default v)
Reverse the selection of all files in the current directory (i.e. toggle
all files). Selections in other directories are not affected 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.
unselect (default u)
Remove the selection of all files in all directories.
glob-select, glob-unselect
Select/unselect files that match the given glob.
copy (default y)
Save the paths of selected files to the clipboard as files to be copied.
If there are no selected files, the path of the current file is used
instead.
cut (default d)
Save the paths of selected files to the clipboard as files to be moved.
If there are no selected files, the path of the current file is used
instead.
paste (default p)
Copy/Move files in the clipboard to the current working directory. A
custom paste command can be defined to override this default.
clear (default c)
Clear file paths in the clipboard.
sync
Synchronize copied/cut files with the server. This command is
automatically called when required.
draw
Draw the screen. This command is automatically called when required.
redraw (default <c-l>)
Synchronize the terminal and redraw the screen.
load
Load modified files and directories. This command is automatically
called when required.
reload (default <c-r>)
Flush the cache and reload all files and directories.
delete (modal)
Remove the current file or selected file(s). A custom delete command can
be defined to override this default.
rename (modal) (default r)
Rename the current file using the built-in method. A custom rename
command can be defined to override this default.
read (modal) (default :)
Read a command to evaluate.
shell (modal) (default $)
Read a shell command to execute.
shell-pipe (modal) (default %)
Read a shell command to execute piping its standard I/O to the bottom
statline.
shell-wait (modal) (default !)
Read a shell command to execute and wait for a key press at the end.
shell-async (modal) (default &)
Read a shell command to execute asynchronously without standard I/O.
find (modal) (default f), find-back (modal) (default F), find-next (default ;), find-prev (default ,)
Read key(s) to find the appropriate filename match in the
forward/backward direction and jump to the next/previous match.
search (default /), search-back (default ?), search-next (default n), search-prev (default N)
Read a pattern to search for a filename match in the forward/backward
direction and jump to the next/previous match.
filter (modal), setfilter
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 to use as the starting prompt.
mark-save (modal) (default m)
Save the current directory as a bookmark assigned to the given key.
mark-load (modal) (default ')
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.
mark-remove (modal) (default ")
Remove a bookmark assigned to the given key.
tag
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).
tag-toggle (default t)
Tag a file with * or a single-width character given in the argument if
the file is untagged, otherwise remove the tag.
echo
Print the given arguments to the message line at the bottom.
echomsg
Print the given arguments to the message line at the bottom and also to
the log file.
echoerr
Print given arguments to the message line at the bottom as errorfmt and
also to the log file.
cd
Change the working directory to the given argument.
select
Change the current file selection to the given argument.
source
Read the configuration file given in the argument.
push
Simulate key pushes given in the argument.
addcustominfo
Update the custom info field of the given file with the given string.
The info string may contain ANSI escape codes to further customize its
appearance. If no info is provided, clear the file's info instead.
calcdirsize
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 -.
clearmaps
Remove all keybindings associated with the map, nmap and vmap command.
This command can be used in the config file to remove the default
keybindings. For safety purposes, : is left mapped to the read command,
and cmap keybindings are retained so that it is still possible to exit
lf using :quit.
tty-write
Write the given string to the tty. This is useful for sending escape
sequences to the terminal to control its behavior (e.g. OSC 0 to set the
window title). Using tty-write is preferred over directly writing to
/dev/tty because the latter is not synchronized and can interfere with
drawing the UI.
visual (default V)
Switch to Visual mode. If already in Visual mode, discard the visual
selection and stay in Visual mode.
VISUAL MODE COMMANDS
visual-accept (default V)
Add the visual selection to the selection list, quit Visual mode and
return to Normal mode.
visual-unselect
Remove the visual selection from the selection list, quit Visual mode
and return to Normal mode.
visual-discard (default <esc>)
Discard the visual selection, quit Visual mode and return to Normal
mode.
visual-change (default o)
Go to the other end of the current Visual mode selection.
COMMAND-LINE MODE 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.
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).
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.
cmd-insert
Insert the character given in the argument. This command is
automatically called when required.
cmd-escape (default <esc>)
Quit Command-line mode and return to Normal mode.
cmd-complete (default <tab>)
Autocomplete the current word.
cmd-menu-complete, cmd-menu-complete-back
Autocomplete the current word with the 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 to display the menu and then cycle through
completion options.
cmd-menu-accept
Accept the currently selected match in menu completion and close the
menu.
cmd-menu-discard
Discard the currently selected match in menu completion and close the
menu.
cmd-enter (default <c-j> and <enter>)
Execute the current line.
cmd-interrupt (default <c-c>)
Interrupt the current shell-pipe command and return to the Normal mode.
cmd-history-next (default <c-n> and <down>), cmd-history-prev (default <c-p> and <up>)
Go to the next/previous entry in the command history. If part of the
command is already typed, then only matching entries will be considered,
and consecutive duplicate entries are skipped.
cmd-left (default <c-b> and <left>), cmd-right (default <c-f> and <right>)
Move the cursor to the left/right.
cmd-home (default <c-a> and <home>), cmd-end (default <c-e> and <end>)
Move the cursor to the beginning/end of the line.
cmd-delete (default <c-d> and <delete>)
Delete the next character.
cmd-delete-back (default <backspace>)
Delete the previous character. When at the beginning of a prompt,
returns either to Normal mode or to : mode.
cmd-delete-home (default <c-u>), cmd-delete-end (default <c-k>)
Delete everything up to the beginning/end of the line.
cmd-delete-unix-word (default <c-w>)
Delete the previous Unix word.
cmd-yank (default <c-y>)
Paste the buffer content containing the last deleted item.
cmd-transpose (default <c-t>), cmd-transpose-word (default <a-t>)
Transpose the positions of the last two characters/words.
cmd-word (default <a-f>), cmd-word-back (default <a-b>)
Move the cursor by one word in the forward/backward direction.
cmd-delete-word (default <a-d>)
Delete the next word in the forward direction.
cmd-delete-word-back (default <a-backspace>)
Delete the previous word in the backward direction.
cmd-capitalize-word (default <a-c>), cmd-uppercase-word (default <a-u>), cmd-lowercase-word (default <a-l>)
Capitalize/uppercase/lowercase the current word and jump to the next
word.
SETTINGS
This section shows information about options to customize the behavior.
Character : is used as the separator for list options []int and
[]string.
anchorfind (bool) (default true)
When this option is enabled, the find command starts matching patterns
from the beginning of filenames, otherwise, it can match at an arbitrary
position.
autoquit (bool) (default true)
Automatically quit the server when there are no clients left connected.
borderfmt (string) (default \033[0m)
Format string of the box drawing characters enabled by the drawbox
option.
cleaner (string) (default ``) (not called if empty)
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 has its preview cache disabled. The following
arguments are passed to the file, (1) current filename, (2) width, (3)
height, (4) horizontal position, (5) vertical position of preview pane
and (6) next filename to be previewed respectively. Preview cleaning is
disabled when the value of this option is left empty.
copyfmt (string) (default \033[7;33m)
Format string of the indicator for files to be copied.
cursoractivefmt (string) (default \033[7m), cursorparentfmt (string) (default \033[7m), cursorpreviewfmt (string) (default \033[4m)
Format strings for highlighting the cursor. cursoractivefmt applies in
the current directory pane, cursorparentfmt applies in panes that show
parents of the current directory, and cursorpreviewfmt applies in panes
that preview directories.
The default is to make the active cursor and the parent directory cursor
inverted. The preview cursor is underlined.
Some other possibilities to consider for the preview or parent cursors:
an empty string for no cursor, \033[7;2m for dimmed inverted text
(visibility varies by terminal), \033[7;90m for inverted text with grey
(aka "brightblack") background.
If the format string contains the characters %s, it is interpreted as a
format string for fmt.Sprintf. Such a string should end with the
terminal reset sequence. For example, \033[4m%s\033[0m has the same
effect as \033[4m.
cutfmt (string) (default \033[7;31m)
Format string of the indicator for files to be cut.
dircounts (bool) (default false)
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+.
dirfirst (bool) (default true)
Show directories first above regular files. With dircounts enabled,
sorting by size always separates directories and files, regardless of
dirfirst.
dironly (bool) (default false)
Show only directories.
dirpreviews (bool) (default false)
If enabled, directories will also be passed to the previewer script.
This allows custom previews for directories.
drawbox (bool) (default false)
Draw boxes around panes with box drawing characters.
dupfilefmt (string) (default %f.~%n~)
Format string of filename when creating duplicate files. With the
default format, copying a file abc.txt to the same directory will result
in a duplicate file called abc.txt.~1~. Special expansions are provided,
%f as the file name, %b for the base name (file name without extension),
%e as the extension (including the dot) and %n as the number of
duplicates.
errorfmt (string) (default \033[7;31;47m)
Format string of error messages shown in the bottom message line.
If the format string contains the characters %s, it is interpreted as a
format string for fmt.Sprintf. Such a string should end with the
terminal reset sequence. For example, \033[4m%s\033[0m has the same
effect as \033[4m.
filesep (string) (default \n)
File separator used in environment variables fs, fv and fx.
filtermethod (string) (default text)