1CLIFM(1)                         CLIFM Manual                         CLIFM(1)
2
3
4

NAME

6       clifm - The Command Line File Manager
7

SYNOPSIS

9       clifm [OPTION]... [PATH]
10
11

INDEX

13       1. Getting help
14
15       2. Description
16
17       3. Parameters
18          . Positional parameters
19          . Options
20
21       4. Commands
22
23       5. File Filters (by file name, file type, and MIME type)
24
25       6. Keyboard shortcuts
26
27       7. Theming
28
29       8. Built-in expansions
30
31       9. Resource opener (third-party openers are also supported)
32
33       10. Shotgun, a built-in files previewer
34
35       11.  Auto-suggestions  (including  a warning prompt for invalid command
36       names)
37
38       12. Shell functions
39
40       13. Plugins
41
42       14. Autocommands
43
44       15. File tags
45
46       16. Virtual directories
47
48       17. Note on speed
49
50       18. Kangaroo frecency algorithm
51
52       19. Environment
53
54       20. Security
55
56       21. Miscellaneous notes
57
58       22. Files
59
60       23. Examples
61
62

1. GETTING HELP

64       There are several ways of getting help in clifm. Once in  the  program,
65       enter  ?  or  help for some basic usage examples, or press F1 to access
66       this manpage, F2 to go to the COMMANDS section of this very manpage, or
67       F3 to jump to the KEYBOARD SHORTCUTS section.
68
69       To get help about some specific topic, type help <TAB> to get a list of
70       available help topics. Choose the topic you want and then press Enter.
71
72       For a list of available commands and a brief description type cmd<TAB>.
73
74       Help for all internal commands can be accessed via  the  -h  or  --help
75       flags. For example, to get help about the selection function, s -h or s
76       --help.
77
78       A convenient way of getting full information about  clifm  commands  is
79       via  the  ih  action,  bound  by default to the interactive help plugin
80       (ihelp.sh). Enter ih to run the plugin (it depends on fzf(1))  and  se‐
81       lect the command you want to obtain information about.
82
83       For  a quick introduction jump to the EXAMPLES section at the bottom of
84       this document.
85
86

2. DESCRIPTION

88       Clifm is a Command Line Interface File Manager. This is its  main  fea‐
89       ture  and  strength: all input and interacion is performed via commands
90       typed in a prompt. In other words, clifm is a REPL,  since  it's  basic
91       structure  is simply this: Read (user input via a command line), Evalu‐
92       ate/Execute the command,  Print  the  results,  Loop  (start  all  over
93       again).
94
95       Unlike  most  terminal  file managers out there, indeed, clifm replaces
96       the traditional TUI interface (also known as curses or text-menu  based
97       interface) by a simple command-line interface (REPL). In this sense, it
98       is a file manager, but also a shell extension: search for files,  copy,
99       rename,  and  trash some of them, but, at the same time, update/upgrade
100       your system, add some cronjob, stop a service, and run nano (or vi,  or
101       emacs, if you like).
102
103       Simply  put,  with clifm the command-line is still there, never hidden,
104       but enriched with file management oriented functionalities.
105
106

3. PARAMETERS

POSITIONAL PARAMETERS

109       If the first non-option parameter is a directory, clifm will  start  in
110       this  directory. For example, the command clifm /etc instructs clifm to
111       start in the directory /etc. If not specified, the first workspace will
112       be  used.  To start in a different workspace use the -w option. For in‐
113       stance: clifm -w4 /etc.
114
115

OPTIONS

117       Note: If compiled in POSIX mode, the following list of options does not
118       apply.  In  this  case, run clifm -h to get the actual list of options.
119       (To make sure run clifm -v: if compiled in POSIX mode the version  num‐
120       ber is followed by "-POSIX").
121
122       -a, --no-hidden
123              ignore entries starting with . (default)
124
125       -A, --show-hidden
126              do not ignore entries starting with .
127
128       -b, --bookmarks-file=FILE
129              set an alternative bookmarks file
130
131       -c, --config-file=FILE
132              set an alternative configuration file
133
134       -D, --config-dir=DIR
135              use DIR as an alternative configuration directory. If configura‐
136              tion files do not exist already, they will be created anew here
137
138       -e, --no-eln
139              do not print ELN's (entry list  number)  at  the  left  of  file
140              names. Bear in mind, however, that though ELN's are not printed,
141              they are still there and can be used as always
142
143       -E, --eln-use-workspace-color
144              ELN's use the current workspace color
145
146       -f, --no-dirs-first
147              do not list directories first
148
149       -F, --dirs-first
150              list directories first (default)
151
152       -g, --pager
153              enable Mas, the built-in pager for files listing
154
155       -G, --no-pager
156              disable the pager (default)
157
158       -h, --help
159              show this help and exit
160
161       -H, --horizontal-list
162              list files horizontally instead of vertically
163
164       -i, --no-case-sensitive
165              no case-sensitive files listing (default)
166
167       -I, --case-sensitive
168              case-sensitive files listing
169
170       -k, --keybindings-file=FILE
171              set an alternative keybindings file
172
173       -l, --no-long-view
174              disable the long view mode (default)
175
176       -L, --long-view
177              enable the long-view mode to list files and their properties. By
178              default,  the  following  information is provided for each file:
179              file name, file permissions (symbolic notation), owner and  pri‐
180              mary  group,  last modification time, and size. These fields can
181              be customized using the PropFields option in  the  configuration
182              file  (use TimeStyle to customize timestamp format). To get more
183              detailed information about files use the p command (see below).
184
185       -m, --dirhist-map
186              enable the directory history map to keep in view previous,  cur‐
187              rent and next entries in the directory history list
188
189       -o, --no-autols
190              the  internal cd command works like the shell cd command: change
191              directory but do not list files automatically
192
193       -O, --autols
194              the cd command changes directory AND lists  files  automatically
195              (default)
196
197       -p, --path=PATH
198              use  PATH  as  clifm starting path. Default starting path is the
199              current working directory. If no workspace is specified via  the
200              --workspace option (see below), the first workspace (1) is used.
201              This option is deprecated: use positional parameters instead.
202
203       -P, --profile=PROFILE
204              use PROFILE as profile. If PROFILE does not exist,  it  will  be
205              created. Default profile is ´default´
206
207       -r, --no-refresh-on-empty-line
208              do not refresh the current list of files when pressing the Enter
209              key on an empty line
210
211       -s, --splash
212              enable the splash screen
213
214       -S, --stealth-mode
215              in stealth mode (also known as incognito  or  private  mode)  no
216              trace is left on the host system. Nothing is read from files nor
217              any file is created: all settings are set to the default values.
218              However,  most settings can still be controlled via command line
219              options and dedicated environment variables (see the ENVIRONMENT
220              section  below).  Take a look as well to the history command and
221              the --no-history command line switch.
222
223       -t, --disk-usage-analyzer
224              run in disk  usage  analyzer  mode.  Equivalent  to  --sort=size
225              --long-view  --full-dir-size  --no-dirs-first. The total size of
226              the current directory, plus the name and  size  of  the  largest
227              file  will  be printed after the list of files. Press Ctrl-Alt-i
228              (or Alt-TAB) to toggle this mode on/off in-place.
229
230       -v, --version
231              show version details and exit
232
233       -w, --workspace=NUM
234              start in workspace NUM. By default, clifm will recover the  last
235              visited  directory for each workspace. However, you can override
236              this behaviour using positional parameters, as described  above,
237              to start in workspace NUM and in path PATH.
238
239       -x, --no-ext-cmds
240              disallow the use of external, shell commands
241
242       -y, --light-mode
243              enable  the  light mode to speed up clifm. See the NOTE ON SPEED
244              section below.
245
246       -z, --sort=METHOD
247              sort files by METHOD, where METHOD could be one of: 0 = none,  1
248              = name, 2 = size, 3 = atime, 4 = btime (ctime if not available),
249              5 = ctime, 6 = mtime, 7 = version (name if not available),  8  =
250              extension,  9  = inode, 10 = owner, 11 = group. Both numbers and
251              strings are allowed. E.g: --sort=9, --sort=inode.
252
253       --bell=TYPE
254              Choose the terminal bell type, where TYPE could be: 0 = none,  1
255              = audible, 2 = visual (requires readline >= 8.1), 3 = flash. De‐
256              faults to ´visible´, and, if not possible, ´none´.
257
258       --case-sens-dirjump
259              do not ignore case when consulting the jump database (via the  j
260              command)
261
262       --case-sens-path-comp
263              enable case sensitive path completion
264
265       --cd-on-quit
266              write  last visited directory to $XDG_CONFIG_HOME/clifm/.last to
267              be later accessed by the corresponding shell function at program
268              exit. See the SHELL FUNCTIONS section below.
269
270       --color-scheme=NAME
271              set NAME as color scheme
272
273       --cwd-in-title
274              print current working directory in terminal window title. Other‐
275              wise, only the program name is printed
276
277       --data-dir=DIR
278              load data files, such as plugins,  color  schemes,  and  default
279              configuration files, from DIR
280
281       --desktop-notifications
282              enable  desktop  notifications. Enter help desktop-notifications
283              in clifm for more information
284
285       --disk-usage
286              show disk usage for the file system the  current  directory  be‐
287              longs  to  (in  the  form  "free/total (free_percentage) fs_type
288              dev_name")
289
290       --full-dir-size
291              if running in long view, print directories size and  their  con‐
292              tents
293
294       --fuzzy-algo=VER
295              fuzzy matching algorithm, where VER is either 1 (faster, but not
296              Unicode aware), or 2 (slower, Unicode aware)
297
298       --fuzzy-matching
299              enable fuzzy matches for filename/path completions  and  sugges‐
300              tions
301
302       --fzfpreview-hidden
303              enable file previews for TAB completion (fzf mode only) with the
304              preview window hidden (toggle it via Alt-p)
305
306       --fzftab
307              use fzf to display completion matches
308
309       --fnftab
310              use fnf to display completion matches
311
312       --icons
313              enable icons
314
315       --icons-use-file-color
316              instead of a specific color, icons take the color of the  corre‐
317              sponding  file  name (specified either via file type or via file
318              extension). Useful when building custom color schemes. This  op‐
319              tion  implies  --icons. Only if compiled with support for either
320              icons-in-terminal or Nerdfonts. The default  build  is  compiled
321              with  emoji-icons  support, in which case this option is ignored
322              (Unicode icons has their own color built-in)
323
324       --int-vars
325              allow the use of internal variables (ex: VAR=/bin; cd $VAR)
326
327       --list-and-quit
328              list files and quit. It may be  used  in  conjunction  parameter
329              substitution. Ex: ´clifm --list-and-quit /etc´
330
331       --max-dirhist
332              maximum number of visited directories to remember
333
334       --max-files=NUM
335              list only up to NUM files. Use -1 or ´unset´ to remove the files
336              limit (default). See the mf command for a more detailed descrip‐
337              tion.
338
339       --max-path=NUM
340              set the maximum number of characters after which the current di‐
341              rectory in the prompt line will be abbreviated to the  directory
342              base name (if \z is used in the prompt)
343
344       --mnt-udisks2
345              use udisks2 instead of udevil (default), for the media command
346
347       --no-apparent-size
348              print  file sizes as used blocks instead of used bytes (apparent
349              size)
350
351       --no-bold
352              disable bold colors (applies to all color schemes)
353
354       --no-cd-auto
355              by default, clifm changes directories  by  just  specifying  the
356              corresponding  ELN  (e.g.  ´12´ instead of ´cd 12´). This option
357              forces the use of cd
358
359       --no-classify
360              by default, clifm appends a file  type  indicator  character  to
361              file  names  when running with no colors (see the --no-color op‐
362              tion below) and a directory indicator  (plus  a  files  counter)
363              when running with colors. Classification characters are:
364               /n: directories (n = files counter)
365               @:  symbolic links
366               !:  broken symbolic links
367               |:  fifo/pipes
368               =:  sockets
369               *:  executable files
370               +:  block devices
371               -:  character devices
372               ?:   unknown  file  type  Use  this option to disable file type
373              classification.
374
375       --no-clear-screen
376              do not clear the screen before listing files
377
378       --no-color
379              disable colors
380
381       --no-columns
382              disable columns for files listing
383
384       --no-dir-jumper
385              disable the directory jumper function
386
387       --no-file-cap
388              do not check files capabilities when listing files
389
390       --no-file-ext
391              do not check files extension when listing files
392
393       --no-files-counter
394              disable the files counter for directories. This option is  espe‐
395              cially useful to speed up the listing process; counting files in
396              directories is particularly expensive
397
398       --no-follow-symlinks
399              do not follow symbolic links when listing files
400
401       --no-fzfpreview
402              disable file previews for TAB completion (fzf mode only)
403
404       --no-highlight
405              disable syntax highlighting. To  customize  highlighting  colors
406              see the COLOR CODES section below
407
408       --no-history
409              do  not  write  commands  into  the  history  file (see also the
410              HistIgnore option in the configuration file)
411
412       --no-open-auto
413              same as no-cd-auto, but for files instead of directories
414
415       --no-refresh-on-resize
416              do not attempt to refresh the list of files upon window's resize
417
418       --no-restore-last-path
419              by default, clifm saves the  last  visited  directory  for  each
420              workspace to be restored in the next session. Use this option to
421              disable this behavior.
422
423       --no-suggestions
424              disable the auto-suggestions system
425
426       --no-tips
427              disable startup tips
428
429       --no-trim-names
430              do not trim file names (see MaxFilenameLen in the  configuration
431              file)
432
433       --no-warning-prompt
434              disable  the  warning  prompt (used to highlight invalid command
435              names)
436
437       --no-welcome-message
438              disable the welcome message
439
440       --only-dirs
441              list only directories
442
443       --open=FILE
444              run as a standalone resource opener: open FILE and  exit,  where
445              FILE  could be a regular file or a directory, using either stan‐
446              dard   notation   (/dir/file)   or   the   URI    file    scheme
447              (file:///dir/file]), or a URL (www.domain or https://domain).
448
449       --opener=APPLICATION
450              specify  a  resource  opener  to use (say rifle or xdg-open). If
451              opener is not set, Lira is used instead
452
453       --preview=FILE
454              display a preview of FILE (via Shotgun) and exit. If running  as
455              a  standalone files previewer, you can set an alternative confi‐
456              uguration file via --shotgun-file. Consult the  SHOTGUN  section
457              below for more information
458
459       --print-sel
460              always  print  the list of selected files. Since this list could
461              be quite extensive, the maximum  number  of  selected  files  to
462              print  could be specified via the MaxPrintSelfiles option in the
463              configuration file. Defaults to 0 (auto, i.e.  never  take  more
464              than  half  terminal  height). Use -1 to remove the limit or any
465              other positive value.
466
467       --readonly
468              run in read-only mode (internal commands able to modify the file
469              system  are  disabled).  Disabled  commands  are:  ac,  ad,  bb,
470              bl/bleach, br/bulk, c, dup, l, le, m, md, n/new, oc, paste,  pc,
471              r, rr, t/trash, tag, te, u/undel/untrash, and vv, plus the shell
472              commands cp, rm, mv, ln, mkdir, rmdir, link, and unlink.
473
474       --rl-vi-mode
475              set readline to vi editing mode (defaults to emacs editing mode)
476
477       --secure-cmds
478              Filter commands passed to the OS to mitigate  command  injection
479              attacks  (--secure-env is implied). Consult the SECURITY section
480              below
481
482       --secure-env
483              run clifm in a secure environment (regular  mode).  Consult  the
484              SECURITY section below
485
486       --secure-env-full
487              run clifm in a secure environment (full mode). Consult the SECU‐
488              RITY section below
489
490       --sel-file=FILE
491              set FILE as selections file
492
493       --share-selbox
494              make the Selection Box common (that is, accessible) to different
495              profiles. By default, each profile has a private Selection Box.
496
497       --shotgun-file=FILE
498              Set FILE as shotgun´s configuration file. Only effective if run‐
499              ning as a standalone files previewer via the  --preview  switch.
500              See the SHOTGUN section below for more information
501
502       --si   print  sizes  in powers of 1000, as defined in the International
503              System of Units (SI), instead of 1024
504
505       --smenutab
506              use smenu to display completion matches
507
508       --sort-reverse
509              sort in reverse order, for example: z-a instead of a-z, which is
510              the default order
511
512       --stat=FILE
513              run the p command on FILE and exit
514
515       --stat-full=FILE
516              run the pp command on FILE and exit
517
518       --stdtab
519              use the standard mode (readline´s built-in) for TAB completion
520
521       --trash-as-rm
522              the  r command executes the built-in ´trash´ (see the t command)
523              instead of rm(1) to prevent accidental deletions
524
525       --virtual-dir=PATH
526              use PATH as CliFM´s virtual directory
527
528       --virtual-dir-full-paths
529              print file names in virtual directories as full paths instead of
530              just base names
531
532       --vt100
533              run in VT100 compatibility mode
534
535       Options precedence order: 1) command line flags; 2) configuration file;
536       3) default values.
537
538

4. COMMANDS

540       Help for all commands listed here can be accessed via the -h or  --help
541       options.  For  example: p --help to get help about the properties func‐
542       tion.
543
544       NOTE: ELN = Entry List Number. Example: in the line "12 openbox"  (when
545       listing  files),  12  is the ELN corresponding to the file named "open‐
546       box". The slash followed by a number (/xx) after directories  and  sym‐
547       bolic  links to directories (the files counter) indicates the amount of
548       files contained by the corresponding directory, excluding self and par‐
549       ent directories ("." and ".." respectively).
550
551       NOTE  2:  In case of ELN-filename conflict the backslash can be used to
552       prevent ELN expansion. For example, if we have at least two  files  and
553       one of them is named "2", then clifm cannot know in advance if the com‐
554       mand refers to the ELN 2 or to the file name "2". In we want  the  ELN,
555       we just write the ELN number, for example: s 2. But if we want the file
556       name, we need to escape the file name  using  the  backlash  character:
557       s \2.
558
559       NOTE 3: clifm supports fused parameters for internal commands taking an
560       ELN or range of ELN´s as parameters. Much like short options  for  com‐
561       mand  line  programs,  you  can drop or omit the space between internal
562       commands and the corresponding ELN passed as argument. In general,  you
563       can  write  CMDELN instead of CMD ELN. For example: o12 or s1-5 instead
564       of o 12 and s 1-5 respectively. Bear in mind,  however,  that  in  thus
565       omitting the space char TAB completion for ELN's will not be available.
566       If there is a file named o12 (more generally, CMDELN), and if you  want
567       to  refer to this file instead of a clifm command, escape the file name
568       to prevent the split; for example: s \o12.
569
570       NOTE 4: clifm implements a fastback function, that is to say, the  con‐
571       version  of  "... n" or "cmd ... n" into "../.. n" or "cmd ../.. n". In
572       other words, subsequent dots after ".." will  be  converted  each  into
573       "/..". For example, if you are in your home directory and type "..." or
574       "cd ...", and since "..." amounts to "../..", you will be taken to  the
575       root  directory. TAB completion is available for the fastback function:
576       "....bin" -> TAB -> "../../../bin".
577
578
579       FILE/DIR
580              if the autocd and auto-open functions are enabled, which is  the
581              default  value,  open  FILE or change directory to DIR. In other
582              words, FILE amounts to open FILE or o FILE, and DIR  to  cd DIR.
583              ELN's, of course, are allowed. Example: 12.
584
585       /PATTERN [-filetype] [-x] [DIR]
586              this  is the quick search function. Type / followed by a glob or
587              regular (or extended regular) expression, and  clifm  will  list
588              all  matches in the current working directory. For example, both
589              /*.pdf and /.pdf$ expressions will list all  PDF  files  in  the
590              current  working  directory, the former using wildcards, and the
591              second a regular expression.
592
593              You can list previously used search patterns via TAB: /*<TAB>.
594
595              Note: By default, the search function attempts to resolve a pat‐
596              tern first as glob, and then, if no matches are found, as a reg‐
597              ular expression. This behavior can be customizad however in  the
598              configuration file, via the SearchStrategy option.
599
600              Note  2:  If  no  further parameter is provided, but only a glob
601              pattern (wildcards), you can expand the pattern into the  corre‐
602              sponding  matches  via  the  TAB key. For example, to list all C
603              files in the current directory: /*.c<TAB>.
604
605              Note 3: Expressions containing no pattern metacharacter are  au‐
606              tomatically  transformed into a glob/regular expression (depend‐
607              ing on the value of the  SearchStrategy  option).  For  example,
608              /test becomes *test* or /.*test.*.
609
610              1. Case sensitivity
611
612              By  default,  regular expressions are case insensitive (glob ex‐
613              pressions, by contrast, are always case sensitive). However, you
614              can  enable  case  sensitive  search  by  setting the CaseSensi‐
615              tiveSearch option to true in the configuration file.
616
617              2. Destiny directory
618
619              To search for files in any directory other than the current  di‐
620              rectory, specify the directory name as a further parameter. This
621              parameter (DIR) could be an absolute path, a relative  path,  or
622              an  ELN. For example, enter /^A 7 to search for all files start‐
623              ing with ´A´ in the directory corresponding to the ELN 7.
624
625              3. File type filter
626
627              The result of the search could be further filtered by specifying
628              a filter type: -b, -c, -d, -f, -l, -p, -s, -D, and -P (block de‐
629              vice, character device, directory, regular file, symbolic  link,
630              FIFO/pipe,  socket,  door  (Solaris), and port (Solaris) respec‐
631              tively. For example, /[.-].*d$ -d Documents/ will list  all  di‐
632              rectories  containing a dot or a dash and ending with ´d´ in the
633              directory named Documents.
634
635              4. Negate a pattern
636
637              The quick search function also supports invert  search:  prepend
638              the  exclamation  mark (!) to negate a given search pattern. For
639              example: !.*s$ -d /etc will match all directories  in  /etc  NOT
640              ending with ´s´, just as !D* will match all files in the current
641              directory NOT starting with ´D´.
642
643              5. Recursive search
644
645              To perform a recursive search use the -x parameter, and, option‐
646              ally, a search path (DIR) (file type filter is not allowed). The
647              search will be performed using find  as  follows:  find DIR MODE
648              PATTERN.  If  no search path is provided, the search is executed
649              starting in the current directory. Otherwise, the search  starts
650              in DIR. MODE is one of:
651
652               -name: SearchStrategy is not regex-only and CaseSensitiveSearch
653              is set to true
654
655               -iname:  SearchStrategy  is  not  regex-only   and   CaseSensi‐
656              tiveSearch is set to false
657
658               -regex: SearchStrategy is regex-only and CaseSensitiveSearch is
659              set to true
660
661               -iregex: SearchStrategy is regex-only  and  CaseSensitiveSearch
662              is set to false
663
664       ;[CMD], :[CMD]
665              If  no  CMD,  run the system shell in the current working direc‐
666              tory. If CMD is specified, skip all clifm  expansions  (see  the
667              BUILT-IN  EXPANSIONS  section  below)  and  run the input string
668              (CMD) as is via the default system shell.
669
670       ac, ad ELN/FILE...
671              archive/compress and dearchive/decompress one or multiple  files
672              and/or  directories. The archiver function brings two modes: ac,
673              to generate archives or compressed files, and ad, to  decompress
674              or dearchive files, either just listing, extracting, recompress‐
675              ing, or mounting their content. In this latter case, the  mount‐
676              point    used    automatically    is    $HOME/.config/clifm/PRO‐
677              FILE/mounts/ARCHIVE_NAME.
678
679              The function accepts single and multiple file names,  wildcards,
680              ELN   ranges,  and  the  'sel'  keyword.  For  example:  ac sel,
681              ac 4-25 myfile,  or  ad *.tar.gz.  Multiple  archive/compression
682              formats are supported, including Zstandard. When it comes to ISO
683              9660 files only single files are supported.
684
685              The archive mount function for non ISO files depends on archive‐
686              mount,  while  the remaining functions depend on atool and other
687              third-party utilities for achive formats support,  for  example,
688              p7zip.  p7zip  is also used to manage most decompressing options
689              for ISO 9660 files, except for mount, in which case mount(8)  is
690              used. Creation of ISO files is done via genisoimage(1). For more
691              information  consult  atool(1),  archivemount(1),  zstd(1),  and
692              7z(1).
693
694       acd, autocd [on, off, status]
695              toggle  the autocd function on/off. If set to on, DIR amounts to
696              cd DIR.
697
698       actions [list] [edit [APP]]
699              to list available actions (or plugins) use the list  subcommand.
700              Note that, since list is the default action, it can be omitted.
701
702              Use  the edit subcommand to add, remove or modify custom actions
703              (using APP if specified or the  default  associated  application
704              otherwise).
705
706              The aim of this function is to allow the user to easily add cus‐
707              tom commands and functions to clifm. In other words, the actions
708              function is a plugins capability.
709
710              The  general  procedure is quite simple: a) bind a custom action
711              name to an executable file written in any language you want,  be
712              it  a  shell  or Python script, a C program or whatever you like
713              (using the actions.clifm file located in the  configuration  di‐
714              rectory). Example: "myaction=myscript.sh". b) Now, drop the cor‐
715              responding script (in our example, myscript.sh) into the plugins
716              directory  (see  the FILES section below). 3) Once this is done,
717              you can call the script using the custom action name defined be‐
718              fore  as  if  it  were  any  other  command:  run  myaction, and
719              myscript.sh will be executed.
720
721              All arguments passed to the action command  are  passed  to  the
722              script or program as well (which is run via the system shell).
723
724              The  plugins provided with clifm (take a look at the plugins di‐
725              rectory) could be used as a  starting  point  to  create  custom
726              plugins.
727
728       alias [import FILE] [ls,list] [NAME]
729              with  no  argument  (or  with ls,list parameters), it prints the
730              list of available aliases, if any. To get the description  of  a
731              specific  alias enter alias followed by the alias name. To write
732              a new alias simply enter edit (or press F10) to open the config‐
733              uration  file  and  add  a  line like this: "alias name=´command
734              args...´" or "alias name=´directory´".
735
736              To import aliases from a file, provided it contains  aliases  in
737              the  specified form, use the import parameter. Aliases conflict‐
738              ing with some of the internal commands won´t be imported.
739
740              However, a neat usage for the alias function is not so  much  to
741              bind  short  keys to commands, but to files and directories vis‐
742              ited regularly. In this way, it is  possible  to  bind  as  many
743              files  or  directories,  no matter how deep they are in the file
744              system, to very short strings, even single characters. For exam‐
745              ple,  "alias w=´/some/file/deep/in/the/filesystem´. Now, no mat‐
746              ter where we are, we can just enter ´w´, provided autocd  and/or
747              auto-open  function  is enabled, to access the file or directory
748              we want. Theoretically at least, this  procedure  could  be  re‐
749              peated until the system memory is exhausted.
750
751              To create multiple aliases for files at once, this is the recom‐
752              mended procedure: 1) Select all files you want to alias with the
753              sel  function:  s file1 file2 file3 ....  2) Export the selected
754              files into a temporary file running exp sel; 3) Edit  this  file
755              to contain only valid alias lines:
756
757               alias a1=´file1´
758               alias b1=´file2´
759               alias c1=´file3´
760
761              NOTE: Make sure alias names do not conflict with other commands,
762              either internal or external. To bypass the conflicts check, per‐
763              formed automatically by the ´alias import´ command, you can edit
764              the aliases file manually (F10).
765
766              4) Finally, import this file with the alias function:  alias im‐
767              port tmp_file.  Now, you can access any of these files by enter‐
768              ing just a few characters: a1, b1, and c1.
769
770       ao, auto-open [on, off, status]
771              toggle the auto-open function on/off. If set to on, FILE amounts
772              to open FILE.
773
774       b, back [h, hist] [clear] [W!ELN]
775              unlike  cd ..,  which  sends  you to the parent directory of the
776              current directory, this command (with  no  argument)  sends  you
777              back to the previously visited directory.
778
779              clifm  keeps  a  record of all visited directories (to prevent a
780              directory from being added to the directory history list use the
781              DirhistIgnore  option  in  the main configuration file). You can
782              see this list by typing b hist or b h, and you  can  access  any
783              element  in this list by simply passing the corresponding ELN in
784              this list to the back command. Example:
785                      :) > ~ $ bh
786                      1 /home/user
787                      2 /etc
788                      3 /proc
789                      :) > ~ $ b !3
790                      :) > /proc $
791
792              NOTE: the line printed in green indicates the  current  position
793              of the back function in the directory history list.
794
795              Finally, you can also clear this history list by typing b clear.
796
797              The  best way of navigating the directory history list, however,
798              is via the directory jumper function. See the j  command  below.
799              You can take a look at the dh command as well.
800
801       bb, bleach ELN/FILE...
802              Bleach  is  a  built-in  file  names  cleaner  (based  on  detox
803              [https://github.com/dharple/detox]), whose main aim is to rename
804              file names using only safe characters.  Bleach cleans file names
805              up either by removing unsafe (extended-ASCII/Unicode) characters
806              without  an ASCII alternative/similar character, or by translat‐
807              ing these unsafe characters into an alternative ASCII  character
808              based on familiarity/similarity.
809
810              These following simple rules are used to compose clean/safe file
811              names:
812                  - NUL (\0) and slash (/) characters  are  completely  disal‐
813              lowed
814                  -  Only characters from the Portable Filename Characters Set
815              (a-zA-Z0-9._-) are allowed
816                  - { [ ( ) ] } are replaced by a dash (-). Everything else is
817              replaced by an underscore (_)
818                  - Unicode characters are translated, whenever possible, into
819              an ASCII replacement. Otherwise, they are just ignored. For  ex‐
820              ample, an upper case A with diacritic (accent, umlaut, diaresis,
821              and so on) will be replaced by an ASCII A, but the  smiley  face
822              emoji will be simply ignored. A few special signs will be trans‐
823              lated into text, for instance, the pound sign will  be  replaced
824              by "_pound_" and the Euro symbol by "EUR". Translations are made
825              via a translation table (cleaner_table.h)
826                  - File names never start with a dash (-)
827                  - Files named . and .. are not allowed
828                  - Append .bleach to one character long file names
829                  - Do not let a replacement file name start with a dot  (hid‐
830              den) if the original does not
831                  - Max file name length is NAME_MAX (usually 255)
832
833              Modified file names will be listed on screen asking the user for
834              confirmation, allowing besides to edit  (by  pressing  'e')  the
835              list of modified file names via a text editor.
836
837              If the replacement file name already exists, a dash and a number
838              (starting from 1) will be appended. Ex: file-3.
839
840       bd [NAME]
841              bd is the backdir function: it takes you back to the parent  di‐
842              rectory matching NAME.
843
844              With  no arguments, bd prints a menu with all parent directories
845              relative to the current directory, allowing the user  to  select
846              an  entry.  Otherwise,  it checks the absolute current directory
847              against the provided query string (NAME): if only one  match  is
848              found,  it  automatically changes to that directory; if multiple
849              matches are found, the list of matches is presented to the  user
850              in  a  selection  menu.  If  NAME  is  a directory name, bd just
851              changes to that directory, be it a parent of the current  direc‐
852              tory or not.
853
854              TAB completion and suggestions are available for this function.
855
856              Example:
857
858              Provided  that the current directory is /home/user/git/reposito‐
859              ries/lambda, entering bd  git  will  take  you  immediatelly  to
860              /home/user/git.
861
862              Note that there is no need to type the entire directory name; if
863              the query is unambiguous, only a few characters, and  even  just
864              one,  suffices  to match the appropriate directory. In our exam‐
865              ple, bd g is enough to take you to /home/user/git, just as bd  h
866              will take you to /home.
867
868              The  query  string  could match any part of a directory name: bd
869              er, for instance, will take you to /home/user, since  it  is  an
870              unambiguous query.
871
872       bl ELN/FILE...
873              Create symbolic links (in the current directory) for each speci‐
874              fied file. The user will be asked to enter a specific suffix for
875              the  symlinks.  If none is specified, the basename of the corre‐
876              sponding file is used.
877
878       bm, bookmarks [a, add FILENAME NAME [SHORTCUT]]  [d,  del  [NAME]]  [e,
879       edit [APP]] [NAME, SHORTCUT]
880              Bookmarks  can  be  manager  either  from  the bookmarks manager
881              screen or from the command line.
882
883              1. The bookmarks manager screen
884
885              To access the bookmarks manager screen simply enter bm. Here you
886              can  cd  into the desired bookmark by entering either its ELN or
887              name (regular files can be bookmarked as well). In  this  screen
888              you  can  also add, remove, or edit your bookmarks by simply en‐
889              tering 'e' to edit the bookmarks file (which is simply a list of
890              lines  with  this  format: name:path. Ex: "docs:/home/user/docu‐
891              ments"). Make your changes, save, and exit.
892
893              2. The command line
894
895              ┌────────────────────────┬──────────────────────────────────────────────┐
896Command                 Description                                  
897              ├────────────────────────┼──────────────────────────────────────────────┤
898              │bm add /media/mount mnt │ Bookmark the /media/mount directory as "mnt" │
899              ├────────────────────────┼──────────────────────────────────────────────┤
900              │bm mnt                  │ Change to/open the bookmark named "mnt"      │
901              ├────────────────────────┼──────────────────────────────────────────────┤
902              │bm del mnt              │ Delete the bookmark named "mnt"              │
903              ├────────────────────────┼──────────────────────────────────────────────┤
904              │bm edit                 │ Edit your bookmarks                          │
905              └────────────────────────┴──────────────────────────────────────────────┘
906
907              A handy use for the bookmarks function is  to  create  bookmarks
908              using short names, which will be later easily accessible via TAB
909              completion.
910
911              The b: construct
912
913              The b: construct is used as a way to quickly  access/operate  on
914              bookmarks. A few examples:
915
916              ┌──────────────┬──────────────────────────────────────────────────────────────┐
917Command       Description                                                  
918              ├──────────────┼──────────────────────────────────────────────────────────────┤
919              │b:<TAB>       │ List available bookmarks                                     │
920              ├──────────────┼──────────────────────────────────────────────────────────────┤
921              │b:net         │ Change to the bookmark named "net" (1)                       │
922              ├──────────────┼──────────────────────────────────────────────────────────────┤
923              │p b:bm1 b:bm2 │ Print file properties of the bookmarks named "bm1" and "bm2" │
924              ├──────────────┼──────────────────────────────────────────────────────────────┤
925              │s b:          │ Select all bookmarks at once                                 │
926              └──────────────┴──────────────────────────────────────────────────────────────┘
927
928               (1) If your are not sure about where a bookmark points to, type
929              b:NAME<TAB>.
930
931       br, bulk ELN/FILE...
932              rename at once all files passed as arguments to the function. It
933              accepts  single  and multiple file names, wildcards, ELN ranges,
934              and the sel keyword. Example: br myfile 4-10 sel.
935
936              Each file name will be copied into a temporary file, which  will
937              be  opened with the default text editor (via the mime function),
938              letting the user modify it. Once the file has been modified  and
939              saved,  the modifications are printed on the screen and the user
940              is asked whether to proceed with the  actual  bulk  renaming  or
941              not.
942
943              This  built-in  bulk  rename function won´t deal with deletions,
944              replacements, file name conflicts and the like.  For  a  smarter
945              alternative use qmv(1).
946
947       c, m, md, r
948              short  for  the following commands respectively: cp -iRp, mv -i,
949              mkdir -p, and rm (for files) or rm -r (for directories).
950
951              Note that the  r  command  prompts  the  user  for  confirmation
952              (printing  the list of files to be removed) if the list of files
953              contains: 1. at least one directory, 2. three or more files,  3.
954              at least one non-explicitly-expanded ELN (ex: r 12).
955
956              By default, the c, m, and r commands ask for confirmation before
957              operations. Since this might sometimes be quite intrusive  (spe‐
958              cially  when operating on large amount of files), it is possible
959              to turn interactivity off in two different ways:
960
961                a) For the current command only: via the -f,  --force  switch.
962              Example: c -f sel, m -f sel, or r -f *.
963
964                b)  Permanently.  Use the cpCmd, mvCmd, and rmForce options in
965              the configuration file to permanently set any of these  commands
966              to non-interactive mode.
967
968              To  use  these  commands without any of these arguments, or with
969              any other argument you want,  use  the  non-abbreviated  (shell)
970              command,  for instance, cp instead of c. Of course, you can also
971              create aliases to  use  you  preferred  commands,  for  example,
972              "c=´cp -adp´". Consult the alias command above for more informa‐
973              tion.
974
975              The l command allows the use of the e, edit option to modify the
976              destination  of  a  symbolic link. Example: l edit 12 (or le 12)
977              to relink the symbolic link corresponding to the file whose  ELN
978              is 12.
979
980              When  using  the sel keyword and no destiny is provided, c and m
981              will copy/move selected files into the current directory.  When‐
982              ever  sel  is not used, but just a source file name (and no des‐
983              tiny is provided), the m command behaves much  like  the  imv(1)
984              shell command (from the ´renameutils´ package), providing an in‐
985              teractive renaming function: it prompts the user to enter a  new
986              name  using  the  source  file name as base, so that it does not
987              need to be typed twice. For this alternative  prompt,  only  TAB
988              completion for file names is available.
989
990              clifm  supports  advcp(1), wcp, and rsync(1) to copy files (they
991              include a progress bar). To use them instead of  cp(1)  set  the
992              corresponding option (cpCmd) in the configuration file. If advcp
993              is selected, the command used is advcp -giRp (or advcp -gRp, for
994              non-interactive  mode). If rsync, the command is rsync -avP. wcp
995              takes no argument.
996
997              advmv(1) is also supported to move files (to add a progress  bar
998              to  the move command). Use the mvCmd option in the configuration
999              file to choose this alternative implementation of  mv.  In  this
1000              case,  the command used is advmv -gi (or advmv -g for non-inter‐
1001              active mode).
1002
1003
1004       cd [ELN/DIR]
1005              Change the current working directory to ELN/DIR.
1006
1007              Directories check order:
1008                1. If no argument, change to the home directory (HOME, or,  if
1009              HOME  is  not set, the sixth field of the entry corresponding to
1010              the current user in /etc/passwd)
1011                2. If argument is an absolute path (begins with a slash  char‐
1012              acter),  or the first component is dot (.) or dot-dot (..), con‐
1013              vert to canonical form (via realpath(3)) and, if a valid  direc‐
1014              tory, change into that directory.
1015                3.  Check  CDPATH environment variable and append /DIR to each
1016              of the paths specified here. If the result of the  concatenation
1017              is a valid directory, change into it.
1018                4.  Check  directories  in the current working directory. If a
1019              matching directory is found, change to it.
1020
1021              You can use either ELN´s or a string to indicate  the  directory
1022              you  want.  Ex:  cd 12  or cd ~/media. If autocd is enabled (de‐
1023              fault), cd 12 and cd ~/media could be written as 12 and  ~/media
1024              respectively as well.
1025
1026              Unlike the shell cd(1) command, clifm's built-in cd function not
1027              only changes the current directory, but also lists  its  content
1028              (provided  the  option CdListsAutomatically is enabled, which is
1029              the default) according to a comprehensive list of  color  codes.
1030              By  default,  the  output of cd is much like this shell command:
1031              cd DIR && ls --color=auto --group-directories-first.
1032
1033              Automatic files listing can be disabled by either setting AutoLs
1034              to  "false"  in the configuration file or running clifm with the
1035              -o or --no-autols option.
1036
1037       cl, columns [on, off]
1038              toggle columns on/off.
1039
1040       cmd, commands
1041              show this list of commands. A more convenient way of getting in‐
1042              formation  about  clifm  commands  is  via  the interactive help
1043              plugin (depends on fzf), by default bound to the "ihelp"  action
1044              name.
1045
1046       colors print the list of currently used color codes
1047
1048       config [edit [APP]] [reset, dump]
1049              Manage the main configuration file.
1050
1051              To  edit  the  configuration file use the edit subcommand. If an
1052              application is specified (config edit APP), APP will be used  to
1053              open the file (otherwise, the default associated program will be
1054              used). Edit settings to your liking if necessary, save, and quit
1055              the  editor. Changes are automatically applied. Note that, since
1056              edit is the default action, it can be omitted. Enter just config
1057              to  open  the configuration file, or config APP to open it using
1058              APP.
1059
1060              Use the reset subcommand to generate a fresh configuration  file
1061              and  create  a  backup copy of the old one (named clifmrc.YYYYM‐
1062              MDD@HH:MM:SS).
1063
1064              The dump subcommand prints the list of settings (as  defined  in
1065              the  main  configuration  file)  with their current value. Those
1066              differing from the default values are highlighted, and  the  de‐
1067              fault  value for the corresponding option is displayed in brack‐
1068              ets.
1069
1070              NOTE: The edit command (though deprecated) can be used  as  well
1071              instead of config.
1072
1073       cs, colorschemes [edit [APP]] [n, name] [NAME]
1074              with  no arguments, list available color schemes (cs name (or cs
1075              n) to print the current color scheme name).
1076
1077              Use the edit subcommand to open/edit the configuration  file  of
1078              the  current color scheme (open with APP if specified or via the
1079              default associated application).
1080
1081              To switch color schemes, specify the color scheme name: cs NAME.
1082              (TAB completion is available: cs <TAB>).
1083
1084       d, dup FILE...
1085              Duplicate files passed as parameters, either directories or reg‐
1086              ular files. The user will be asked for a destiny directory.  Du‐
1087              plicated  file  names  are generated by appending ".copy" to the
1088              basename of each source file. For example: d /my/file will  copy
1089              /my/file  into  the directory selected by the user as file.copy.
1090              If file.copy already exists, an extra suffix will  be  added  as
1091              follows: file.copy-N, where N is a positive integer (starting at
1092              1).
1093
1094              If rsync(1) is found, it will be used  as  follows:  rsync -acz‐
1095              vAXHS --progress. Else, cp(1) will be used: cp -a.
1096
1097       dh [STRING] [PATH] [!ELN]
1098              With  no  parameters,  it  prints the directory history list. To
1099              filter this list just pass a query string: only entries matching
1100              this  query  will be displayed. In both cases, TAB completion is
1101              available. For example: dh down<TAB> will list  only  those  en‐
1102              tries matching down (fuzzily, if fuzzy-matching is enabled).
1103
1104              To  access  a specific entry, you can pass the entry number pre‐
1105              ceded by an exclamation mark. For example, if you want the entry
1106              number  12,  enter  dh !12 to change to the corresponding direc‐
1107              tory.
1108
1109              Finally, if an absolute path is passed as  first  parameter,  dh
1110              works just as the cd command.
1111
1112              Note:  Take  a look at the j command as well. Both commands deal
1113              with the list of visited directories, but in slightly  different
1114              ways:  while  dh  deals with the list of the last MaxDirhist en‐
1115              tries (see the configuration file), the j command deals with the
1116              ranked list of visited directories.
1117
1118       ds, desel [*, a, all] [FILE]...
1119              deselect one or more selected files.
1120
1121              If  no  parameter is passed, the user is prompted to either mark
1122              selected files to be deselected or to edit the  selections  file
1123              (entering ´e´) via a text editor to manually deselect files.
1124
1125              Use  *,  a  or all to deselect all selected entries at once. Ex:
1126              ds *.
1127
1128              You can also pass the file name(s) (or ELN´s) to  be  deselected
1129              as a parameter. For example: ds myfile 24.
1130
1131              TAB completion is available for this command.
1132
1133       exp [FILE]...
1134              with  no argument, export the list of files in the current work‐
1135              ing directory to a temporary file. Otherwise, export only  those
1136              specified  as further arguments: they could be directories, file
1137              names, ELN´s or some search expression like "*.c".
1138
1139       ext [on, off, status]
1140              toggle external commands on/off.
1141
1142       f, forth [h, hist] [clear] [!ELN]
1143              it works just like the back function, but it goes forward in the
1144              history record. Of course, you can use f hist, f h, and f !ELN.
1145
1146       fc [on, off, status]
1147              By default, clifm prints the amount of files contained by listed
1148              directories next to directories name. However, since this is  an
1149              expensive  feature,  it  might  be  desirable (for example, when
1150              listing files in a remote machine) to disable this feature.  Use
1151              the off subcommand to disable it. To permanently disable it, use
1152              the FilesCounter option in the configuration file.
1153
1154       ff, dirs-first [on, off, status]
1155              toggle list directories first on/off.
1156
1157       fs     print an extract from  'What  is  Free  Software?',  written  by
1158              Richard Stallman.
1159
1160       ft, filter [unset] [[!]REGEX,=FILE-TYPE-CHAR]
1161              filter  the  current  list  of files, either by file name (via a
1162              regular expression) or file type (via a file type character).
1163
1164              With no argument, ft prints the current filter.  To  remove  the
1165              current  filter  use the unset option. To set a new filter enter
1166              ft followed by a filter expression (use the exclamation mark  to
1167              reverse the meaning of a filter). Examples:
1168
1169              Exclude hidden files:
1170               ft !^.
1171
1172              List only files ending with .pdf:
1173               ft .*\.pdf$
1174
1175              List only symbolic links:
1176               ft =l
1177
1178              Exclude socket files:
1179               ft !=s
1180
1181              The list of file type characters is included in the FILE FILTERS
1182              section below.
1183
1184              The filter will be lost at program exit. To  permanently  set  a
1185              filter  use the Filter option (in the configuration file) or the
1186              CLIFM_FILTER environment variable (consult the  ENVIRONMENT  and
1187              the FILE FILTERS sections below).
1188
1189       fz [on, off]
1190              Toggle full directory size on/off (only for long view mode).
1191
1192       hf, hh, hidden [on, off, status]
1193              toggle hidden files on/off.
1194
1195       history [edit [APP]] [clear] [-n] [on, off, status, show-time]
1196              with  no  arguments,  it  prints  the commands history list (use
1197              show-time to print timestamps as well). If clear  is  passed  as
1198              argument,  it  will  delete all entries in the history file. Use
1199              edit to open the history file and modify it if needed (the  file
1200              will be opened with APP, if specified, or with the default asso‐
1201              ciated application otherwise). -n tells the history  command  to
1202              list  only  the  last 'n' commands in the history list. Finally,
1203              you can disable history (subsequent entries won´t be written  to
1204              the  history file) via history off (you can also use the HistIg‐
1205              nore option in the configuration file to prevent  specific  com‐
1206              mand lines from being added to the history list).
1207
1208              You  can  use  the  exclamation mark (!) to perform some history
1209              commands:
1210                !<TAB>: List history entries
1211                !!: Execute the last command.
1212                !n: Execute the command number ´n´ in the history list.
1213                !-n: Execute the ´last - n´ command in the history list.
1214                !STRING: Execute the command starting with STRING. TAB comple‐
1215              tion is available in this case: !STRING<TAB>.
1216
1217       icons [on, off]
1218              toggle icons on/off
1219
1220       j [--purge [NUM]] [--edit], jc, jl, jp [STR]..., je
1221              j is the fastest way of using Kangaroo, a directory jumper func‐
1222              tion used to quickly navigate through the jump database (i.e.  a
1223              database of visited directories).
1224
1225              With  no argument, j just lists the entries in the jump database
1226              (1), printing: a) order number of the  corresponding  entry,  b)
1227              total  sum  of  visits,  c) days since the first visit, d) hours
1228              since the last visit, e) the rank value, and  f)  the  directory
1229              name  itself.  An asterisk next to the rank value means that the
1230              corresponding directory will not be removed from  the  database,
1231              despite  its  rank,  either  becuase  it has been visited in the
1232              lasat 24 hours, or because it is  bookmarked,  pinned,  or  cur‐
1233              rently active in some workspace.
1234
1235              (1) To prevent a directory from being added to the jump database
1236              use the DirhistIgnore option in the main configuration file.
1237
1238              Otherwise, if  a  query  string  is  provided  as  parameter,  j
1239              searches  for  this  string in the database and cd into the best
1240              ranked matching entry. Example: j Down will probably take you to
1241              /home/user/Downloads,  provided  this directory has been already
1242              visited and is the best ranked match in the database. For a more
1243              detailed  description of the matching algorithm see the KANGAROO
1244              FRECENCY ALGORITHM section below.
1245
1246              Multiple query strings could be passed to the function. For  ex‐
1247              ample,  j et mo  will  first check for "et" in the jump database
1248              and then will further filter the search using the second parame‐
1249              ter:  "mo".  It will most probably take you (again, provided the
1250              directory has been already visited and is the best ranked match)
1251              to /etc/modprobe.d directory. Bear in mind that if STR is an ac‐
1252              tual directory, jump will just cd into it without performing any
1253              query.
1254
1255              The  backslash  (\)  and the slash (/) could be used to instruct
1256              Kangaroo to search for the string query only  in  the  first  or
1257              last  path  segment  of each entry in the database respectively.
1258              Let´s suppose we have two entries matching src in the  database:
1259              /media/src/images  and  /home/user/Downloads/clifm/src.  If  the
1260              first entry is better ranked than the second, j src  will  match
1261              this  first entry. However, if what we really want is the second
1262              entry, appending a slash to the query string instructs  Kangaroo
1263              to  only match entries having src in the last path segment, here
1264              /home/user/Downloads/clifm/src.
1265
1266              Since it is not always obvious or easy to know where  exactly  a
1267              query  string will take you, clifm (if the suggestions system is
1268              enabled) will print, at  the  right  of  the  cursor,  the  path
1269              matched  by  Kangaroo.  If  that  is the actually intended path,
1270              press the Right arrow key to accept the  suggestion.  Otherwise,
1271              it will be ignored. You can also use TAB completion to print the
1272              list of matches for the current query string. For example:  j  -
1273              c<TAB>  to  list  all entries in the directory history list con‐
1274              taining a dash (-) and a ´c´.
1275
1276              j accepts four modifiers: ´e´,  ´p´  ´c´,  and  ´l´,  the  first
1277              standing  for  "edit",  the  second  for "parent", the third for
1278              "child", and the last one for "list". Thus,  je  (or  j  --edit)
1279              will  open  the  jump  database  to be edited if needed; jc will
1280              search for files querying only child directories relative to the
1281              current  working  directory,  while  jp will do the same but for
1282              parent directories. Finally, jl just prints the matches for  the
1283              given  query  string(s), but without changing the current direc‐
1284              tory. Examples:
1285
1286
1287              ┌────────────┬──────────────────────────────────────────────────────────────────────────────────┐
1288Command     Description                                                                      
1289              ├────────────┼──────────────────────────────────────────────────────────────────────────────────┤
1290              │jp foo      │ Change to the best ranked parent directory containing the string "foo".          │
1291              ├────────────┼──────────────────────────────────────────────────────────────────────────────────┤
1292              │jc bar test │ Change to the best ranked child directory containing the string "bar" and "test" │
1293              ├────────────┼──────────────────────────────────────────────────────────────────────────────────┤
1294              │jl foo      │ Print all entries in the database containing the word "foo"                      │
1295              └────────────┴──────────────────────────────────────────────────────────────────────────────────┘
1296
1297               (1) TAB completion is available to expand  order  numbers  into
1298              the corresponding paths.
1299
1300              Use  the  --purge option to shrink the database. Without further
1301              parameters, --purge removes all non-existent (un-stat´able)  di‐
1302              rectories  from  the database. If a numeric parameter is passed,
1303              by contrast, all entries ranked below this number  will  be  re‐
1304              moved  from the database. For example, j --purge 100 will remove
1305              all entries ranked below 100.
1306
1307              You can also manually edit the database file using the je (or  j
1308              --edit) command: edit whatever needs to be edited, save changes,
1309              and close the editor. This is useful, for example, to  remove  a
1310              specific entry/directory from the database.
1311
1312              An  alternative way of navigating the jump database is using the
1313              jumper plugin (located in the plugins directory and bound by de‐
1314              fault  to  the "++" action name), which uses fzf to enable fuzzy
1315              searches. Enter ++ to perform a fuzzy search over the jump data‐
1316              base.
1317
1318              Take a look at the dh command as well.
1319
1320       kb, keybinds [list] [edit [APP]] [reset] [readline]
1321              with  no  argument (or if the argument is list), prints the cur‐
1322              rent keyboard codes and their associated functions. To edit  the
1323              keybindings  file,  use the edit option (the file will be opened
1324              with APP, if specified, or with the default associated  applica‐
1325              tion  otherwise). If you somehow messed up your keybindings, use
1326              the ´reset´ option to create a fresh keybindings file  with  the
1327              default  values.  To list readline keybindings, use the readline
1328              option. Bear in mind that these keybindings are not provided  by
1329              clifm,  but by readline itself, and as such depend on the system
1330              settings (they can be  customized  however  via  the  ~/.inputrc
1331              file).
1332
1333       l, le  Create (l) or edit (le) symbolic links.
1334
1335              The syntax for the l command is: l TARGET [LINK_NAME]. Note that
1336              if LINK_NAME is omitted, the symbolic link is  created  as  TAR‐
1337              GET_BASENAME.link in the current directory.
1338
1339              To  edit  the  target of a symbolic link use the le command fol‐
1340              lowed by the desired link name. The user will be prompted to en‐
1341              ter a new link target, using the current one as template.
1342
1343       ll, lv [on, off]
1344              Toggle long/detail view mode
1345
1346       lm [on, off]
1347              Toggle the light mode on/off. This option, aimed at making files
1348              listing faster than the default mode, is especially  useful  for
1349              really old hardware or when working on remote machines (for more
1350              information see the NOTE ON SPEED section below).
1351
1352       log [cmd [list, on, off, status, clear]] [msg [list, on,  off,  status,
1353       clear]]
1354              Enable,  disable, clear, list or check the status of the program
1355              logs, either message (errors and warnings) or command logs.  Ex‐
1356              ample:  log cmd on, to enable command logs, or log msg clear, to
1357              clear/remove message logs.
1358
1359              Consult the FILES section below for information about  how  logs
1360              are written into the logs file.
1361
1362       media
1363
1364              NOTE: This command is Linux-specific
1365
1366              List  available  storage  devices and mount/unmount the selected
1367              one using either udevil or udisks2 (at least one of  these  must
1368              be installed. udevil will be preferred over udisks2). If the de‐
1369              vice is unmounted, it will  be  automatically  mounted,  and  if
1370              mounted, it will be automatically unmounted.
1371
1372              Though  mountpoints  are  determined by the mounting application
1373              itself (udevil or udisks2), clifm will automatically cd into the
1374              corresponding  mountpoint  whenever the mount operation was suc‐
1375              cesfull.
1376
1377              When unmounting, and if the  current  directory  is  inside  the
1378              mountpoint,  clifm  will attempt to cd into the previous visited
1379              directory, and, if none, into the  home  directory,  before  un‐
1380              mounting the device.
1381
1382              To get information about a device, enter iELN, for example, i12,
1383              provided ´12´ is the ELN of the device you want.
1384
1385       mf [NUM, unset]
1386              List only up to NUM files (valid range: >= 0). Use unset to list
1387              all  files  (default).  An  indicator (listed_files/total_files)
1388              will be printed below the list of files whenever  some  file  is
1389              excluded  from the current list (e.g. 20/310). Note however that
1390              though some files are excluded, all of them are  loaded  anyway,
1391              so  that  you can still perform any valid operation on them. For
1392              example, even if only 10 files are listed, you can still  search
1393              for  ALL symbolic links in the corresponding directory using the
1394              appropriate command: /* -l.
1395
1396       mm, mime [open FILE] [info FILE] [edit [APP]] [import]
1397              This is Lira, clifm's resource opener.
1398
1399              Use the open subcommand to open a file with the default  associ‐
1400              ated  application.  Note that, since open is the default action,
1401              it can be omitted. For example: mm file.pdf.  The  same  can  be
1402              achieved more easily via the open command: open file.pdf (or us‐
1403              ing the short command,  o  file.pdf).  Or,  even  shorter,  just
1404              file.pdf.
1405
1406              The  info  option  prints  MIME information about FILE: its MIME
1407              type, and, if any, the application associated to this file  name
1408              or to the file's MIME type.
1409
1410              The  edit  option allows you to edit and customize the MIME list
1411              file. So, if a file has no default associated application, first
1412              get  its MIME info or its file extension (running mm info FILE),
1413              and then add a value for it to the MIME list file using the edit
1414              option  (mm edit or F6). Check the RESOURCE OPENER section below
1415              for information about the mimelist file syntax.
1416
1417              Finally, via the import option clifm will try to import MIME as‐
1418              sociations  from  the  system looking for mimeapps.list files in
1419              those paths specified  by  the  Freedesktop  specification  (see
1420              https://specifications.freedesk
1421              top.org/mime-apps-spec/mime-apps-spec-latest.html). If at  least
1422              one  MIME association is successfuly imported, it will be stored
1423              as mimelist.clifm.XXXXXX (where XXXXXX is a  random  six  digits
1424              alphanumerical  string).  You  can add these new associations to
1425              your mimelist file using the mime edit command.
1426
1427       mp, mountpoints
1428              list available mountpoints and change the current working direc‐
1429              tory to the selected mountpoint.
1430
1431       msg, messages [clear]
1432              with  no  arguments,  prints the list of messages in the current
1433              session. The clear option tells  clifm  to  empty  the  messages
1434              list.
1435
1436       n, new [FILE]... [DIR/]...
1437              create new empty files and/or directories.
1438
1439              If  a file name ends with a slash (/), it will be taken as a di‐
1440              rectory name. Else, it will be created as a  regular  file.  Ex:
1441              n myfile mydir/,  to  create a file named myfile and a directory
1442              named mydir. If no file name is provided, the user will be asked
1443              to enter one.
1444
1445              File name validation is performed over names before creation. In
1446              case of an unsafe name, the user is warned and asked for confir‐
1447              mation.
1448
1449              A  name  (namely,  any component of a path) is considered unsafe
1450              if:
1451                1. Starts with a dash (-): command option flags collision
1452                2.  Is  a  reserved  keyword/expression  (internal):  fastback
1453              (...),  ELN/range  (12,  1-45),  and  MIME/file  type  expansion
1454              (@query, =x)
1455                3. Is a reserved system/shell keyword (´~´, ´.´ ,´..´)
1456                4. Contains embedded  control  characters  (0x00-0x1f  in  the
1457              ASCII table)
1458                5.      Contains      embedded      shell      meta-characters
1459              (*?:[]"<>|(){}&'!\;$)
1460                6. It is too long (larger than NAME_MAX, usually 255 bytes)
1461
1462              For  more  information   about   unsafe   file   names   consult
1463              https://dwheeler.com/essays/fixing-unix-linux-filenames.html.
1464
1465       net [NAME] [list] [edit] [m, mount NAME] [u, unmount NAME]
1466              1. The configuration file
1467
1468              The net command manages connections to remote systems via a sim‐
1469              ple  samba-like  configuration  file   ($HOME/.config/clifm/pro‐
1470              files/PROFILE/nets.clifm). Here you can specify multiple remotes
1471              and options for each of these remotes. Syntax example  for  this
1472              file:
1473
1474               [remote_name]
1475               Comment=A nice descriptive comment
1476               Mountpoint=/path/to/mountpoint
1477               MountCmd=sudo mount.cifs //192.168.0.12/share %m -o OPTIONS
1478               UnmountCmd=sudo umount %m
1479               AutoUnmount=true (Auto-unmount this remote at exit)
1480               AutoMount=false (Auto-mount this remote at startup)
1481
1482              Note:  %m could be used as a placeholder for Mountpoint. %m will
1483              be replaced by the value of Mountpoint.
1484
1485              1.a. Mounting remote file systems
1486
1487              A Samba share:
1488                [samba_share]
1489                Comment=My samba share
1490                Mountpoint="~/.config/clifm/mounts/smb_share"
1491                MountCmd=sudo  mount.cifs  //192.168.0.26/samba_share  %m   -o
1492              mapchars,credentials=/etc/samba/credentials/samba_share
1493                UnmountCmd=sudo umount %m
1494                AutoUnmount=false
1495                AutoMount=false
1496
1497              A SSH file system (sshfs):
1498                [ssh_share]
1499                Comment=My ssh share
1500                Mountpoint="/media/ssh"
1501                MountCmd=sshfs user@192.168.0.26: %m -C -p 22
1502                UnmountCmd=fusermount3 -u %m
1503                AutoUnmount=true
1504                AutoMount=false
1505
1506              1.b. Mounting local file systems
1507
1508              Though  originally  intended  to manage remote file systems, net
1509              can also manage local file systems. Just provide the appropriate
1510              mount  and  unmount  commands. Since the device name assigned by
1511              the kernel might change accross reboots (specially when it comes
1512              to  removable  drives), it is recommended to mount using the de‐
1513              vice´s UUID (Universal Unique Identifier) instead of  the  drive
1514              name. For example:
1515
1516                MountCmd=sudo mount -U c98d91g4-6781... %m
1517
1518              Here´s an example of how to set up net to mount USB devices, one
1519              with a FAT file system, and another with an ISO9660 file system:
1520
1521                [Sandisk USB]
1522                Comment=Sandisk USB drive
1523                Mountpoint="/media/usb"
1524                MountCmd=sudo   mount   -o   gid=1000,fmask=113,dmask=002   -U
1525              5847-xxxx %m
1526                UnmountCmd=sudo umount %m
1527                AutoUnmount=false
1528                AutoMount=false
1529
1530                [Kingston USB]
1531                Comment=Kingston USB drive
1532                Mountpoint="/media/usb2"
1533                MountCmd=sudo mount -t iso9660 -U 2020-10-01-15-xx-yy-zz %m
1534                UnmountCmd=sudo umount %m
1535                AutoUnmount=false
1536                AutoMount=false
1537
1538              NOTE:  The  gid,  fmask, and dmask options are used to allow the
1539              user to access the mountpoint without elevated privileges.
1540
1541              If the device data is unknown, as it often happens when it comes
1542              to removable devices, you should use the media command instead.
1543
1544              2. Command syntax
1545
1546              Without  arguments  (or  via the list subcommand), net lists the
1547              configuration for each remote  available  in  the  configuration
1548              file.
1549
1550              Use  the  edit option to edit the remotes configuration file. If
1551              no further argument is specified, the file will be  opened  with
1552              the  current  resource opener. However, you can pass an applica‐
1553              tion as second parameter to open to configuration file. Example:
1554              ´net edit nano´.
1555
1556              If not already mounted, the m, mount option mounts the specified
1557              remote using the mount command and the  mounpoint  specified  in
1558              the confifuration file and automatically cd into the correspond‐
1559              ing mountpoint. Example: net m smb_work. Since mount is the  de‐
1560              fault action, it can be omitted: net smb_work.
1561
1562              The  u,  unmount  option unmounts the specified remote using the
1563              unmount command specified in the configuration file.  For  exam‐
1564              ple:  net  u smb_work. TAB completion is also available for this
1565              function.
1566
1567              NOTE: If you only need to copy some files to a  remote  location
1568              (including  mobile  phones)  without  the  need to mount the re‐
1569              source, you can make use of the cprm.sh plugin, bound by default
1570              to  the cr action. Set up your remotes (cr --edit) and then send
1571              the file you want (cr FILE).
1572
1573       o, open ELN/FILE [APPLICATION]
1574              open FILE, which can be either a directory,  in  which  case  it
1575              works just like the cd command (see above), a regular file, or a
1576              symbolic link to either of the two. For example:  o 12,  o file‐
1577              name, o /path/to/filename.
1578
1579              By  default,  the open function will open files with the default
1580              application associated to them via Lira, the  built-in  resource
1581              opener  (see  the  mime  command above). However, if you want to
1582              open a file with a different application,  add  the  application
1583              name as second argument, e.g. o 12 leafpad or o12 leafpad.
1584
1585              If you want to run the program in the background, simply add the
1586              ampersand character,  as  usual:  o 12 &,  o 12&,  o12&  or  (if
1587              auto-open is enabled) just 12&.
1588
1589              If  the file to be opened is an archive/compressed file, the ar‐
1590              chive function (see the ad command above) will be  executed  in‐
1591              stead.
1592
1593       oc ELN/FILE...
1594              Interactively change files ownership
1595
1596              A new prompt is displayed using user and primary group common to
1597              all files passed as parameters as ownership template.
1598
1599              Ownership (both user and primary group, if specified) is changed
1600              for  all  files  passed as parameters. If the file is a symbolic
1601              link, the operation is performed on the target file, and not  on
1602              the  symbolic  link  itself.  Bear in mind that recursion is not
1603              supported: use chown(1) (with the -R option) instead.
1604
1605              Both names and ID numbers are allowed (TAB completion for  names
1606              is available).
1607
1608              If  only  a  name/number is entered, it is taken as the user who
1609              owns the file(s).
1610
1611              Use the pc command to edit files permissions.
1612
1613       opener [default] [APPLICATION]
1614              with no argument, prints the currently used resource opener  (by
1615              default, Lira, clifm´s built-in opener). Otherwise, set APPLICA‐
1616              TION (say rifle or xdg-open) as opener or, if default is  passed
1617              instead, use Lira.
1618
1619       ow ELN/FILE [APPLICATION]
1620              If  APPLICATION is specified, open ELN/FILE with APPLICATION. In
1621              case you need to add parameters to  APPLICATION,  it  is  recom‐
1622              mended to quote the expression: ow FILE "APP ARG...".
1623
1624              If  no  APPLICATION is specified, the list of available applica‐
1625              tions associated to ELN/FILE (either via its MIME  type  or  its
1626              file  extension)  is printed, allowing the user to choose one of
1627              these applications, and then open the file with the selected ap‐
1628              plication.
1629
1630              This  command  supports TAB completion. Type "ow filename <TAB>"
1631              and those applications able to open ELN/FILE will be listed.
1632
1633       p, pp, prop ELN/FILE...
1634              print file properties for ELN/FILE. The output of this  function
1635              is much like the combined output of ls -l and stat.
1636
1637              By  default,  directories  size  is not shown. Use pp instead of
1638              just p to print directories size as well (it could  take  longer
1639              depending  on  the  directory's content). On the other side, and
1640              unlike p, pp provides information about  the  dereferenced  sym‐
1641              links  (namely,  the  symlink target) instead of the symlink it‐
1642              self. However, note that, in case of symbolic links to  directo‐
1643              ries,  p  provides information about the link target if the pro‐
1644              vided file name ends with a slash. Otherwise, information  about
1645              the link itself is displayed.
1646
1647              The  time format used to display time information can be custom‐
1648              ized via the PTimeStyle option in the  configuration  file  (de‐
1649              faults  to  "%Y-%m-%d  %H:%M:%S.%N  %z",  where  %N  stands  for
1650              nano-second precision).
1651
1652              If you need to list the properties of all files in  the  current
1653              directory,  try  the  long  view mode (ll or Alt-l). Fields dis‐
1654              played in this mode can be customized using the  PropFields  op‐
1655              tion in the configuration file. For custom timestamp formats use
1656              the TimeStyle option.
1657
1658              For more information about file details consult the file-details
1659              help topic: help file-details.
1660
1661       pc ELN/FILE...
1662              Interactively  change  files  permissions (only traditional Unix
1663              permissions are supported).
1664
1665              A new prompt is displayed using actual permissions (in  symbolic
1666              notation)  of the file to be edited as template. If editing mul‐
1667              tiple files with different sets of permissions, only shared per‐
1668              mission bits are set in the permissions template.
1669
1670              Bear in mind that, if editing multiple files at once, say pc sel
1671              or pc *.c, the new permissions set will be  applied  to  all  of
1672              them.
1673
1674              Both symbolic and octal notation for the new permissions set are
1675              allowed.
1676
1677              Recursivelly setting file  permissions  is  not  supported.  Use
1678              chmod(1) with the -R flag instead.
1679
1680              If  you  just  need to toggle the executable permission bit on a
1681              file, you can use the te command.
1682
1683              Use the oc command to edit files ownership.
1684
1685       pf,  profile  [ls,  list]  [set,  add,  del  PROFILE]  [rename  PROFILE
1686       NEW_NAME]
1687              with  no  arguments,  prints the name of the currently used pro‐
1688              file. Use the ls or list option to list available  profiles.  To
1689              switch, add, delete, or rename a profile, use the set, add, del,
1690              and rename options respectively.
1691
1692       pg, pager [on, off, status, [NUM]]
1693              toggle Mas, the built-in pager, on/off. Useful to list  directo‐
1694              ries  with  hundreds or thousands of files, the pager will start
1695              working, if set to on, whenever the screen is not enough to list
1696              all files.
1697
1698              Set  it  to any positive integer greater than 1 to run the pager
1699              whenever the amount of files in the current directory is greater
1700              than or equal to this value, say 1000 (0 amounts to off and 1 to
1701              on).
1702
1703              Once in the pager, press the Down arrow key, Space or  Enter  to
1704              move downwards one line, or PageDown to move downwards an entire
1705              page. To go upwards, use the shortcuts provided by your terminal
1706              emulator,  for example, Alt-PageUp or Alt-Up. Press ´c´, ´p´, or
1707              ´q´ keys to stop the pager, and ´h´ or ´?´ for help.
1708
1709       pin [FILE/DIR]
1710              pin a file or a directory to be accessed later via the comma (,)
1711              keyword.  For  example,  run  pin mydir and then access mydir as
1712              follows: cd  where the comma is automatically  expanded  to  the
1713              pinned file, in this case mydir. The comma keyword could be used
1714              with any command, either internal or external, e.g, ls .
1715
1716              With no arguments, the pin command  prints  the  current  pinned
1717              file,  if  any.  If  an argument is given, it will be taken as a
1718              file name to be pinned. Running this command  again,  frees  the
1719              previous  pinned  file  and sets a new one. In other words, only
1720              one pin is supported at a time.
1721
1722              An easy alternative to create as many pins or shortcuts  as  you
1723              want,  and how you want, is to use the alias function. Bookmarks
1724              could also be used to achieve a very similar result.
1725
1726              At program exit, the pinned file is written to  a  file  in  the
1727              configuration  directory (as .pin) to be loaded in the next ses‐
1728              sion.
1729
1730       prompt [set NAME] [list] [edit [APP]] [unset] [reload]
1731              Manage clifm's prompts. Use the set  subcommand  to  temporarily
1732              change  the current prompt to the prompt named NAME (use the un‐
1733              set subcommand to unset the current prompt and set  the  default
1734              one).  Available prompts (which can be listed via prompt list or
1735              prompt set <TAB>) are defined in the prompts  file  ($HOME/.con‐
1736              fig/clifm/prompts.clifm). To permanently set a prompt, edit your
1737              color scheme file (via the cs edit command) and  set  Prompt  to
1738              either a prompt code or a prompt name (as defined in the prompts
1739              file).
1740
1741       q, quit, exit, Q
1742              Gracefully quit clifm. Use Q to gracefully quit and  enable  the
1743              CD  on  quit  functionality  (write  last  visited  directory to
1744              $XDG_CONFIG/clifm/.last to be later read by  a  shell  function.
1745              See the SHELL FUNCTIONS section below).
1746
1747       rf, refresh
1748              refresh the screen, that is, reprint files in the current direc‐
1749              tory and update the prompt. If the current directory is not  ac‐
1750              cessible  for any reason, rf will go up until it finds an acces‐
1751              sible one and then will change to that directory.
1752
1753       rl, reload
1754              Reload all settings, except those passed as command  line  argu‐
1755              ments, from the configuration file.
1756
1757       rr [DIR] [EDITOR]
1758              Remove files and/or directories in bulk using a text editor.
1759
1760              rr sends all files in DIR (or in the current directory if DIR is
1761              omitted) to a temporary file and opens it using EDITOR  (or  the
1762              default associated application for text/plain MIME type, if EDI‐
1763              TOR is omitted).
1764
1765              Once in the editor, remove the lines corresponding to the  files
1766              you  want  to delete. Save changes and close the editor. Removed
1767              files will be listed and the user asked for confirmation.
1768
1769       s, sel ELN/FILE... [[!]PATTERN] [-filetype] [:PATH]
1770              send one or multiple files (either regular files or directories)
1771              to  the Selection Box. sel accepts individual elements, range of
1772              elements, say 1-6, file  names  and  paths,  just  as  wildcards
1773              (globbing)  and  regular expressions. Example: s 1 4-10 ^r file*
1774              filename /path/to/filename.
1775
1776              If not in light mode, once a file is selected, and if  the  file
1777              is in the current working directory, the corresponding file name
1778              will be marked with an asterisk (colored according to the  value
1779              of  li in the color scheme file (by default bold green)), at the
1780              left of the file name (and at the right of its ELN).
1781
1782              Just as in the search function, it is also possible  to  further
1783              filter the list of matches indicating the desired file type. For
1784              instance, s ^ -d will select  all  directories  in  the  current
1785              working  directory.  For  available  file  type  filters see the
1786              search function above.
1787
1788              By default, the selection function operates on the current work‐
1789              ing  directory.  To  select files in any other directory use the
1790              ":PATH" expression. For example, to  select  all  regular  files
1791              with  a .conf extension in the /etc directory, the command would
1792              be: s .*\.conf$ -f :/etc, or using wildcards: s *.conf -f :/etc.
1793              Of course, you can also do just s -f /etc/*.conf.
1794
1795              Just  as in the case of the search function, inverse matching is
1796              supported for patterns, either wildcards or regular expressions.
1797              To invert the meaning and action of a pattern, prepend an excla‐
1798              mation mark (!). E.g., to select all non-hidden regular files in
1799              the  Documents  directory,  issue  this command: s !^. -f :Docu‐
1800              ments, or, to select all directories in /etc, except those  end‐
1801              ing with ".d": s !*.d -d :/etc.
1802
1803              Glob  and  regular expressions could be used together. For exam‐
1804              ple: s ^[r|R].*d$ /etc/*.conf will  select  all  files  starting
1805              with  either 'r' or 'R' and ending with 'd' in the current work‐
1806              ing directory, plus all .conf files in the /etc directory.  How‐
1807              ever, this use is discouraged if both patterns refer to the same
1808              directory, since the second one will probably override  the  re‐
1809              sult of the first one.
1810
1811              It  is important to note that glob expressions are evaluated be‐
1812              fore regular expressions, in such a way that  any  pattern  that
1813              could be understood by both kinds of pattern matching mechanisms
1814              will be evaluated first according to the former, that is,  as  a
1815              glob  expression.  For  example,  '.*',  as  regular expression,
1816              should match all files.  However,  since  glob  expressions  are
1817              evaluated  first, it will only match hidden files. To select all
1818              files using a glob expression, try ´.* *´, or,  with  a  regular
1819              expression:  ´^´ or ´(.*?)´. The keyboard shortcut Alt-a is also
1820              available to perform the same operation.
1821
1822              The Selection Box is accessible from different instances of  the
1823              program,  provided  they  use  the same profile (see the profile
1824              command below). By default, indeed, each profile keeps a private
1825              Selection  Box, being thus not accessible to other profiles. You
1826              can nonetheless modify this behavior via the ShareSelbox  option
1827              in  the  configuration file. If ShareSelbox is enabled, selected
1828              files are stored  in  /tmp/clifm/username/.selbox.clifm.  Other‐
1829              wise,   /tmp/clifm/username/.selbox_profilename.clifm   is  used
1830              (this is the default).
1831
1832              Operating on selected files
1833
1834              To operate on one or more selected files use the sel keyword (s:
1835              can  be used as well). For example, to print the file properties
1836              of all selected files: p sel (or p s:). Use s:<TAB> to list  se‐
1837              lected  files  (multi-selection  is  available if running in FZF
1838              mode).
1839
1840              Listing selected files
1841
1842              To list selected files use the sb command (standing  for  Selec‐
1843              tion Box). You can also type s:<TAB>.
1844
1845              Deselecting files
1846
1847              To  deselect  files  use the ds command. See above. You can also
1848              press Alt-d to deselect all files at once.
1849
1850              Note:  If there is a file named sel in  the  current  directory,
1851              use  ./sel  to distinguish it from the sel keyword. For example,
1852              enter p ./sel to tell CliFM that you want to get the  properties
1853              of  the  file  named  sel rather than the properties of the cur‐
1854              rently selected files.
1855
1856              For more information consult the BUILT-IN EXPANSIONS section be‐
1857              low.
1858
1859       sb, selbox
1860              show the elements currently contained in the Selection Box.
1861
1862       splash show the splash screen.
1863
1864       st, sort [METHOD] [rev]
1865              with  no  argument,  print  the current sorting order. Else, set
1866              sorting order to METHOD, where METHOD could be one of: 0 = none,
1867              1 = name, 2 = size, 3 = atime, 4 = btime (ctime, if btime is not
1868              available), 5 = ctime, 6 = mtime, 7 = version (name, if ctime is
1869              not available), 8 = extension, and 9 = inode, 10 = owner, and 11
1870              = group. Both numbers and names are allowed. Bear in  mind  that
1871              methods  10  and  11  sort  by owner and group ID number, not by
1872              owner and group names. The default is version.
1873
1874              By default, files are sorted from less to more (ex: from ´a´  to
1875              ´z´  if  using  the "name" method). Use the rev option to invert
1876              this order. Ex: st rev or st 3 rev. Switch back to the  previous
1877              ordering running st rev again.
1878
1879       stats  print  statistics  about  files  in  the  current directory (not
1880              available in light mode).
1881
1882       t, trash [ELN/FILE]... [ls, list] [clear, empty] [del [FILE]...]]
1883              with no argument (or by passing the ls option),  it  prints  the
1884              list  of  currently  trashed files. The clear or empty parameter
1885              removes all files from the trash can, while  the  del  parameter
1886              lists  trashed  files allowing the user to remove one or more of
1887              them. If using del,  TAB  completion  to  list/select  currently
1888              trashed files is available.
1889
1890              The  trash  directory  is  $XDG_DATA_HOME/Trash,  usually ~/.lo‐
1891              cal/share/Trash. Since this trash system follows the Freedesktop
1892              specification,  it  is able to handle files trashed by different
1893              Trash implementations.
1894
1895              To undelete/untrash trashed files see the undel command below.
1896
1897       tag [add, del, list, list-full, new, merge,  rename,  untag]  [FILE]...
1898       [[:]TAG]
1899              tag is the main Etiqueta command, clifm's built-in files tagging
1900              system. See the FILE TAGS section for a complete description  of
1901              this command.
1902
1903       te FILE...
1904              toggle  executable  bit (on user, group, and others) on FILE(s).
1905              It is equivalent to the -x and +x options for the chmod(1)  com‐
1906              mand.
1907
1908       tips   print the list of clifm tips
1909
1910       u, undel, untrash [*, a, all] [FILE]...
1911              If  file  names  are passed as parameters, undelete these files,
1912              that is, restore them to  their  original  location.  Otherwise,
1913              this  function prints a list of currently trashed files allowing
1914              you to choose one or more of these files to  be  undeleted.  Use
1915              the  *,  a  or  all  parameters to undelete all trashed files at
1916              once. TAB completion to list/select currently trashed  files  is
1917              available.
1918
1919       unpin  this  command  takes  no argument. It just frees the current pin
1920              and, if it exists, deletes the .pin file generated  by  the  pin
1921              command..TP vv FILE... DIR copy FILE(s) into DIR and bulk rename
1922              them at once.
1923
1924       ver, version
1925              show clifm version details.
1926
1927       view [edit [APP]]
1928              preview files in the current directory (full  screen).  Requires
1929              fzf(1). Alt+- is also available.
1930
1931              To  edit  the  previewer configuration file, enter view edit, or
1932              view edit vi to open it with a  specific  application,  in  this
1933              case, vi(1).
1934
1935              By  pressing Enter or Right, the currently highlighted file will
1936              be selected and view closed. To select multiple files, mark them
1937              with  the  TAB  key and then press Enter or Right to confirm. To
1938              quit view press Escape or Left.
1939
1940              For      image       previews       consult       the       Wiki
1941              (https://github.com/leo-arch/clifm/tree/master/misc/tools/img
1942              prev).
1943
1944              For further information consult the SHOTGUN section below.
1945
1946       ws [NUM/NAME [unset], +, -]
1947              clifm offers up to eight workspaces, each with its own  indepen‐
1948              dent path.
1949
1950              With  no  argument, the ws command prints the list of workspaces
1951              and its corresponding paths, highlighting the current workspace.
1952
1953              Use NUM to switch to the workspace number NUM, NAME to switch to
1954              the  workspace  named  NAME,  the plus sign (+) to switch to the
1955              next workspace, and the minus sign (-) to switch to the previous
1956              workspace.
1957
1958              To  unset  a  workspace use the unset subcommand preceded by the
1959              workspace (either number or name) to be unset. For example: ws 2
1960              unset.
1961
1962              Four keyboard shortcuts are available to easily switch to any of
1963              the first four workspaces: Alt-[1-4].
1964
1965              Every time an empty workspace is created, it starts in the  cur‐
1966              rent working directory.
1967
1968              Though  by  default  workspaces  are  unnamed, you can name them
1969              wathever you like using the WorkspaceNames option in the config‐
1970              uration file.
1971
1972              Use  autocommands  to persistenly set options per workspace, for
1973              example, to always list files in the  third  workspace  in  long
1974              view. See the AUTOCOMMANDS section below for more information.
1975
1976              Make  local settings private to the current workspace by setting
1977              the PrivateWorkspaceSettings option to true in the configuration
1978              file:  settings  changed via either the command line or keyboard
1979              shortcuts (say Alt-l, to toggle the long view) will  apply  only
1980              to  the  current  workspace  and  will  be  remembered even when
1981              switching workspaces.
1982
1983       x, X [DIR]
1984              open DIR, or the current working directory if DIR is not  speci‐
1985              fied,  in  a new instance of clifm (as root if X, as the current
1986              unprivileged user if x) using the value of TerminalCmd (from the
1987              configuration  file)  as terminal emulator. If this value is not
1988              set, xterm will be used  as  fallback  terminal  emulator.  This
1989              function is only available for graphical environments.
1990
1991       Shell-builtins implementations
1992
1993              pwd [-LP]
1994
1995                print the current working directory
1996
1997              export NAME=VALUE...
1998
1999                export variables to the environment
2000
2001              umask [VALUE]
2002
2003                print/set the current umask value
2004
2005              unset NAME
2006
2007                remove a variable from the environment
2008
2009

5. FILE FILTERS

2011       Clifm provides multiple ways to filter the current list of files:
2012
2013       a)  Hidden files: via the -A and -a command line flags, the hf command,
2014       and the Alt-. keybinding.
2015
2016       b) Directories: via the --only-dirs command line switch and  the  Alt-,
2017       keybinding.
2018
2019       c) File names and file types: either via a regular expression or a file
2020       type character (see below) using the ft command (the Filter  option  in
2021       the  configuration  file  and the CLIFM_FILTER environment variable are
2022       also available). For example, to exclude backup files  (ending  with  a
2023       tilde):
2024
2025        CLIFM_FILTER=´!.*~$´ clifm
2026
2027       or (in the configuration file):
2028
2029        Filter="!.*~$"
2030
2031       or (via the ft command):
2032
2033        ft !.*~$
2034
2035       See the ft command for a few more examples.
2036
2037       d) Filtering files via the TAB key:
2038
2039       You can filter files by name using wildcards. For example: p *.mp3<TAB>
2040       (or /*.mp3<TAB>) to get a list of MP3 files in the current directory.
2041
2042       Files can also be filtered by  MIME-type  via  the  ´@´  keyword.  Type
2043       @<TAB>  to  list  all  MIME-types  found  in  the current directory, or
2044       @query<TAB> to list all  files  whose  MIME-type  includes  the  string
2045       "query".  For  example,  @image<TAB> will list all files in the current
2046       directory whose MIME type includes the string "image".
2047
2048       Finally, files can be filtered as well by file type using the ´=´  key‐
2049       word  followed  by  a  file  type  character  (see below). For example,
2050       =l<TAB> to get a list of symbolic links in the current directory.
2051
2052       Note: If using TAB completion in fzf mode, multi-selection  is  allowed
2053       (except in the case of @<TAB>).
2054
2055       Available file type characters:
2056
2057        b: Block devices
2058        c: Character devices
2059        C: Files with capabilities (1)(2)
2060        d: Directories
2061        f: Regular files
2062        g: SGID files (2)
2063        h: Multi-hardlink files (directories excluded)
2064        l: Symbolic links
2065        o: Other-writable files (2)
2066        p: FIFO/pipes (2)
2067        s: Sockets (2)
2068        D: Doors (Solaris only)
2069        P: Event ports (Solaris only)
2070        t: Files with the sticky bit set (2)
2071        u: SUID files (2)
2072        x: Executable files (2)
2073
2074       (1) Only for TAB completion
2075       (2) Not available in light mode
2076
2077       e) Grouping files (via automatic expansion):
2078
2079       By  means  of  the  above features, you can easily group and operate on
2080       groups of files. For example, this command:
2081
2082        vt :b @image =x sel t:work *.txt
2083
2084       opens a virtual directory (see the VIRTUAL DIRECTORIES  section  below)
2085       automatically expanding the above expressions as follows:
2086
2087
2088       ┌───────────┬────────────────────────────┐
2089Expression Description                
2090       ├───────────┼────────────────────────────┤
2091       │:b         │ All your bookmarks (paths) │
2092       ├───────────┼────────────────────────────┤
2093       │@image     │ All image files (CWD)      │
2094       ├───────────┼────────────────────────────┤
2095       │=x         │ All executable files (CWD) │
2096       ├───────────┼────────────────────────────┤
2097       │sel        │ All selected files         │
2098       ├───────────┼────────────────────────────┤
2099       │t:work     │ All files tagged as work
2100       ├───────────┼────────────────────────────┤
2101       │*.txt      │ All .txt files (CWD)       │
2102       └───────────┴────────────────────────────┘
2103

6. KEYBOARD SHORTCUTS

2105       Ctrl-Alt-j: Switch to vi editing mode
2106
2107       Ctrl-Alt-e: Switch back to emacs editing mode (default)
2108
2109       Right, Ctrl-f: Accept the entire current suggestion
2110
2111       Alt-Right,  Alt-f: Accept only the first word of the current suggestion
2112       (up to first slash or space)
2113
2114       Alt-c: Clear the current command line buffer
2115
2116       Alt-q: Delete last word (up to last slash or space)
2117
2118       Alt-i, Alt-.: Toggle hidden files on/off
2119
2120       Alt-l: Toggle long view mode on/off
2121
2122       Alt-g: Toggle list-directories-first on/off
2123
2124       Alt-,: Toggle list only directories on/off
2125
2126       Ctrl-Alt-l: Toggle max file name length on/off
2127
2128       Ctrl-Alt-i:, Alt-TAB: Toggle disk usage analyzer on/off
2129
2130       Alt-w: Toggle full path file names in virtual directories
2131
2132       Ctrl-l: Refresh the screen (reprint the list of files  in  the  current
2133       directory)
2134
2135       Alt-t: Clear program messages
2136
2137       Alt-m: List mountpoints
2138
2139       Alt-b: Launch the Bookmarks Manager
2140
2141       Alt-h: Show directory history
2142
2143       Alt-n: Create new file or directory
2144
2145       Alt-s: Open the Selection Box
2146
2147       Alt--: Launch the files previewer (view command)
2148
2149       Alt-a: Select all files in the current working directory
2150
2151       Alt-d: Deselect all selected files
2152
2153       Alt-p: Change to pinned directory
2154
2155       Alt-1: Switch to workspace 1
2156
2157       Alt-2: Switch to workspace 2
2158
2159       Alt-3: Switch to workspace 3
2160
2161       Alt-4: Switch to workspace 4
2162
2163       Alt-r: Change to root directory
2164
2165       Alt-e, Home: Change to home directory
2166
2167       Alt-u, Shift-Up: Change to parent directory
2168
2169       Alt-j, Shift-Left: Change to previous visited directory
2170
2171       Alt-k, Shift-Right: Change to next visited directory
2172
2173       Ctrl-Alt-o: Switch to previous profile
2174
2175       Ctrl-Alt-p: Switch to next profile
2176
2177       Ctrl-Alt-a: Archive selected files
2178
2179       Ctrl-Alt-e: Export selected files
2180
2181       Ctrl-Alt-r: Rename selected files
2182
2183       Ctrl-Alt-d: Remove selected files
2184
2185       Ctrl-Alt-t: Trash selected files
2186
2187       Ctrl-Alt-u: Restore trashed files
2188
2189       Ctrl-Alt-g: Open/change-to last selected file/directory
2190
2191       Ctrl-Alt-n: Move selected files into the current directory
2192
2193       Ctrl-Alt-v: Copy selected files into the current directory
2194
2195       Alt-y: Toggle light mode on/off
2196
2197       Alt-z: Switch to previous sorting method
2198
2199       Alt-x: Switch to next sorting method
2200
2201       Ctrl-x: Launch a new instance of clifm
2202
2203       Ctrl-y: Copy the contents of the line buffer to the clipboard (1)
2204
2205       F1: Go to the manpage
2206
2207       F2: List commands
2208
2209       F3: List keybindings
2210
2211       F6: Open the MIME list file
2212
2213       F7: Open the shotgun configuration file
2214
2215       F8: Open the current color scheme file
2216
2217       F9: Open the keybindings file
2218
2219       F10: Open the main configuration file
2220
2221       F11: Open the bookmarks file
2222
2223       F12: Quit
2224
2225       NOTE 1: Some of these keybindings might not work on your console/termi‐
2226       nal emulator, depending on your system. Some useful tips  on  this  re‐
2227       gard:
2228
2229       (1) This shortcut is bound to the xclip plugin. See the PLUGINS section
2230       below for more information.
2231
2232       Haiku terminal: Most of these keybindings won´t work on the Haiku  ter‐
2233       minal,  since  Alt plays here the role Ctrl usually plays in most other
2234       systems (see the Haiku documentation). To fix  this,  set  your  custom
2235       keybindings.
2236
2237       Kernel  built-in  console: Key sequences involving the Shift key (S-up,
2238       S-left, and S-right in our case) will just not work. Use  the  alterna‐
2239       tive key sequences instead: M-u, M-j, and M-k respectively
2240
2241       NetBSD  (wsvt25) and OpenBSD (vt220) kernel consoles: Key sequences in‐
2242       volving the Alt key won´t work out of the box. Here´s how  to  make  it
2243       work:
2244
2245               On OpenBSD:
2246               1)  Copy  /etc/examples/wsconsctl.conf  to /etc (if it does not
2247              already exist)
2248               2) Add the metaesc flag to your current keyboard enconding. For
2249              example keyboard.encoding=us.metaesc
2250               You  might  need  to reboot the machine for changes to take ef‐
2251              fect.
2252
2253               On NetBSD:
2254               Add the metaesc flag  to  your  current  encoding  in  /etc/ws‐
2255              cons.conf. Example: encoding us.metaesc
2256               You  might  need  to reboot the machine for changes to take ef‐
2257              fect.
2258
2259       Konsole: If Shift+left and Shift+right are not  already  bound  to  any
2260       function,  you  need to bind them manually. Go to Settings -> Edit cur‐
2261       rent profile -> Keyboard -> Default (Xfree4), and add these values:
2262               Left+Shift                             \E[1;2D
2263               Right+Shift                            \E[1;2C
2264
2265              If they are already bound, by contrast, you only need to unbound
2266              them. Go to "Settings -> Configure keyboard shortcuts", click on
2267              the corresponding keybinding, and set it to "Custom (none)").
2268
2269       Terminology/Yakuake: Shift+left and Shift+right are  already  bound  to
2270       other  functions,  so  that  you only need to unbind them or rebind the
2271       corresponding functions to different key sequences.
2272
2273       Of course, the above two procedures should be similar in case  of  key‐
2274       binding issues in other terminal emulators.
2275
2276       In  case some of these keybindings are already used by your Window Man‐
2277       ager, you only need to unbind the key or rebind the corresponding func‐
2278       tion  to another key. Since each Window Manager uses its own mechanisms
2279       to set/unset keybindings, you should consult the appropriate manual.
2280
2281       Customizing keybindings
2282
2283       The above are the default keyboard  shortcuts.  However,  they  can  be
2284       freely  modified using the ´kb edit´ command (or pressing F9), or edit‐
2285       ing the keybindings file (see the FILES section below) to your liking.
2286
2287       Since clifm does not depend on the curses library, keybindings are  set
2288       up  via ANSI escape codes, for example, "\[17~" for the F6 key. The two
2289       main difficulties with ANSI escape codes are: 1) They are not intuitive
2290       at  all, and 2) They vary depending on the terminal emulator used. This
2291       is why we provide a plugin (kbgen) to more easily configure  your  key‐
2292       bindings.
2293
2294       The  plugin  can  be found in the plugins directory as a C source file.
2295       The first step, therefore, is to compile this source file to produce  a
2296       binary file. Compile as follows:
2297
2298        gcc -o kbgen kbgen.c
2299
2300       Note:  Depending  on  your  system,  you might need to link against the
2301       curses library adding either -lcurses or -lncurses to the above line.
2302
2303       Now, run the plugin by entering ´./kbgen´. Use either octal,  hexadeci‐
2304       mal codes or symbols. Example: For F12 'kbgen' will print the following
2305       lines:
2306
2307               Hex  | Oct  | Symbol
2308               ---- | ---- | ------
2309               \x1b | \033 | ESC (\e)
2310               \x5b | \133 | [
2311               \x32 | \062 | 2
2312               \x34 | \064 | 4
2313               \x7e | \176 | ~
2314
2315       In this case, supposing you want to use F12 to open  the  configuration
2316       file, the keybinding would be any of the following:
2317
2318               open-config:\x1b\x5b\x32\x34\x7e (Hex)
2319               open-config:\033\133\062\064\176 (Oct)
2320               open-config:\e[24~ (Symbol)
2321
2322       GNU  emacs escape sequences are also allowed (ex: "\M-a", Alt-a in most
2323       keyboards, or "\C-r" for Ctrl-r). Some codes, especially those  involv‐
2324       ing  keys  like  Ctrl or the arrow keys, vary depending on the terminal
2325       emulator and the system settings. These keybindings should  be  set  up
2326       thus  on  a per terminal basis. You can also consult the terminfo data‐
2327       base via the infocmp command. See terminfo(5) and infocmp(1).
2328
2329       Readline keybindings
2330
2331       System readline keybindings for command line editing, such  as  Ctrl-a,
2332       to  move the cursor to the beginning of the line, or Ctrl-e, to move it
2333       to the end, should work out of the box. Of course, you can modify read‐
2334       line  keybindings using the $HOME/.inputrc file, either globally or for
2335       some specific terminal or application. In this latter case, it is  pos‐
2336       sible  to  set keybindings specifically for clifm using the application
2337       construct, that is, telling readline that the following keybindings ap‐
2338       ply  only to clifm. For example, to bind the function "kill-whole-line"
2339       to Ctrl-b, add the following lines to your .inputrc file:
2340
2341               $if clifm
2342               "\C-b": kill-whole-line
2343               $endif
2344
2345       Keybindings for plugins
2346
2347       clifm provides four customizable keybindings for  custom  plugins.  The
2348       procedure for setting a keybinding for a plugin is the following:
2349               1) Copy your plugin to the plugins directory (or use any of the
2350              plugins already in there)
2351               2) Link pluginx (where ´x´ is the plugin number [1-4]) to  your
2352              plugin  using  the  ´actions  edit´ command. Ex: "plugin1=myplu‐
2353              gin.sh"
2354               3) Set a keybinding for pluginx using the  ´kb  edit´  command.
2355              Ex: "plugin1:\M-7"
2356
2357

7. THEMING

2359       All  customization settings (theming) are made from a single configura‐
2360       tion  file  (the  color  scheme  file),   installed   by   default   in
2361       XDG_DATA_DIRS/clifm/colors  (usuallly  /usr/local/share/clifm/colors or
2362       /usr/share/clifm/colors), though color scheme files found  in  XDG_CON‐
2363       FIG_HOME/clifm/colors  (usually  HOME/.config/clifm/colors) take prece‐
2364       dence.
2365
2366       Note: Color scheme files are copied automatically into the local colors
2367       directory when running the cs edit command.
2368
2369       Each color scheme may include any (or all) of the below options:
2370
2371        FiletypeColors  =  Colors for different file types, such as directory,
2372       regular files, and so on. See the COLORS section below.
2373
2374        InterfaceColors = Colors for clifm's interface, such  as  ELN's,  file
2375       properties  bits, suggestions, syntax highlighting, etc. See the COLORS
2376       section below.
2377
2378        ExtColors = Colors for files based of file name's extension.  See  the
2379       COLORS section below.
2380
2381        DateShades = A comma delimited list of colors used to print timestamps
2382       (long view). Consult the default color scheme file  for  more  informa‐
2383       tion.
2384
2385        SizeShades = A comma delimited list of colors used to print file sizes
2386       (long view). Consult the default color scheme file  for  more  informa‐
2387       tion.
2388
2389        DirIconColor  = Color for the directory icon (when icons are enabled).
2390       See the COLORS section below. Only when using icons-in-terminal or Ner‐
2391       fonts.  If using rather emoji-icons (default build), this option is ig‐
2392       nored.
2393
2394        Prompt = Define CliFM´s prompt. See the THE PROMPT section below.
2395
2396        DividingLine = The line dividing the current list  of  files  and  the
2397       prompt. See the THE DIVIDING LINE below.
2398
2399        FzfTabOptions  =  Options  to be passed to fzf when using the fzf mode
2400       for TAB completion, including colors. See the BUILT-IN EXPANSIONS  sec‐
2401       tion below.
2402
2403       The color scheme (or just theme) can be set either via the command line
2404       (--color-scheme=NAME), via the ColorScheme option in the main  configu‐
2405       ration  file,  or using the cs command, for instance, cs mytheme. Enter
2406       just cs to list available color schemes (TAB completion is  available).
2407       To edit the current color scheme enter cs edit.
2408
2409       1. COLORS
2410
2411       If 256 colors support is detected for the current terminal, and not set
2412       in any other way (either via the ColorScheme option in  the  configura‐
2413       tion  file  or  the --color-scheme command line switch), clifm will at‐
2414       tempt to load the 256 colors version of the default color  scheme:  de‐
2415       fault-256. Otherwise, it falls back to the 16 colors version.
2416
2417       All  color  codes  are specified in the corresponding color scheme file
2418       (by default ~/.config/clifm/colors/default.clifm). You  can  edit  this
2419       file pressing F8 or entering cs edit.
2420
2421       Color codes
2422
2423       Colors are specified using the same format used by dircolors(1) and the
2424       LS_COLORS environment variable, namely, a colon separated list of codes
2425       with this general format: name=value, where name refers to an interface
2426       element, and value to the color to be used by this element.
2427
2428       This is the list of file type codes (you will find them  in  the  File‐
2429       typeColors section of the current color scheme file):
2430
2431               di = directory
2432               ed = empty directory
2433               nd = directory with no read/exec permission
2434               fi = regular file
2435               ef = empty regular file
2436               nf = file with no access permission
2437               ln = symlink
2438               mh = multi-hardlink file
2439               or = orphaned or broken symlink
2440               bd = block device
2441               cd = character device
2442               pi = FIFO, pipe
2443               so = socket
2444               su = SUID file
2445               sg = SGID file
2446               tw = sticky and other writable directory
2447               st = sticky and not other writable directory
2448               ow = other writable directory
2449               ex = executable file
2450               ee = empty executable file
2451               ca = file with capabilities
2452               oo = door/port (Solaris only)
2453               no = unknown file type
2454               uf = unaccessible files (fstatat(3) error)
2455
2456
2457       The  following  codes are used for different interface elements (in the
2458       InterfaceColors section of the current color scheme file):
2459
2460               Suggestions
2461               sb = shell built-ins
2462               sc = aliases and shell command names
2463               sd = internal commands description
2464               sf = ELN's, bookmarks, tag, and file names
2465               sh = commands history entries
2466               sx = suggestions for clifm's internal commands and parameters
2467               sp = suggestions pointer (ex: 56 > filename, where '>'  is  the
2468              suggestion pointer)
2469               sz = file names (fuzzy)
2470
2471               Syntax highlighting
2472               hb = brackets ´()[]{}´
2473               hc = comments (lines starting with '#')
2474               hd = slashes
2475               he = expansion chars ´~*´
2476               hn = numbers
2477               hp = option parameters (starting with ´-´)
2478               hq = quoted strings (both single and double quotes)
2479               hr = process redirection (>)
2480               hs = process separators (; & |)
2481               hv = variable names (starting with ´$´)
2482               hw = Backslash (aka whack)
2483
2484               Prompt elements
2485               li = selected files
2486               ti = trash indicator
2487               em = error message indicator
2488               wm = warning message indicator
2489               nm = notice message indicator
2490               ro = read-only mode indicator
2491               si = stealth mode indicator
2492               tx = command line text (regular prompt)
2493
2494               File properties
2495               dd  = last access/change/modification time (1)
2496               dg   =  file  ID  (UID, GID) whenever the current user owns the
2497              file or is in the file´s group
2498               dn  = dash (unset property)
2499               do  = octal value for file properties
2500               dp  = SUID, SGID, sticky bit
2501               dr  = read permission bit
2502               dw  = write permission bit
2503               dxd = executable permission bit (directories)
2504               dxr = executable permission bit (regular files)
2505               dz  = size (1)
2506
2507               (1) If unset, gradient colors are used (based on file size  and
2508              file age). This is the default.
2509
2510               NOTE: For a better graphical representation of file properties,
2511              256 colors are used if possible (otherwise, clifm falls back  to
2512              16 colors).
2513
2514               Miscellaneous interface elements
2515               bm  = bookmarked directory in the bookmarks screen
2516               fc  = files counter
2517               df  = default color
2518               dl  = dividing line
2519               el  = ELN color
2520               lc  = Symbolic link indicator (ColorLinksAsTarget only)
2521               mi   =  misc  indicators (disk usage, sort method, bulk rename,
2522              jump database list)
2523               ts  = matching suffix for possible TAB completed entries
2524               tt  = tilde for trimmed file names
2525               wc  = welcome message
2526               wsN = color for workspace N (1-8)
2527               xs  = exit code: success
2528               xf  = exit code: failure
2529
2530       Supported colors
2531
2532       Colors are basically traditional ANSI color codes less the escape char‐
2533       acter  and the final ´m´. Thus, for instance, if you want non-empty di‐
2534       rectories to be bold blue, add this to the FiletypeColors line  in  the
2535       corresponding color scheme file: di=01;34. If you want ELN's to be red,
2536       add this code to the InterfaceColors line: el=00;31
2537
2538       Color codes can be used for file  extensions  as  well  (regular  files
2539       only)  using  this  format: *.ext=color. For example, to print C source
2540       files in bold green, add this to the ExtColors line in the  correspond‐
2541       ing color scheme file: *.c=01;32
2542
2543       Note:  Non-accessible  (non-readable  by  the current user), executable
2544       (including SUID and SGID)  files,  and  files  with  capabilities  take
2545       precedence over file extensions. For example, the file file.mp3, if ex‐
2546       ecutable, will be printed using the color code associated to executable
2547       files (ex) even if there is a color code associated to .mp3 files.
2548
2549       Six  digits  hexadecimal  color  codes are supported as well using this
2550       general format: #RRGGBB[-[1-9]], where 1-9 is a display attribute. This
2551       is the list of attributes:
2552
2553               1: Bold or increased intensity
2554               2: Faint, decreased intensity or dim
2555               3: Italic (Not widely supported)
2556               4: Underline
2557               5: Slow blink
2558               6: Rapid blink
2559               7: Reverse video or invert
2560               8: Conceal or hide (Not widely supported)
2561               9: Crossed-out or strike
2562
2563               Note:  Some  attributes  might not be supported by all terminal
2564              emulators.
2565
2566       For  example,  if  you  want  directories  to  be  bold  Spring  Green:
2567       di=#00ff7f-1
2568
2569       Finally,  Xterm-like  color  names  are  also  supported.  For example:
2570       ex=DodgerBlue2.
2571
2572       This is the list of color names (as defined by vifm(1)):
2573
2574                0 Black                  86 Aquamarine1           172 Orange3
2575                1 Red                    87 DarkSlateGray2         173  Light‐
2576              Salmon3_2
2577                2  Green                   88 DarkRed_2             174 Light‐
2578              Pink3
2579                3 Yellow                 89 DeepPink4_2           175 Pink3
2580                4 Blue                   90 DarkMagenta           176 Plum3
2581                5 Magenta                91 DarkMagenta_2         177 Violet
2582                6 Cyan                   92 DarkViolet            178 Gold3_2
2583                7 White                  93 Purple                 179  Light‐
2584              Goldenrod3
2585                8 LightBlack             94 Orange4_2             180 Tan
2586                9  LightRed                95 LightPink4            181 Misty‐
2587              Rose3
2588               10 LightGreen             96 Plum4                 182 Thistle3
2589               11 LightYellow            97 MediumPurple3         183 Plum2
2590               12 LightBlue               98  MediumPurple3_2        184  Yel‐
2591              low3_2
2592               13 LightMagenta           99 SlateBlue1            185 Khaki3
2593               14  LightCyan              100 Yellow4               186 Light‐
2594              Goldenrod2
2595               15   LightWhite              101   Wheat4                   187
2596              LightYellow3
2597               16 Grey0                 102 Grey53                188 Grey84
2598               17  NavyBlue               103 LightSlateGrey        189 Light‐
2599              SteelBlue1
2600               18 DarkBlue              104 MediumPurple          190 Yellow2
2601               19 Blue3                 105 LightSlateBlue         191  DarkO‐
2602              liveGreen1
2603               20  Blue3_2                106 Yellow4_2             192 DarkO‐
2604              liveGreen1_2
2605               21 Blue1                 107 DarkOliveGreen3       193 DarkSea‐
2606              Green1_2
2607               22  DarkGreen              108 DarkSeaGreen          194 Honey‐
2608              dew2
2609               23 DeepSkyBlue4          109 LightSkyBlue3          195  Light‐
2610              Cyan1
2611               24 DeepSkyBlue4_2        110 LightSkyBlue3_2       196 Red1
2612               25  DeepSkyBlue4_3         111  SkyBlue2              197 Deep‐
2613              Pink2
2614               26 DodgerBlue3           112  Chartreuse2_2          198  Deep‐
2615              Pink1
2616               27  DodgerBlue2            113  DarkOliveGreen3_2     199 Deep‐
2617              Pink1_2
2618               28  Green4                 114  PaleGreen3_2           200  Ma‐
2619              genta2_2
2620               29 SpringGreen4          115 DarkSeaGreen3         201 Magenta1
2621               30  Turquoise4             116  DarkSlateGray3        202 Oran‐
2622              geRed1
2623               31 DeepSkyBlue3          117  SkyBlue1               203  Indi‐
2624              anRed1
2625               32  DeepSkyBlue3_2         118  Chartreuse1           204 Indi‐
2626              anRed1_2
2627               33 DodgerBlue1           119 LightGreen_2          205 HotPink
2628               34 Green3                 120  LightGreen_3           206  Hot‐
2629              Pink_2
2630               35  SpringGreen3           121 PaleGreen1            207 Mediu‐
2631              mOrchid1_2
2632               36 DarkCyan              122 Aquamarine1_2         208  DarkOr‐
2633              ange
2634               37 LightSeaGreen         123 DarkSlateGray1        209 Salmon1
2635               38 DeepSkyBlue2          124 Red3                  210 LightCo‐
2636              ral
2637               39 DeepSkyBlue1          125 DeepPink4_3           211 PaleVio‐
2638              letRed1
2639               40 Green3_2              126 MediumVioletRed       212 Orchid2
2640               41 SpringGreen3_2        127 Magenta3              213 Orchid1
2641               42 SpringGreen2          128 DarkViolet_2          214 Orange1
2642               43  Cyan3                  129 Purple_2              215 Sandy‐
2643              Brown
2644               44 DarkTurquoise         130 DarkOrange3            216  Light‐
2645              Salmon1
2646               45  Turquoise2             131 IndianRed             217 Light‐
2647              Pink1
2648               46 Green1                132 HotPink3              218 Pink1
2649               47 SpringGreen2_2        133 MediumOrchid3         219 Plum1
2650               48 SpringGreen1          134 MediumOrchid          220 Gold1
2651               49 MediumSpringGreen     135 MediumPurple2          221  Light‐
2652              Goldenrod2_2
2653               50  Cyan2                  136 DarkGoldenrod         222 Light‐
2654              Goldenrod2_3
2655               51 Cyan1                 137  LightSalmon3           223  Nava‐
2656              joWhite1
2657               52  DarkRed                138 RosyBrown             224 Misty‐
2658              Rose1
2659               53 DeepPink4             139 Grey63                225 Thistle1
2660               54 Purple4               140 MediumPurple2_2       226 Yellow1
2661               55 Purple4_2             141 MediumPurple1          227  Light‐
2662              Goldenrod1
2663               56 Purple3               142 Gold3                 228 Khaki1
2664               57 BlueViolet            143 DarkKhaki             229 Wheat1
2665               58  Orange4                144  NavajoWhite3          230 Corn‐
2666              silk1
2667               59 Grey37                145 Grey69                231 Grey100
2668               60 MediumPurple4         146 LightSteelBlue3       232 Grey3
2669               61 SlateBlue3            147 LightSteelBlue        233 Grey7
2670               62 SlateBlue3_2          148 Yellow3               234 Grey11
2671               63 RoyalBlue1            149 DarkOliveGreen3_3     235 Grey15
2672               64 Chartreuse4           150 DarkSeaGreen3_2       236 Grey19
2673               65 DarkSeaGreen4         151 DarkSeaGreen2         237 Grey23
2674               66 PaleTurquoise4        152 LightCyan3            238 Grey27
2675               67 SteelBlue             153 LightSkyBlue1         239 Grey30
2676               68 SteelBlue3            154 GreenYellow           240 Grey35
2677               69 CornflowerBlue        155 DarkOliveGreen2       241 Grey39
2678               70 Chartreuse3           156 PaleGreen1_2          242 Grey42
2679               71 DarkSeaGreen4_2       157 DarkSeaGreen2_2       243 Grey46
2680               72 CadetBlue             158 DarkSeaGreen1         244 Grey50
2681               73 CadetBlue_2           159 PaleTurquoise1        245 Grey54
2682               74 SkyBlue3              160 Red3_2                246 Grey58
2683               75 SteelBlue1            161 DeepPink3             247 Grey62
2684               76 Chartreuse3_2         162 DeepPink3_2           248 Grey66
2685               77 PaleGreen3            163 Magenta3_2            249 Grey70
2686               78 SeaGreen3             164 Magenta3_3            250 Grey74
2687               79 Aquamarine3           165 Magenta2              251 Grey78
2688               80 MediumTurquoise       166 DarkOrange3_2         252 Grey82
2689               81 SteelBlue1_2          167 IndianRed_2           253 Grey85
2690               82 Chartreuse2           168 HotPink3_2            254 Grey89
2691               83 SeaGreen2             169 HotPink2              255 Grey93
2692               84 SeaGreen1             170 Orchid
2693               85 SeaGreen1_2           171 MediumOrchid1
2694
2695       Just as with hex colors, a single attribute can be  appended  to  color
2696       names. For example, SteelBlue1-1 to get the bold version of this color.
2697
2698       Color variables
2699
2700       Up  to 128 custom color variables can be used via the define keyword to
2701       make it easier to build and read theme files. Example:
2702
2703               define RED=00;31
2704               define MY_SPECIAL_COLOR=04;38;2;255;255;0;48;2;0;14;191
2705
2706               FiletpeColors="di=RED:"
2707               InterfaceColors="el=MY_SPECIAL_COLOR:"
2708
2709       These variables can only be used for  FiletypeColors,  InterfaceColors,
2710       ExtColors,  and  DirIconColor. The Prompt line (if using a prompt code)
2711       use full ANSI escape sequences instead.
2712
2713       Though by default clifm uses only 16 colors, you can use 256 and 24-bit
2714       colors as well. For example:
2715
2716               fi=04;38;2;245;76;00;48;2;00;00;255
2717
2718       will  print  regular files underlined and using a bold orange RGB color
2719       on a blue background. In this case, just make sure to  use  a  terminal
2720       emulator  supporting  RGB colors. To test your terminal color capabili‐
2721       ties use the colors.sh script (in the plugins directory).
2722
2723       NOTE: It might happen that, for some reason, you need to force clifm to
2724       use colors despite the value of the TERM variable. The OpenBSD console,
2725       for example, sets TERM to vt220 by default,  which,  according  to  the
2726       terminfo database, does not support color. However, the OpenBSD console
2727       does  actually  support  color.  In  this  case,  you   can   set   the
2728       CLIFM_FORCE_COLOR  to  either true or  1 to use color even if the value
2729       of TERM says otherwise.
2730
2731       To see a colored list of the currently used file color  codes  run  the
2732       colors command.
2733
2734       To  run  colorless use the --no-color command line option or set either
2735       CLIFM_NO_COLOR or NO_COLOR environment variables to any value. For more
2736       information about the no-color initiative see https://no-color.org/
2737
2738       For  a full no-color experience recall to edit your prompt removing all
2739       color codes.
2740
2741       2. THE PROMPT
2742
2743       clifm's prompt (regular and warning ones) is taken from the Prompt line
2744       in  the color scheme file using a prompt name as defined in the prompts
2745       file, for example, Prompt="security-scanner".
2746
2747       Prompts can be customized via the prompt edit command.
2748
2749       Each prompt is built following almost the same escape codes  and  rules
2750       used by the Bash prompt, except that it does not accept shell functions
2751       (like conditionals  and  loops).  Command  substitution  (in  the  form
2752       $(cmd)),  string  literals,  and  escape codes can be used to build the
2753       prompt line and its colors. This is a list of supported escape codes:
2754
2755       \e: Escape character
2756
2757       \s: The name of the shell (everything after the last  slash)  currently
2758       used by clifm
2759
2760       \S:  Current workspace number (or name, if named), colored according to
2761       wsN code in the InterfaceColors section in the color scheme file
2762
2763       \l: Print an ´L´ if in light mode
2764
2765       \P: The current profile name
2766
2767       \u: The username
2768
2769       \H: The full hostname
2770
2771       \h: The hostname, up to the first ´.'.TP
2772              \n: A newline character
2773
2774       \r: A carriage return
2775
2776       \a: A bell character
2777
2778       \d: The date, in abbreviated form (ex: ´Tue May 26´)
2779
2780       \t: The time, in 24-hour HH:MM:SS format
2781
2782       \T: The time, in 12-hour HH:MM:SS format
2783
2784       \@: The time, in 12-hour am/pm format
2785
2786       \A: The time, in 24-hour HH:MM format
2787
2788       \w: The full current working directory, with $HOME abbreviated  with  a
2789       tilde
2790
2791       \W: The basename of $PWD, with $HOME abbreviated with a tilde
2792
2793       \p:  A  mix of the two above, it abbreviates the current working direc‐
2794       tory only if longer than PathMax (a value defined in the  configuration
2795       file).
2796
2797       \z: Exit code of the last executed command (colored according to the xs
2798       (success) and xf (failure) codes in InterfaceColors in the color scheme
2799       file)
2800
2801       \i: The value of CLIFMLVL (number of nested instances of clifm)
2802
2803       \I:  Same as \I, but formatted as "(n)" (nothing is printed if CLIFMLVL
2804       is 1)
2805
2806       \$ ´#´, if the effective user ID is 0, and ´$´ otherwise
2807
2808       \nnn: The character whose ASCII code is the octal value nnn
2809
2810       \\: A literal backslash
2811
2812       \[: Begin a sequence of non-printing characters. This is mostly used to
2813       add color to the prompt line
2814
2815       \]: End a sequence of non-printing characters
2816
2817       The  following  files  statistics escape codes are also recognized (not
2818       available in light mode):
2819
2820       \D: Amount of sub-directories in the current directory
2821
2822       \R: Amount of regular files in the current directory
2823
2824       \X: Amount of executable files in the current directory
2825
2826       \.: Amount of hidden files in the current directory
2827
2828       \U: Amount of SUID files in the current directory
2829
2830       \G: Amount of SGID files in the current directory
2831
2832       \F: Amount of FIFO/pipe files in the current directory
2833
2834       \K: Amount of socket files in the current directory
2835
2836       \B: Amount of block device files in the current directory
2837
2838       \C: Amount of character device files in the current directory
2839
2840       \x: Amount of files with capabilities in the current directory
2841
2842       \L: Amount of symbolic links in the current directory
2843
2844       \o: Amount of broken symbolic links in the current directory
2845
2846       \M: Amount of multi-link files in the current directory
2847
2848       \E: Amount of files with extended attributes in the current directory
2849
2850       \O: Amount of other-writable files in the current directory
2851
2852       \>: Amount of door files in the current directory (Solaris only)
2853
2854       \": Amount of files with the sticky bit set in the current directory
2855
2856       \?: Amount of files of unknown file type in the current directory
2857
2858       \!: Amount of unstatable files in the current directory
2859
2860       Escape codes for prompt notifications (mostly used for  custom  prompts
2861       which  need to handle notifications themselves, in which case Notifica‐
2862       tions should be set to false in the color scheme file to prevent  auto‐
2863       matic insertion of notifications at the left of the prompt):
2864
2865       \*: ´*´ + amount of selected files
2866
2867       \%: ´T´ + amount of trashed files
2868
2869       \#: ´R´ if root user
2870
2871       \): ´W´ + amount of warning messages
2872
2873       \(: ´E´ + amount of error messages
2874
2875       \=: ´N´ + amount of notice messages
2876
2877       Note: Except for '\#', nothing is printed if the number is zero.
2878
2879       By default, for example, clifm's prompt line is this:
2880
2881              "\[\e[0m\][\S\[\e[0m\]]\l                \A                \u:\H
2882              \[\e[00;36m\]\w\n\[\e[0m\]<\z\[\e[0m\]>\[\e[0;34m\]  \$\[\e[0m\]
2883              "
2884
2885
2886       which once decoded should look something like this:
2887
2888               [1] 13:45 user:hostname /my/path
2889               <0> $
2890
2891       with  the  workspace number printed in blue, the path in cyan, the last
2892       exit status in green, and the dollar sign in blue.
2893
2894       A more "classic" prompt could be construed as follows:
2895
2896               "\u@\U \w> "
2897
2898       or, using now command substitution:
2899
2900               "$(whoami)@$(hostname) $(pwd)> "
2901
2902
2903       Advanced prompt customization
2904
2905       Besides commands substitution, which  allows  you  to  include  in  the
2906       prompt  any information you like via shell scripts or simple shell com‐
2907       mands, the use of Unicode characters allows you to build  colorful  and
2908       modern prompts.
2909
2910       Inserting Unicode characters in the prompt can be made in two ways:
2911
2912       a) Pasting the character itself using a text editor
2913
2914       b)  Entering  the  octal  code corresponding to the character. Use hex‐
2915       dump(1) as follows to get the appropriate hex code:
2916
2917               echo -ne "[paste the char here]" | hexdump -c
2918
2919       The first line of the output will be something along these lines:
2920
2921               00000000  256 234 356               |...|
2922
2923       In this case, the octal code is: "256 234 356". So, to insert this Uni‐
2924       code character in the prompt, add it as follows:
2925
2926               Prompt="... \256\234\356 ..."
2927
2928       Note: Make sure you have installed a font able to display Unicode char‐
2929       acters.
2930
2931       A few advanced prompt examples can be found in the prompts file.
2932
2933       A simple use case for the files statistics escape codes
2934
2935       We all want to keep our systems safe. One of the many ways to get a bit
2936       of safety is by checking that there is not file in our file system that
2937       could somehow  endanger  our  machines.  SUID,  SGID,  executable,  and
2938       other-writable  files  are to be count among these dangers. This is why
2939       it could be useful to build a little files scanner for our prompt using
2940       the above mentioned files statistics escape codes. This is the code for
2941       our scanner:
2942
2943               \[\e[0m\]\[\e[1;31m\]\U\[\e[0m\]:\[\e[1;33m\]\G\[\e[0m\]:
2944               \[\e[1;32m\]\O\[\e[0m\]:\[\e[1;34m\]\X\[\e[0m\]"
2945
2946       By adding this code to our prompt line, we get something like this:
2947
2948               24:2:-:2389
2949
2950       This tells us that in the current  directory  we  have  24  SUID  files
2951       (printed  in  bold  red), 2 SGID files (bold yellow), no other-writable
2952       file, and 2389 executable files.
2953
2954       NOTE: A predefined prompt with this files  scanner  integrated  can  be
2955       found in the prompts.clifm file.
2956
2957       NOTE  2:  Most of the information these escape codes rely on depends on
2958       stat(3). Now, since stat(3) is not used when running in light mode (for
2959       performance reasons), this information won´t be available in light mode
2960       either.
2961
2962
2963       Prompt notifications
2964
2965       A bold red ´R´ at the left of the prompt reminds the user that the pro‐
2966       gram is running as root. A bold green asterisk indicates that there are
2967       elements in the Selection Box. In the same way, a yellow 'T' means that
2968       there  are  currently  files  in the trash can, just as a bold blue 'S'
2969       means that the program is running in stealth mode. Finally, clifm makes
2970       use  of  three  kind  of messages: errors (a red ´E´ at the left of the
2971       prompt), warnings (a yellow ´W´), and simple notices (a green ´N´).
2972
2973       If Notifications is set to "false" in the prompts file, the above noti‐
2974       fications won´t be printed by the prompt, but is still available to the
2975       user as escape codes (see above) and environment variables (see the EN‐
2976       VIRONMENT section below) to build custom prompts.
2977
2978       The Warning Prompt
2979
2980       The  suggestions  system  includes a secondary, warning prompt, used to
2981       highlight wrong/invalid/non-existent command  names.  Once  an  invalid
2982       command  is entered, the regular prompt will be switched to the warning
2983       prompt and the whole input line will turn dimmed red (though it can  be
2984       customized to your liking).
2985
2986       The wrong command name check is omitted if the input string:
2987
2988               Is quoted (ex: "string" or ´string´)
2989               Is bracketed (ex: (string), [string], or {string})
2990               It  starts  with a stream redirection character (ex: <string or
2991              >string)
2992               Is a comment (ex: #string)
2993               It starts with one or more spaces
2994               Is an assignment (ex: foo=var)
2995               It is escaped (ex: \string)
2996
2997       The warning prompt could be customized by means of the same rules  used
2998       by the regular prompt. To use a custom warning prompt, modify the Warn‐
2999       ingPrompt line in the prompts file (via the prompt  edit  command).  It
3000       defaults to
3001
3002               "\[\e[0;2;31m\](!) > "
3003
3004       the  last line of the regular prompt will become "(!) > ", printed in a
3005       dimmed red color, including the input string.
3006
3007       To disable this feature use the --no-warning-prompt command line switch
3008       or set the EnableWarningPrompt option to false in the prompts file.
3009
3010       NOTE:  Bear  in mind that the warning prompt depends on the suggestions
3011       system, so that it won´t be available if this system is disabled.
3012
3013
3014       3. THE DIVIDING LINE
3015
3016       The line dividing the current list of files and the prompt. It could be
3017       customized  via the DividingLine option in the color scheme file to fit
3018       your prompt design and/or color scheme.
3019
3020       DividingLine accepts one or more ASCII or Unicode characters  (in  both
3021       cases  you  only  need  to type/paste here the chosen character(s)). If
3022       only one character is specified (by default, "-"), it will  be  repeat‐
3023       edly  printed  to  fulfill the current line up to the right edge of the
3024       screen or terminal window. If you don't want to cover the  whole  line,
3025       specify  three  or more characters, in which case only these characters
3026       (and no more) will be used as dividing line. For  example:  "------->".
3027       To  use an empty line, set DividingLineChar to "0" (that is, as a char‐
3028       acter, not as a number). Finally, is this value is not set,  a  special
3029       line  drawn with box-drawing characters will be used (box-drawing char‐
3030       acters are not supported by all terminal emulators).
3031
3032       The color of this line is set via the dl color code in the color scheme
3033       file. Consult the COLOR CODE section above for more information.
3034
3035       4. FZF WINDOW
3036              Refer to the TAB completion section below.
3037
3038

8. BUILT-IN EXPANSIONS

3040       The SEL keyword
3041
3042       clifm  will automatically expand the sel keyword: sel indeed amounts to
3043       ´file1 file2 file3 ...´ In this way, you can use the sel  keyword  with
3044       any  command.  s: can be used interchangeably (with the difference that
3045       s: can be used as first word, and not only as parameter to  other  com‐
3046       mands).
3047
3048       If  you  want to set the executable bit on several files, for instance,
3049       simply select the files you want and then run this  command:  chmod  +x
3050       sel. Or, if you want to copy or move several files into some directory:
3051       cp sel 12, or mv sel 12 (provided the ELN 12 corresponds  to  a  direc‐
3052       tory), respectively.
3053
3054       If the destiny directory is omitted, selected files are copied into the
3055       current working directory, that is to say, mv sel amounts to mv sel ..
3056
3057       To trash or remove selected files, simply run tr sel or rm sel  respec‐
3058       tively.  The  same goes for wildcards and braces: chmod +x *, for exam‐
3059       ple, will set the executable bit on all files (excluding hidden  files)
3060       in the current working directory, while chmod +x file{1,2,3} will do it
3061       for file1, file2, and file3 respectively.
3062
3063       If using the FZF mode for TAB completion (see below), you  can  operate
3064       only  on  some selected files as follows: type CMD sel and, without ap‐
3065       pending any space char, press TAB: the list of selected files  will  be
3066       displayed.  Choose one or more of them (use TAB to mark entries) to op‐
3067       erate only on those specific files. For  example,  to  print  the  file
3068       properties  of  some  specific  selected  files: p sel->TAB, select the
3069       files you want via TAB, press Enter or Right (marked files will be  in‐
3070       serted in the command line), and the press Enter, as usual.
3071
3072       TAB completion
3073
3074       There  are  four modes for TAB completion: standard (interface provided
3075       by readline),  fzf,  which  depends  on  FZF  (https://github.com/june
3076       gunn/fzf)        (version       0.18.0       or       later),       fnf
3077       (https://github.com/leo-arch/fnf),              and               smenu
3078       (https://github.com/p-gen/smenu).  By  default,  if  the  fzf binary is
3079       found in PATH, clifm will attempt to use fzf  to  display  completions.
3080       You  can  force  the use of the remaining modes via the --stdtab, --fn‐
3081       ftab, and --smenutab command line switches. The  TabCompletionMode  op‐
3082       tion  in  the configuration file can be used to permanently set the TAB
3083       completion mode.
3084
3085       If using the fzf mode, the completions interface can be customized  us‐
3086       ing the FzfTabOptions option in the color scheme file. --height, --mar‐
3087       gin, +i/-i, --read0, --query, and --ansi will be  appended  to  set  up
3088       some  details  of  the completions interface. Set this value to none to
3089       pass no option, to the empty string to load the default values,  or  to
3090       any  other  custom value. Unless set to none, any option specified here
3091       will override FZF_DEFAULT_OPTS.
3092
3093       Default values for this option are:
3094               --color=16,prompt:6,fg+:-1,pointer:4,hl:5,hl+:5,gut‐
3095              ter:-1,marker:2,border:7:dim     --bind     tab:accept,right:ac‐
3096              cept,left:abort,alt-p:toggle-preview --inline-info  --layout=re‐
3097              verse-list --preview-window=wrap,border-left
3098
3099       Consult fzf(1) for more information.
3100
3101       If  set  neither  in FzfTabOptions nor in FZF_DEFAULT_OPTS (in this or‐
3102       der), the height of the FZF window is set to the default value: 40%  of
3103       the current terminal amount of line/rows.
3104
3105       To  use  FZF global values (defined in FZF_DEFAULT_OPTS), set FzfTabOp‐
3106       tions to none.
3107
3108       File previews are available in FZF mode via shotgun.  See  the  SHOTGUN
3109       section above.
3110
3111       Image  previews  (X11 only) are available via the clifmimg plugin. Con‐
3112       sult        the        Wiki        for        more         information:
3113       https://github.com/leo-arch/clifm/wiki/Specifics#tab-comple‐
3114       tion-with-file-previews
3115
3116       If using the smenu mode, the interface  can  be  customized  using  the
3117       CLIFM_SMENU_OPTIONS environment variable. For example:
3118
3119               export  CLIFM_SMENU_OPTIONS="-a  t:2,b  b:4  c:r  ct:2,r sf:6,r
3120              st:5,r mt:5,b"
3121
3122       Consult smenu(1) for more information.
3123
3124       For information about how to customize fnf consult fnf(1).
3125
3126       Clifm can perform fuzzy TAB completion (just as suggestions)  for  file
3127       names  and paths (e.g. "dwn" is completed/suggested as "Downloads"). To
3128       enable this feature use the --fuzzy-matching command line switch or set
3129       FuzzyMatching to true in the configuration file.
3130
3131       Besides the default TAB completion for command names and paths, you can
3132       also expand ELN's using the TAB key. Example: type 'o 12',  press  TAB,
3133       and  it  becomes  'o  filename  ',  or, if 12 refers to a directory, 'o
3134       dir/'. clifm uses a Bash-style quoting system, so that this file  name:
3135       "this  is  a  test@version{1}"  is  expanded  as  follows: this\ is\ a\
3136       test\@version\{1\}
3137
3138       ELN's and ELN ranges will be also automatically expanded, provided  the
3139       corresponding  ELN's actually exist, that is to say, provided some file
3140       name is listed on the screen under those numbers. For example: 'diff  1
3141       118'  will  only  expand '1', but not '118', if there is no ELN 118. In
3142       the same way, the range 1-118 will only be expanded provided there  are
3143       118 or more elements listed on the screen.
3144
3145       Since ranges could be a bit tricky, TAB completion is available to make
3146       sure this range actually includes the desired file names.
3147
3148       If this feature somehow conflicts with the command  you  want  to  run,
3149       say,  'chmod  644 ...', because the current amount of files is equal or
3150       larger than 644 (in which case clifm will expand that number), then you
3151       can simply run the command as external: ';chmod 644 ...'
3152
3153       TAB  completion  for commands, paths, users home directory, workspaces,
3154       wildcards*, file types*, environment  variables,  bookmarks,  profiles,
3155       color  schemes, file tags, commands history, directory history (via the
3156       jump command), remote resources, sort methods, ranges*, the 'sel'  key‐
3157       word*,  trashed  files*,  plus the deselect* and the open-with commands
3158       (ow) is also available. To make use of the bookmarks  completion,  make
3159       sure  to  specify  some  name for your bookmarks, since these names are
3160       used by the completion function.
3161
3162       * When using FZF mode for TAB completion, multi-selection is available:
3163       Press  TAB  to expand possible selections, then press TAB again to mark
3164       desired entries. Once desired entries are marked, press  Enter  or  the
3165       Right arrow key: marked entries will be inserted into the command line.
3166       Multi-selection is also available for the following commands,  provided
3167       there  is  no  slash  in  the  query  string:  ac,  ad,  bb, br, d/dup,
3168       p/pr/prop, r, s, t/tr/trash, and te.
3169
3170       Of course, combinations of all these features is also  possible.  Exam‐
3171       ple:  cp  sel  file*  2  23-31 . will copy all selected files, plus all
3172       files whose name starts with "file", plus those files corresponding  to
3173       the ELN´s 2, and 23 to 31, into the current working directory.
3174
3175       In  addition  to completions and expansions, an auto-suggestions system
3176       is also available. See the AUTO-SUGGESTIONS section below.
3177
3178

9. RESOURCE OPENER

3180       As clifm´s built-in resource opener, Lira takes care of  opening  files
3181       when  no opening application has been specified in the command line. It
3182       does this by automatically parsing a MIME list file (see the FILES sec‐
3183       tion  below): it looks first for a matching pattern (either a MIME type
3184       or a file name), then checks the existence of the command associated to
3185       this pattern, and finally executes it.
3186
3187       Lira  is  controlled via the mime command. File associations are stored
3188       in the MIME list file.
3189
3190       When running for the first time, or whenever the MIME list file  cannot
3191       be  found,  clifm  will copy the MIME definitions file from the DATADIR
3192       directory (usually /usr/share/clifm/mimelist.clifm) to the  local  con‐
3193       figuration directory.
3194
3195       Lira will check the file line by line, and if a matching line is found,
3196       and if at least one of the specified applications exists, this applica‐
3197       tion  will be used to open the corresponding associated file. Else, the
3198       next line will be checked. In other words, the precedence order is  top
3199       to bottom (for lines) and left to right (for applications).
3200
3201       NOTE:  In case of directories (whose MIME type is inode/directory), the
3202       entry will be used only for the open-with command (ow).
3203
3204       This MIME list file follows a few simple syntax rules:
3205
3206       Each line in the MIME list file consists of:
3207
3208       a) ´X´ or ´!X´ to specify GUI and non-GUI environments respectively;
3209
3210       b) ´N´ to instruct Lira to match a file name instead of a MIME type;
3211
3212       c) A left value, containing either a file name or a  MIME  type  to  be
3213       matched. Regular expressions are supported;
3214
3215       d)  A  right value, a list of semicolon separated commands (and option‐
3216       ally the commands parameters) to be  associated  to  the  corresponding
3217       left value;
3218
3219       Note that the syntax departs here from the Freedesktop specification in
3220       that we do not rely on desktop files (mostly used by  desktop  environ‐
3221       ments),  but  rather  on  commands and parameters. In general thus, the
3222       syntax is this:
3223
3224               [!]X[:N]:REGEX=CMD [ARGS] [%f];CMD [ARGS] [%f]; ...
3225
3226       Use the %f placeholder to specify the position of the file name  to  be
3227       opened  in  the  command.  For  example, ´mpv %f --terminal=no´ will be
3228       translated into ´mpv FILE --terminal=no´. If  the  placeholder  is  not
3229       specified,  the  file  name  will  be appended to command string. Thus,
3230       this: ´mpv --terminal=no´ amounts to this: ´mpv --terminal=no FILE´.
3231
3232       Running the opening application in the background:
3233
3234       For GUI applications:
3235
3236               APP %f &>/dev/null &
3237
3238       For terminal applications:
3239
3240               TERM -e APP %f &>/dev/null &
3241
3242       Replace ´TERM´ and ´APP´ by the corresponding  values.  The  -e  option
3243       might vary depending on the terminal emulator used (TERM).
3244
3245       NOTE:  In  case  of  archives, the built-in ad command could be used as
3246       opening application.
3247
3248       NOTE 2: Environment variables (e.g.  $EDITOR,  $VISUAL,  $BROWSER,  and
3249       even $PAGER) are also recognized by Lira. You can even set custom envi‐
3250       ronment variables to be used exclusively by clifm. For example, you can
3251       set  CLIFM_TERM,  CLIFM_EDITOR, and CLIFM_PDF, and then use them to de‐
3252       fine some associations:
3253
3254               X:text/plain=$CLIFM_TERM -e $CLIFM_EDITOR %f &
3255               X:N:.*\.pdf$=$CLIFM_PDF %f &
3256
3257       Examples:
3258
3259       Match a full file name:
3260
3261               X:N:some_filename:leafpad;mousepad;kate;gedit
3262
3263       Note: the ´N´ character indicates that this rule is intended to match a
3264       file  name  instead of a MIME type, just as ´X´ means that this rule is
3265       aimed at graphical environments and ´!X´ that it  is  aimed  rather  to
3266       non-graphical environments.
3267
3268       Note 2: If the file name contains a dot, quote it like this: some_file‐
3269       name.ext (to prevent the REGEX parser from interpreting the dot)
3270
3271       Match multiple file names (starting with "str"):
3272
3273               X:N:^str.*:leafpad;mousepad;kate;gedit
3274
3275       Match a single extension:
3276
3277               X:N:.*\.txt$:leafpad;mousepad;kate;gedit
3278               !X:N:.*\.^txt$:nano;vim;vi;emacs
3279
3280       Match multiple extensions:
3281
3282        X:N:.*\.(sh|c|py|pl)$:geany;leafpad;nano
3283
3284       Match single mimetype:
3285
3286               X:^audio/mp3$=mpv   %f   --terminal=no;ffplay   -nodisp    -au‐
3287              toexit;mpv;mplayer
3288
3289       Match mutiple mimetypes:
3290
3291               X:^audio/.*=mplayer;mplayer2;vlc;gmplayer;smplayer;totem
3292
3293       In case of MIME types, you can also write the entire expression without
3294       relying on any regular expression. For example:
3295
3296               !X:text/plain=$TERM -e $EDITOR %f &>/dev/null &
3297
3298       For more information take a look at the mimelist file itself (F6 or  mm
3299       edit).
3300
3301       Using a third-party opener
3302
3303       Set  the Opener option in the configuration file to the desired opener,
3304       e.g. "Opener=xdg-open".
3305
3306       Using clifm as a standalone resource opener
3307
3308       Thought clifm is a file manager, it can be used as  a  simple  resource
3309       opener via the --open command line option. For example:
3310
3311               clifm --open /path/to/my_file.jpg
3312               clifm --open /path/to/my_dir
3313               clifm --open https://some_domain
3314
3315       Note: When opening web resources clifm will query the mimelist file us‐
3316       ing text/html as MIME type. Whatever association it finds for this spe‐
3317       cific MIME type will be used to open the web resource.
3318
3319       Positional  parameters  could  be  used as well, provided the parameter
3320       does not point to a directory name, in which case it will  be  used  as
3321       clifm starting path. For instance:
3322
3323               clifm /path/to/my_file.jpg
3324               clifm https://some_domain
3325
3326

10. SHOTGUN

3328       1. TAB completion with file previews
3329
3330       Shotgun  is  clifm´s built-in files previewer. Though, as described be‐
3331       low, it may be used as a standalone and general purpose file  previewer
3332       (similar in this regard to pistol(1)), it is mainly intended to be used
3333       by clifm's TAB completion function running in FZF mode: every time  TAB
3334       completion is invoked for files, shotgun will be executed with the cur‐
3335       rently highlighted file as argument (as shown below)  to  generate  the
3336       preview.  Set  the FzfPreview option in the configuration file to false
3337       (or run with --no-fzfpreview) to disable this feature.
3338
3339       Shotgun is also used by the view command to display  file  previews  in
3340       full screen.
3341
3342       2. Running as a standalone files previewer
3343
3344       Executed  via  the --preview command line switch, shotgun performs file
3345       preview for any file passed as argument. For example:
3346
3347                      clifm --preview myfile.txt
3348
3349       This command generates a preview of the file myfile.txt and immediately
3350       afterwards quits  clifm.
3351
3352       3. Customization
3353
3354       Previewing  applications  (based  on either MIME type or file name) are
3355       defined in a configuration  file  ($XDG_CONFIG_HOME/clifm/profiles/PRO‐
3356       FILE/preview.clifm)  using  the  same syntax used by Lira (the built-in
3357       resource opener). See the RESOURCE OPENER section above.
3358
3359       You can set an alternative configuration file  via  the  --shotgun-file
3360       command line switch:
3361
3362               clifm --shotgun-file=/path/to/shotgun/config/file --preview=my‐
3363              file.txt
3364
3365       To customize the appearance of  the  preview  window,  use  the  --pre‐
3366       view-window  option  in  the  FzfTabOptions  line  in the current color
3367       scheme file. For example, if you want the preview window down the files
3368       list (instead of to the right):
3369
3370               --preview-window=down
3371
3372       Default keybindings for the preview window:
3373
3374               Alt-p: Toggle the preview window on/off
3375               Ctrl-Up / Shift-Up: Scroll the preview window up one line
3376               Ctrl-Down / Shift-Down: Scroll the preview window down one line
3377               Alt-Up: Scroll the preview window up one page
3378               Alt-Down: Scroll the preview window down one page
3379
3380       Keybindings  can be customized using the --bind option in the FzfTabOp‐
3381       tions field in the color scheme file.
3382
3383       Consult fzf(1) for more information.
3384
3385       4. Image previews
3386
3387       Image previews are available via the clifmimg plugin. Consult the  Wiki
3388       for   more   information:   https://github.com/leo-arch/clifm/tree/mas
3389       ter/misc/tools/imgprev
3390
3391

11. AUTO-SUGGESTIONS

3393       Gemini is a built-in suggestions system (similar to  that  provided  by
3394       the  Fish shell). As you type, Gemini will suggest possible completions
3395       right after the current cursor position.
3396
3397       The following checks are availabe (the order can be customized, see be‐
3398       low):
3399
3400       a. ELN´s
3401
3402       b. clifm commands and parameters (including the sel keyword)
3403
3404       c. Entries in the command history list (already used commands)
3405
3406       d. File names in the current working directory and paths (1)
3407
3408       e. Entries in the jump database
3409
3410       f. Aliases names
3411
3412       g. Bookmarks names
3413
3414       h. Program names in PATH
3415
3416       i. Shell builtins (2)
3417
3418       (1)  Fuzzy suggestions are supported. For example: dwn > Downloads. En‐
3419       able this feature via the --fuzzy-marching command line switch or  set‐
3420       ting FuzzyMatching to true in the configuration file.
3421       (2) The shell name is taken from /bin/sh. The following shells are sup‐
3422       ported: bash, dash, fish, ksh, tcsh, and zsh. Command names are checked
3423       in  the following order: clifm internal commands, commands in PATH, and
3424       shell builtins.
3425
3426       Note: By default, a brief description for  internal  commands  is  sug‐
3427       gested.  You  can disable this feature via the SuggestCmdDesc option in
3428       the configuration file.
3429
3430       To accept the entire suggestion press Right or Ctrl-f: the cursor  will
3431       move  to the end of the suggested command and the suggestion color will
3432       change to that of the typed text; next, you can press Enter to  execute
3433       the  command as usual. Otherwise, if the suggestion is not accepted, it
3434       will be simply ignored and you can continue editing the current command
3435       line however you want.
3436
3437       To  accept  the first suggested word only (up to first slash or space),
3438       press rather Alt-Right or Alt-f. Not available for ELN´s,  aliases  and
3439       bookmarks names.
3440
3441       Bear  in mind that suggestions for ELN´s, aliases, bookmarks names, the
3442       jump function (invoked by the j command), just as file names and  paths
3443       (if fuzzy-suggestions are enabled) do not work as the remaining sugges‐
3444       tions: they do not suggest possible completions for the current  input,
3445       but  rather  the  value pointed to by it. For example, if you type "12"
3446       and the current list of files includes a file name whose ELN  is  '12',
3447       the file name corresponding to this ELN will be printed next to "12" as
3448       follows: 12_ > filename (where the underscore is the current cursor po‐
3449       sition).  Press Right or Ctrl-f to accept the suggestion, in which case
3450       the text typed so far will be replaced by the suggestion.
3451
3452       The order of the suggestion checks could be customized via the  Sugges‐
3453       tionStrategy option in the configuration file. Each check is assigned a
3454       lowercase letter:
3455
3456        a = Aliases names
3457        b = Bookmark names
3458        c = Possible completions
3459        e = ELN's
3460        f = Files in the current directory
3461        h = Entries in the commands history
3462        j = Entries in the jump database
3463
3464       The value taken by SuggestionStrategy is a string of seven (7)  charac‐
3465       ters  containing  the  above  letters. The letters order in this string
3466       specifies the order in which the suggestion checks will  be  performed.
3467       For  example,  to perform all checks in the same order above, the value
3468       of the string should be abcefhj (without quotes). Or, if you prefer  to
3469       run  the  history  check first: habcefj. Finally, you can ignore one or
3470       more checks using a dash (-). So, to ignore the bookmarks  and  aliases
3471       checks,  set  SuggestionStrategy to h--cefj. The default value for this
3472       option is ehfjbac.
3473
3474       Note: The check for program names in PATH is always executed  at  last,
3475       except when the ExternalCommands option is disabled, in which case sug‐
3476       gestions for them are simply not displayed.
3477
3478       Suggestions will be printed using one of the following color codes (see
3479       the COLOR CODES section above):
3480
3481       sf:  Used  for  file and directory names. This includes suggestions for
3482       ELN´s, bookmarks names, files in the current  directory,  and  possible
3483       completions. Default value: 02;04;36 (dimmed underlined cyan)
3484
3485       sh:  Used  for  entries  in  the commands history. Default value: 02;35
3486       (dimmed magenta)
3487
3488       sc: Used for aliases and program names in PATH.  Default  value:  02;31
3489       (dimmed red)
3490
3491       sx:  Used  for  clifm  internal commands and parameters. Default value:
3492       02;32 (dimmed green)
3493
3494       sp: Greater-than sign (>) used when suggesting  ELN´s,  bookmarks,  and
3495       aliases names. Default value: 02;31 (dimmed red)
3496
3497       You  can  set SuggestFiletypeColor to true in the configuration file to
3498       use the color of the file type of the current file name (as set in  the
3499       color  scheme  file) instead of the value of sf. For example, if a sug‐
3500       gestion is printed for a file that is a symbolic link, ln or or  (if  a
3501       broken link) will be used instead of sf.
3502
3503

12. SHELL FUNCTIONS

3505       clifm  includes  a  few  shell  functions  to  perform specific actions
3506       (cd-on-quit, file-picker, and subshell-notice). Take a look at the cor‐
3507       responding  files,  in  /usr/share/clifm/functions,  and follow the in‐
3508       structions. Needles to say, you can write your own functions.
3509
3510

13. PLUGINS

3512       Plugins are just scripts or programs (written in any language) intended
3513       to  add,  extend or improve clifm´s functionalities. They are linked to
3514       actions names defined  in  a  dedicated  configuration  file  (XDG_CON‐
3515       FIG_HOME/clifm/profiles/PROFILE/actions.clifm).
3516
3517       Note:  In  stealth mode, since access to configuration files is not al‐
3518       lowed, plugins are disabled.
3519
3520       To list available actions and the plugins they are linked to,  run  ac‐
3521       tions.
3522
3523       To  execute  a  given plugin, enter the corresponding action name (plus
3524       parameters if requiered).
3525
3526       To get information about a specific plugin, enter the action name  fol‐
3527       lowed by --help.
3528
3529       Though  several plugins are provided at installation time (in the plug‐
3530       ins directory), you can write your owns as you like, with any  language
3531       you  like, and for whatever goal you want. Writing plugins is generally
3532       quite easy; but your mileage may vary depending on what you are  trying
3533       to  achieve. A good place to start is examining the provide plugins and
3534       reading the actions command description, and the ENVIRONMENT and  FILES
3535       sections below.
3536
3537       A  convenient helper script is provided to get a consistent look across
3538       all plugins, specially those running FZF. This helper script is located
3539       in  DATADIR/clifm/plugins/plugins-helper,  but it will be overridden by
3540       XDG_CONFIG_HOME/clifm/plugins/plugins-helper if found. The location  of
3541       this  file  is set by clifm itself in the CLIFM_PLUGINS_HELPER environ‐
3542       ment variable to be used by plugins. Source the file and use any of the
3543       functions and variables provided by it to write a new FZF plugin:
3544
3545           # Source our plugins helper
3546           if [ -z "$CLIFM_PLUGINS_HELPER" ] || ! [ -f "$CLIFM_PLUGINS_HELPER"
3547       ]; then
3548               printf "clifm: Unable to find plugins-helper file\n" >&2
3549               exit 1
3550           fi
3551           # shellcheck source=/dev/null
3552           . "$CLIFM_PLUGINS_HELPER"
3553
3554       Plugins can talk to clifm via a dedicated pipe created for this purpose
3555       and  exposed via an environment variable (CLIFM_BUS). Write to the pipe
3556       and clifm will hear  and  handle  the  message  immediately  after  the
3557       plugin's  execution.  If the message is a path, clifm will run the open
3558       function, changing the current directory to the new path, if  a  direc‐
3559       tory,  or opening it with the resource opener, if a file. Otherwise, if
3560       the message is not a path, it will be taken and executed as a  command.
3561       Examples:
3562
3563           ´echo  "/tmp" > "$CLIFM_BUS"´ tells clifm to change the current di‐
3564       rectory to /tmp
3565
3566           ´echo "s *.png" > "$CLIFM_BUS"´ makes clifm select all files in the
3567       current directory ending with ".png"
3568
3569       The  pipe (CLIFM_BUS) is deleted immediately after the execution of its
3570       content and recreated before running any other plugin.
3571
3572       This is a list of available plugins:
3573
3574       ┌────────────────────┬──────────────────────────────────────────┬────────────────────────────────┐
3575Action name         Description                              Dependencies                   
3576       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3577       │bn                  │ Create files in batch                    │ -                              │
3578       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3579       │bcp                 │ Copy files in batch                      │ -                              │
3580       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3581       │bmi                 │ Import bookmarks                         │ -                              │
3582       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3583       │clip                │ Interact with the system clipboard       │ (1)                            │
3584       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3585unset               │ Test terminal´s colors capability        │ (2)                            │
3586       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3587       │cr                  │ Copy files to a remote location          │ fzf, and scp, ffsend, or croc  │
3588       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3589       │da                  │ Disk usage analyzer                      │ du, fzf                        │
3590       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3591       │dr                  │ Drag and drop files                      │ dragon or dragon-drag-and-drop │
3592       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3593       │fdups               │ Find/remove file dups                    │ (3)                            │
3594       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3595       │+                   │ Find files in the current directory      │ fzf or rofi                    │
3596       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3597       │_ (underscore)      │ Quickly change directory                 │ fzf                            │
3598       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3599       │h                   │ Browse the commands history              │ fzf                            │
3600       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3601       │-  (yes,   just   a │ Navigate/select/preview files            │ See section below              │
3602       │dash)               │                                          │                                │
3603       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3604       │*                   │ Select files (includes flat view)        │ fzf, find                      │
3605       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3606       │**                  │ Deselect files                           │ fzf                            │
3607       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3608unset               │ Show git repo status                     │ git (4)                        │
3609       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3610       │ih                  │ Browse clifm's manpage                   │ fzf                            │
3611       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3612       │i                   │ Image thumbnails previewer               │ sxiv, feh or lsix              │
3613       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3614       │++                  │ Jump to a directory in the jump database │ fzf or rofi                    │
3615       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3616       │kbgen               │ Get escape codes for keybindings         │ (5)                            │
3617       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3618       │kd                  │ Decrypt a GnuPG encrypted file           │ gpg, tar, sed, grep            │
3619       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3620       │ke                  │ Encrypt files/dirs using GnuPG           │ gpg, tar, sed, fzf, awk, xargs │
3621       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3622       │ml                  │ List files by a given MIME type          │ fzf, file                      │
3623       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3624       │music               │ Create a music playlist                  │ mplayer                        │
3625       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3626       │gg                  │ Pipe files in CWD through a pager        │ less, column                   │
3627       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3628       │ptot                │ Preview PDF files as text                │ pdftotext                      │
3629       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3630       │rrm                 │ Recursively remove files                 │ find, fzf                      │
3631       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3632       │//                  │ Search files by content                  │ fzf, ripgrep                   │
3633       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3634unset               │ Update plugins                           │ (6)                            │
3635       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3636       │vid                 │ Preview video files thumbnails           │ ffmpegthumbnailer              │
3637       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3638       │vt                  │ Virtual directory for sets of files      │ sed                            │
3639       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3640       │wall                │ Set image as wallpaper                   │ (7)                            │
3641       ├────────────────────┼──────────────────────────────────────────┼────────────────────────────────┤
3642       │Ctrl-y              │ Copy the line buffer to the clipboard    │ (8)                            │
3643       └────────────────────┴──────────────────────────────────────────┴────────────────────────────────┘
3644
3645       (1)   xclip  or  xsel  (Xorg),  wl-copy/wl-paste  (Wayland),  clipboard
3646       (Haiku), clip (Cygwin), pbcopy/pbget (MacOS), termux-clipboard-get/ter‐
3647       mux-clipboard-set         (Termux),         cb         (cross-platform:
3648       https://github.com/Slackadays/Clipboard)
3649
3650       (2) colors.sh (by default unset)
3651
3652       (3) find, md5sum, sort, uniq, xargs, sed, stat
3653
3654       (4) The git_status.sh plugin is not intended to be  used  as  a  normal
3655       plugin, that is, executed via an action name, but rather to be executed
3656       as a prompt command  (it  will  be  executed  immediately  before  each
3657       prompt). Add this line to the main configuration file:
3658
3659        promptcmd /usr/share/clifm/plugins/git_status.sh
3660
3661       Whereas  this plugin provides basic Git integration, it could be easily
3662       modified (it is just a few lines long) to include whatever git function
3663       you might need.
3664
3665       (5) It needs to be compiled first: gcc -o kbgen kbgen.c -lcurses
3666
3667       (6) update.sh (by default unset)
3668
3669       (7) feh, xloadimage, hsetroot, or nitrogen (for X); swww or swaybg (for
3670       Wayland)
3671
3672       (8)  Dependencies:  cb,  wl-copy,  xclip,  xsel,  pbcopy,  termux-clip‐
3673       board-set,   clipboard,   or  clip.  Consult  the  plugin  file  itself
3674       (xclip.sh) for more information
3675
3676       Dependencies of the previewer plugin (fzfnav.sh)
3677
3678         archives: atool, bsdtar, or tar
3679         images: kitty terminal, imagemagick, and ueberzug or viu or catimg or
3680       img2txt or pixterm
3681         fonts: fontpreview or fontforge
3682         docs: libreoffice, catdoc, odt2txt, pandoc
3683         PDF: pdftoppm, pdftotext or mutool
3684         epub: epub-thumbnailer
3685         DjVu: djvulibre or djvutxt
3686         postscript: ghostscript
3687         videos: ffmpegthumbnailer
3688         audio: ffmpeg, mplayer, or mpv
3689         web: w3m, links, elinks, or pandoc
3690         markdown: glow
3691         highlight: bat, highlight, or pygmentize
3692         torrent: transmission-cli
3693         json: python or pq
3694         file info: exiftool, mediainfo, or file
3695
3696
3697       To  run  the  pager.sh  plugin, for example, you only need to enter the
3698       corresponding action name, in this case gg. In case of need, all  plug‐
3699       ins provide a -h,--help switch for a brief usage description.
3700
3701       Note: The fzfnav plugin uses fzf(1) to navigate the file system and BFG
3702       (a script located in the plugins directory) to show previews  (to  dis‐
3703       play  image previews BFG requires ueberzug(1) or the Kitty protocol via
3704       the Kitty terminal). A configuration file (BFG.cfg, in the plugins  di‐
3705       rectory itself) is provided to customize the previewer's behavior.
3706
3707       Note 2: An alternative files previewing function (built-in, and thereby
3708       faster than BFG) is provided by shotgun. See the SHOTGUN section  above
3709       for more information.
3710
3711       In  addition  to the built-in BFG previewer, fzfnav supports the use of
3712       both Ranger´s scope.sh script and pistol(1). To use scope, edit the BFG
3713       configuration file and set USE_SCOPE to 1 and SCOPE_FILE to the correct
3714       path to the scope.sh file (normally $HOME/.config/ranger/scope.sh).  To
3715       use pistol instead, set USE_PISTOL to 1.
3716
3717
3718       Take     a     look    at    the    Wiki    for    more    information:
3719       https://github.com/clifm/wiki/Advanced#plugins
3720
3721

14. AUTOCOMMANDS

3723       Heavily inspired by Vifm, the autocommands function allows the  user  a
3724       fine-grained control over clifm settings. It is mostly devised as a way
3725       to improve performance for remote file systems (usually slower than lo‐
3726       cal  ones)  by  allowing  you to turn off some features (like the files
3727       counter) that might greatly affect performance under some circumstances
3728       (like  remote  connections).  However, the autocommands function is not
3729       restricted to this specific use case: use it for whatever  purpose  you
3730       find useful.
3731
3732       Add a line preceded by the autocmd keyword to the config file. The gen‐
3733       eral syntax is:
3734        autocmd TARGET cmd,cmd,cmd
3735
3736       TARGET specifies the object to which subsequent commands will apply. It
3737       can match either directory names (paths) or workspaces.
3738
3739       1.  To match directory names use a glob pattern. If no glob metacharac‐
3740       ter is provided, the string will be compared as is to the current work‐
3741       ing  directory. To invert the meaning of a pattern, prepend an exclama‐
3742       tion mark. To match all directories under a specific directory (includ‐
3743       ing  this  directory  itself) use the double asterisk (**). A few exam‐
3744       ples:
3745
3746        ~/Downloads      Match exactly the Downloads directory (and only  this
3747       directory) in your home directory
3748        ~/Downloads/*     Match  all  subdirectories in ~/Downloads (excluding
3749       the Downloads directory itself)
3750        /~/Downloads/**  Recursively match all subdirectories  in  ~/Downloads
3751       (including the Downloads directory itself)
3752        ~/Downloads/*.d   Match  all subdirectories in ~/Downloads ending with
3753       ".d" (excluding the Downloads directory itself)
3754        !~/Downloads     Match everything except the ~/Downloads directory
3755
3756       2. TARGET is also able to match workspaces using the ampersand  charac‐
3757       ter  (@)  followed by the ws keyword and then the workspace number. For
3758       example, to match the third workspace: @ws3, and  to  match  the  first
3759       workspace: @ws1.
3760
3761       TARGET is followed by a comma separated list of commands:
3762
3763       !CMD: The exclamation mark allows you to run shell commands, custom bi‐
3764       naries or scripts
3765
3766       The following codes are used to control clifm's files list:
3767
3768        Code   Description           Example
3769        cs     Color scheme          cs=zenburn
3770        fc     Files counter         fc=0
3771        hf     Hidden files          hf=0
3772        lm     Light mode            lm=1
3773        lv     Long/detail view      lv=0
3774        mf     Max files             mf=100
3775        mn     Max file name length  mn=20
3776        od     Only directories      od=1
3777        pg     Pager                 pg=0
3778        st     Sort method           st=5
3779        sr     Reverse sort          sr=1
3780
3781       A few example lines:
3782
3783        1. Run in light mode and disable the files counter for the remotes di‐
3784       rectory:(1)
3785           autocmd /media/remotes/** lm=1,fc=0
3786
3787        2. Just a friendly reminder:
3788           autcomd  ~/important  !printf  "Important:  keep your fingers outta
3789       here!\n" && read -n1
3790
3791        3. This directory has thousands of files. Show only the first  hundred
3792       and enable the pager:
3793           autocmd /usr/bin mf=100,pg=1
3794
3795        4.  Lots of media files (with large file names). Trim file names to 20
3796       chars max and  run the files previewer:(2)
3797           autocmd ~/Downloads mn=20,!~/.config/clifm/plugins/fzfnav.sh
3798
3799        5. I want the second workspace, no matter what the  current  directory
3800       is, to list files in long/detail view:
3801           autocmd @ws2 lv=1
3802
3803        6. Mmm, just because I can. Be creative!
3804           autocmd /home/user hf=0,cs=nord,lv=1
3805           autocmd / lv=1,fc=0,cs=solarized,st=5
3806
3807       (1) This is the recommended configuration for remote file systems
3808       (2)  As seen here, plugins could be used as well: in this case, we want
3809       to run fzfnav (to make use of the files preview capability) whenever we
3810       enter  into  the Downloads directory, usually containing videos, music,
3811       and images.  NOTE: If you decide to use a plugin, bear in mind that  it
3812       won´t  be able to communicate with clifm, because the autocommand func‐
3813       tion always executes commands as external applications using the system
3814       shell.
3815
3816       Bear  in mind that autocmd directives are evaluated from top to bottom,
3817       so that only the first matching target will be executed.  This  can  be
3818       used  to exclude some target from a subsequent directive. For instance,
3819       if you want all subdirectories in  ~/Downloads,  except  mydir,  to  be
3820       listed in light mode, write the following directives:
3821
3822           autocmd ~/Downloads/mydir/** lm=0
3823           autocmd ~/Downloads/** lm=1
3824
3825       Since the first directive is evaluated before the second one, this lat‐
3826       ter will apply to everything under Downloads, exception made  of  mydir
3827       (and subdirectories).
3828
3829       Autocommand files: .cfm.in and .cfm.out
3830
3831       Two  files  are  specifically  checked  by  the  autocommands function:
3832       .cfm.in and .cfm.out.
3833
3834       The content of these files is a single instruction, either a shell com‐
3835       mand  or,  if  you  need more elaborated stuff, a script (or custom bi‐
3836       nary). Note that codes to modify clifm's settings (as described  above)
3837       are not available here.
3838
3839       If  a  directory contains a file named .cfm.in, clifm will execute (via
3840       the system shell) its content  when  entering  this  directory  (before
3841       listing  files). If the file is named rather .cfm.out, its content will
3842       be executed immediately after leaving this directory (and before  list‐
3843       ing the new directory's content).
3844
3845       For  example,  if  you want a simple notification whenever you enter or
3846       leave your home directory, create both .cfm.in and  .cfm.out  files  in
3847       the home directory with the following content:
3848
3849       For .cfm.in:
3850          printf "Entering %s ...\n" "$PWD"
3851
3852       For .cfm.out:
3853          printf "Leaving %s ...\n" "$OLDPWD"
3854
3855

15. FILE TAGS

3857       Etiqueta is clifm's built-in files tagging system
3858
3859       1. How does Etiqueta work?
3860
3861       File tags are created via symlinks using a specific directory under the
3862       user's    profile:     ${XDG_CONFIG_DIR:-/home/USER/.config}/clifm/pro‐
3863       files/USER/tags
3864
3865       Every  time  a new tag is created, a new directory named as the tag it‐
3866       self is created in the tags directory. Tagged files are  just  symbolic
3867       links to the actual files created in the appropriate directory. For ex‐
3868       ample, if you tag ~/myfile.txt  as  work,  a  symbolic  link  to  ~/my‐
3869       file.txt, named myfile.txt will be created in tags/work.
3870
3871       2. Handling file tags
3872
3873       tag  is  the main Etiqueta command and is used to handle file tags. Its
3874       syntax is as follows:
3875
3876        tag [add, del, list, list-full, new, merge, rename,  untag]  [FILE]...
3877       [[:]TAG]
3878
3879       NOTE:  The  :TAG notation is used for commands taking both file and tag
3880       names: 'tag add FILES(s) :TAG ...', to tag files, and 'tag  untag  :TAG
3881       file1 file2', to untag files. Otherwise, TAG is used (without the lead‐
3882       ing colon). For example: 'tag new docs', to  create  a  new  tag  named
3883       docs, or 'tag del png', to delete the tag named png.
3884
3885       Both short and long command format can be used:
3886
3887
3888
3889       ┌─────────────┬─────────────┬───────────────────────────┐
3890Short format Long format Description               
3891       ├─────────────┼─────────────┼───────────────────────────┤
3892       │ta           │ tag add     │ Tag files                 │
3893       ├─────────────┼─────────────┼───────────────────────────┤
3894       │td           │ tag del     │ Delete tag(s)             │
3895       ├─────────────┼─────────────┼───────────────────────────┤
3896       │tl           │ tag list    │ List tags or tagged files │
3897       ├─────────────┼─────────────┼───────────────────────────┤
3898       │tm           │ tag rename  │ Rename tags               │
3899       ├─────────────┼─────────────┼───────────────────────────┤
3900       │tn           │ tag new     │ Create new tag(s)         │
3901       ├─────────────┼─────────────┼───────────────────────────┤
3902       │tu           │ tag untag   │ Untag file(s)             │
3903       ├─────────────┼─────────────┼───────────────────────────┤
3904       │ty           │ tag merge   │ Merge two tags            │
3905       └─────────────┴─────────────┴───────────────────────────┘
3906
3907       3. Usage examples
3908
3909
3910
3911       ┌────────────────────┬────────────────────────────┬──────────────────────────────────────────────┐
3912Short format        Long format                Description                                  
3913       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3914       │tl                  │ tag list                   │ List available tags                          │
3915       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3916       │-                   │ tag list-full              │ List available tags and all tagged files     │
3917       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3918       │tl work             │ tag list work              │ List all files tagged as work
3919       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3920       │tl file.txt         │ tag list file.txt          │ List tags applied to the file file.txt
3921       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3922       │tn dogs cats        │ tag new dogs cats          │ Create two empty tags: dogs and cats
3923       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3924       │ta   *.png  :images │ tag add *.png :images :png │ Tag PNG files as both images and png (1) (2) │
3925       │:png                │                            │                                              │
3926       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3927       │ta sel :special     │ tag add sel :special       │ Tag all selected files as special
3928       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3929       │tr documents docs   │ tag rename documents docs  │ Rename the tag documents as docs
3930       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3931       │ty png images       │ tag merge png images       │ Merge the tag png into images (3)            │
3932       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3933       │td images           │ tag del images             │ Remove the tag images (4)                    │
3934       ├────────────────────┼────────────────────────────┼──────────────────────────────────────────────┤
3935       │tu :work file1 dir2 │ tag untag :work file1 dir2 │ Untag a few files from work (5)              │
3936       └────────────────────┴────────────────────────────┴──────────────────────────────────────────────┘
3937
3938       (1) Tags are created if they do not exist
3939       (2) Since add is the default action, it can be omitted: tag *.png  :im‐
3940       ages :png.
3941       (3)  All  files tagged as png will be now tagged as images, and the png
3942       tag will be removed.
3943       (4) Untag all files tagged as images and remove the tag itself
3944       (5) TAB completion is available to complete tagged files. If using  the
3945       FZF mode, multiple files can be selected using the the TAB key.
3946
3947       4. Operating on tagged files
3948
3949       The  t:TAG  construct  (or tag expression) is used to operate on tagged
3950       files via any command, be it internal or external. A few examples:
3951
3952
3953
3954       ┌───────────────────┬────────────────────────────────────────────────────────────────────────┐
3955Command            Description                                                            
3956       ├───────────────────┼────────────────────────────────────────────────────────────────────────┤
3957       │p t:docs           │ Print properties of files tagged as docs
3958       ├───────────────────┼────────────────────────────────────────────────────────────────────────┤
3959       │r t:images         │ Remove all files tagged as images
3960       ├───────────────────┼────────────────────────────────────────────────────────────────────────┤
3961       │stat t:docs t:work │ Run stat(1) over all files tagged as docs and all files tagged as work
3962       └───────────────────┴────────────────────────────────────────────────────────────────────────┘
3963
3964       4.1 Operating on specific tagged files
3965
3966       NOTE: This feature, as always when multi-selection is involved, is only
3967       available  when  TAB completion mode is set to FZF. See the TAB comple‐
3968       tion subsection of the BUILT-IN-EXPANSIONS section above.
3969
3970       You might not want to operate on all files tagged as some specific tag,
3971       say  work,  but  rather on some files tagged as work. TAB completion is
3972       used to achieve this aim.
3973
3974       Let's suppose you have a tag  named  work  which  contains  ten  tagged
3975       files, but you need to operate (say, print the file properties) only on
3976       two of them, say, work1.odt and work2.odt:
3977
3978        p t:work<TAB>
3979
3980       The list of files tagged as work will be displayed via  FZF.  Now  mark
3981       the  two  files  you need using TAB, press Enter or Right, and the full
3982       path to both files will be inserted  into  the  command  line.  So,  'p
3983       t:work' will be replaced by 'p /path/to/work1.odt /path/to/work2.odt'.
3984
3985

16. VIRTUAL DIRECTORIES

3987       CliFM  is  able  to  read and list files from the standard input stream
3988       (STDIN). Each file in the list should be an absolute  path,  terminated
3989       with  a  new line character (\n) and stripped from extra characters not
3990       belonging to the path itself. The size of the input  stream  buffer  is
3991       262MiB  (65536  paths, provided each path takes PATH_MAX bytes (4096 by
3992       default)).
3993
3994       Each file passed via standard input is stored as a symbolic link point‐
3995       ing  to the original file in a temporary directory (called here virtual
3996       directory) with read-only (0500) permissions. This directory,  and  all
3997       its  contents,  will  be deleted at program exit. Use the --virtual-dir
3998       command line flag to specify a custom directory (it if does not  exist,
3999       it  will  be created) instead of the default one, created in the system
4000       temporary directory (usually /tmp/clifm/USER/vdir.XXXXXX, where  XXXXXX
4001       is a random six digits string).
4002
4003       The  user  can operate on these files as if they were any other regular
4004       file, since all operations performed on these symbolic links  (provided
4005       the  current working directory is the virtual directory where all these
4006       files are stored) are performed on the target files and NOT on the sym‐
4007       bolic links themselves.
4008
4009       Once  in  the virtual directory, files are listed by default using only
4010       the base name of the target file. For example, if the  target  file  is
4011       /home/user/Downloads/myfile.tar.gz,  this  file  will  be listed as my‐
4012       file.tar.gz. If this file already exists in the virtual directory  (be‐
4013       cause  there  is  another  target  file  with  the same base name, say,
4014       /home/user/Documents/tars/myfile.tar.gz), a random  six  digits  suffix
4015       will be appended to the file (for instance, myfile.tar.gz.12Rgj6).
4016
4017       Since  this listing mode does not allow the user to get a clear idea of
4018       the actual location of each  listed  file,  a  keybinding  (by  default
4019       Alt-w)  is  available  to  toggle short (base names only) and long file
4020       names: in this latter case, file names are listed using the  full  path
4021       to  the  target  file, replacing slashes by colons (:). For example, if
4022       the target  file  is  /home/user/Downloads/myfile.tar.gz,  it  will  be
4023       listed in the virtual directory as home:user:Downloads:myfile.tar.gz.
4024
4025       If  you  prefer  the  long  names  approach,  you  can  use  the --vir‐
4026       tual-dir-full-paths command line flag.
4027
4028       Note: Bear in mind that the restore last path function is disabled when
4029       listing in this way.
4030
4031       CliFM provides to ways of using virtual directories:
4032
4033       1. Reading files from the standard input
4034
4035       2. Listing sets of files via the virtualize.sh plugin (which is in fact
4036       a special use case of point 1)
4037
4038       1. Standard input
4039
4040       Examples:
4041
4042       ls -Ad /var/* | clifm
4043
4044       This command will pass all files in the directory /var to CliFM
4045
4046       If you need to perform more specific queries, you can  use  find(1)  as
4047       follows:
4048
4049       find  -maxdepth  1  -size +500k -print0 | tr ´\0´ ´\n´ | sed ´s/.//g´ |
4050       clifm
4051
4052       The above command will pass all files in the current  directory  bigger
4053       than 500KiB to CliFM.
4054
4055       You can also use stream redirection:
4056
4057       ls -Ad $PWD/* > list.txt
4058        clifm < list.txt
4059
4060       2. The virtualization plugin
4061
4062       The  virtualize.sh  plugin,  bound by default to the vt action name, is
4063       intended to provide an easy way  of  listing  sets  or  collections  of
4064       files,  such  as selected, tagged, or bookmarked files. For example, to
4065       send all selected files to a virtual directory, you can issue this com‐
4066       mand:
4067
4068       vt sel
4069
4070       and, if you want rather files tagged as PDF:
4071
4072       vt t:PDF
4073
4074       Of course, individual files can also be used:
4075
4076       vt file1 file2 file3
4077
4078       Once  executed, the vt plugin will launch a new instance of CliFM (on a
4079       new terminal emulator window) where you can operate  on  the  specified
4080       files  as  if they were just normal files. Once done, quit this new in‐
4081       stance (via the q command) to return to the primary instance of CliFM.
4082
4083       Note: By default, the terminal emulator used is xterm(1), but it can be
4084       changed by editing the plugin script (virtualize.sh).
4085
4086       If  navigating  the file system, you can quickly go back to the virtual
4087       directory using the -d option: vt -d. The navigation keys (see the KEY‐
4088       BOARD  SHORTCUTS  section  above) and the CLIFM_VIRTUAL_DIR environment
4089       variable are also available (Shift-Left/Shift-Right or  cd  $CLIFM_VIR‐
4090       TUAL_DIR).
4091
4092       Tip: Write an alias to make this even easier:
4093
4094       alias vtd=´cd $CLIFM_VIRTUAL_DIR´
4095
4096

17. NOTE ON SPEED

4098       clifm  is by itself quite fast by default, but if speed is still an is‐
4099       sue, it is possible to get some extra performance.
4100
4101       The two most time consuming features are:
4102
4103        1) The files counter, used to print the amount of files  contained  by
4104       listed  directories.  Disabling this option produces a nice performance
4105       boost.
4106
4107        2) In normal mode, fstatat(3) is  used  to  gather  information  about
4108       listed  files.  Since  this function, especially when executed hundreds
4109       (and even thousands) of times, is quite time consuming, the light  mode
4110       was implemented as an alternative listing process omitting all calls to
4111       it.
4112
4113       When running in light mode, however, a few features are lost:
4114
4115        1. Only basic file classification is performed, namely, that  provided
4116       by  the d_type field of a dirent struct (see readdir(3)). Bear in mind,
4117       nonetheless, that whenever _DIRENT_HAVE_D_TYPE was not set  at  compile
4118       time,  or  in case of a DT_UNKNOWN value for a given entry (we might be
4119       facing a file system not returning the d_type value, for example,  loop
4120       devices),  clifm will fall back to stat(3) to get basic files classifi‐
4121       cation.
4122
4123        2. Color per file extension is disabled for performance reasons.
4124
4125        3. The marker for selected files (*) is lost as well: to keep track of
4126       selected files and thus recognize them in the current list of files, we
4127       make use of files device and inode number, which  is  provided  by  fs‐
4128       tatat(3).
4129
4130       Besides  these  two  features, a few more things can be disabled to get
4131       some extra speed (though perhaps  unnoticeable):  icons  (if  enabled),
4132       columns,  colors, and, if already running without colors, file type in‐
4133       dicators. Because listing lots of files could  be  expensive  and  time
4134       consuming,  you  can  also try to limit the amount of files printed for
4135       each visited directory (see the mf command above).
4136
4137       Despite the above, however, it is important to bear in mind that  list‐
4138       ing  speed  does not only depend on the program´s code and enabled fea‐
4139       tures, but also on the terminal emulator used. Old, basic terminal emu‐
4140       lators  like  Xterm,  Aterm, and the kernel built-in console are really
4141       slow compared to more modern ones like Urxvt, Lxterminal, ST, and  Ter‐
4142       minator, to name just a few.
4143
4144       If  using  Xterm, a nice speed boost is provided by the fast scroll op‐
4145       tion: set fastScroll to true in your ~/.Xresources file. See xterm(1).
4146
4147

18. KANGAROO FRECENCY ALGORITHM

4149       The directory jumper function  is  designed  to  learn  the  navigation
4150       habits  of  the  user. The information is stored in a database (see the
4151       FILES section below) used to get the best match for a given string pro‐
4152       vided  by the user. In this sense, Kangaroo is like a quick, smart, and
4153       evolved cd function.
4154
4155       The information stored in the database, always per directory, is:
4156        a) Number of visits
4157        b) Date of first visit (seconds since the Unix epoch)
4158        c) Date of the last visit (seconds since Unix epoch)
4159        d) The full path to each visited directory
4160
4161       With this information it is possible to build a ranking of  directories
4162       to  offer the user the most accurate matches for each query string. The
4163       matching algorithm takes into account mainly two factors: frequency and
4164       recency (which is why this kind of algorithm is often called a frecency
4165       algorithm).
4166
4167       After getting an initial list of matches based on the  query  string(s)
4168       entered  by  the user, the frequency algorithm is applied on each entry
4169       in the list. The algorithm is quite simple: (visits *  VISIT-CREDIT)  /
4170       days-since-first-visit.  As  a result, we get the average of visits per
4171       day since the day of the first visit (what we call the directory rank).
4172
4173       NOTE: VISIT-CREDIT is a hardcoded value: 200.
4174
4175       There are however some further steps  in  the  ranking  process:  Bonus
4176       points.
4177
4178       Extra  credits  or penalties are assigned based on the directories last
4179       access time according to the following simple algorithms:
4180        Within                                                            last
4181       hour:                                                                          rank
4182       * 4
4183        Within                                                            last
4184       day:                                                                           rank
4185       * 2
4186        Within                                                            last
4187       week:                                                                          rank
4188       / 2
4189        More                              than                               a
4190       week:                                                                          rank
4191       / 4
4192
4193       If the last query string matches the basename of a directory, the entry
4194       for  this  directory has 300 extra credits. This is done simply because
4195       users normally use directory basenames as query strings: they are  eas‐
4196       ier to remember.
4197
4198       In  the same way, pinned directories get 1000 extra credits, bookmarked
4199       directories 500 credits, and directories currently in a  workspace  300
4200       credits.
4201
4202       For  example:  if  the query string is "test", /media/data/test will be
4203       matched. Now, if this directory was accessed within the last hour,  and
4204       its  rank  was  200,  it  becomes  800.  But, because the search string
4205       matches its basename, it gets 300 extra credits, and, if this directory
4206       is  in  addition  bookmarked and pinned, it gets 1500 extra credits. In
4207       this way the total rank of this directory in the  matching  process  is
4208       2600. In doing this, we have more chances of matching what the user ac‐
4209       tually wanted to match.
4210
4211       Once all entries in the initial list of matches have been filtered  via
4212       the  above  procedure  and ranked, we can return the best ranked entry.
4213       The higher rank a directory has, the more priority it has over the  re‐
4214       maining entries in the initial list of matches.
4215
4216       Automatic  maintenance  is  done  on the database applying a few simple
4217       procedures:
4218
4219        a) If PurgeJumpDB is set to true (see the  main  configuration  file),
4220       each entry in the database is checked at startup to remove non-existent
4221       directories. This option is set to false by default to  avoid  removing
4222       paths pointing to unmounted file systems (like removable devices or re‐
4223       mote locations) which you still might want to keep. Non-existent direc‐
4224       tories,  however, will be removed soon or later anyway due to their low
4225       rank value (see below).
4226
4227        b) Once the rank of a directory falls below  MinJumpRank  (by  default
4228       10),  it  is  forgotten  and deleted from the database. The MinJumpRank
4229       value can be customized in the configuration  file.  To  make  non-fre‐
4230       quently  visited  directories  disappear quicker from the database, in‐
4231       crease this value. If set to 0, by contrast, directories will never  be
4232       removed from the database.
4233
4234        c)  Once  the  sum total of ranks reaches MaxJumpTotalRank (by default
4235       100000), each individual rank is divided by a dynamic  factor  so  that
4236       the  total rank becomes less than or equal to MaxJumpTotalRank. If some
4237       rank falls in the process below MinJumpRank (and provided  this  latter
4238       is  not  0),  it  is removed from the database. MaxJumpTotalRank can be
4239       modified in the configuration file. The higher the value of  MaxJumpTo‐
4240       talRank, the more time directories will be kept in the database.
4241
4242       NOTE:  Directories  visited in the last 24 hours, just as pinned, book‐
4243       marked directories, and directories currently used in  some  workspace,
4244       will not be removed from the database, no matter what their rank is. In
4245       other words, if you want to indefinitely keep a given directory in  the
4246       jump database, bookmark it.
4247
4248       The  idea  of  'frecency'  was, as far as I know, first devised and de‐
4249       signed    by    Mozilla.    See     https://wiki.mozilla.org/User:Mcon‐
4250       nor/Past/PlacesFrecency.  However, it is also implemented, though using
4251       different algorithms, by different projects like autojump,  z.lua,  and
4252       zoxide.
4253
4254

19. ENVIRONMENT

4256       The following variables are read at initialization time:
4257
4258       NO_COLOR
4259              If set to any value, clifm will run colorless
4260
4261       CLIFM_NO_COLOR
4262              Same as NO_COLOR (or CLICOLOR=0), but specific to clifm
4263
4264       COLORTERM
4265              If  set to either truecolor or 24bit, clifm assumes the terminal
4266              emulator to be capable of displaying true  colors  (and  thereby
4267              also 256 colors), despite what the terminfo(5) database informs.
4268
4269       CLIFM_FILE_COLORS
4270              A colon separated list of file type color codes in the same form
4271              specified above in the COLOR CODES section
4272
4273       CLIFM_EXT_COLORS
4274              Same as above, but for file extensions
4275
4276       CLIFM_IFACE_COLORS
4277              Same as above, but for different elements of clifm's interface
4278
4279       CLIFM_DATE_SHADES
4280              A comma separated list of colors used to print  timetamps  based
4281              on age
4282
4283       CLIFM_SIZE_SHADES
4284              Same as CLIFM_DATE_SHADES, but for file sizes
4285
4286       CLIFM_FORCE_COLOR
4287              Force  the  use  of colors, even if the terminal informs that it
4288              does not support colors
4289
4290       CLIFM_HISTFILE
4291              A custom commands history file
4292
4293       CLIFM_FILTER
4294              Define a file filter. If set, this variable overrides the Filter
4295              option in the configuration file
4296
4297       CLIFM_SUDO_CMD
4298              Name  of  the  authenticator  program. Used by the X command (to
4299              launch a new instance of CliFM as root),  the  Alt-v  keybinding
4300              (to  prepend  the authenticator program name to the current com‐
4301              mand line), and for some operations on archives (ISO files). De‐
4302              faults  to  sudo  (or  doas  if  compiled  on OpenBSD). Example:
4303              CLIFM_SUDO_CMD=doas clifm.
4304
4305       CLIFM_SHELL
4306              An absolute path to the shell clifm will  use  to  run  external
4307              commands. Only values found in /etc/shells are allowed.
4308
4309       SHELL  Same  as CLIFM_SHELL. Note however that CLIFM_SHELL takes prece‐
4310              dence over SHELL.
4311
4312       TMPDIR Path to a directory where temporary files will be created
4313
4314       CLIFM_TMPDIR
4315              Same as TMPDIR, but specific to clifm (takes precendece over TM‐
4316              PDIR)
4317
4318       TERM   Terminal type for which output is to be prepared
4319
4320       FZF_DEFAULT_OPTS
4321              A  quoted  list  of options to be passed to FZF (if used for TAB
4322              completion)
4323
4324
4325       Except when running in stealth mode, clifm sets the following  environ‐
4326       ment variables:
4327
4328       CLIFM  This variable is set to the path to the configuration directory.
4329              By inspecting this variable other programs can find out if  they
4330              were  spawned by clifm. It can also be used to quickly jump into
4331              the configuration directory: cd $CLIFM or just $CLIFM
4332
4333       CLIFM_PID
4334              Set to the PID number of clifm's running instance
4335
4336       CLIFM_VERSION
4337              Set to the version number of clifm's running instance
4338
4339       CLIFM_PLUGINS_HELPER
4340              Set to the full path to the plugins-helper script used  by  many
4341              plugins.
4342
4343       CLIFM_PROFILE
4344              This  variable  is set to the current profile of clifm (if using
4345              two or more instances of clifm  under  different  profiles,  the
4346              last  one will be used). Specially useful to develop clifm plug‐
4347              ins on a per profile basis.
4348
4349       CLIFM_SELFILE
4350              The path to the current selection file.
4351
4352       CLIFM_COLORLESS
4353              Set  to  1  if  running   colorless   (via   the   NO_COLOR   or
4354              CLIFM_NO_COLOR  environment variables, or the --no-color command
4355              line option).
4356
4357       CLIFM_BUS
4358              This variable contains the path to a  pipe  by  means  of  which
4359              plugins  can talk to clifm. See the PLUGINS section for more in‐
4360              formation..TP CLIFM_VIRTUAL_DIR This variable is set to the path
4361              to  the currently used virtual directory only if (and while) the
4362              virtual directory function is exectued. See the VIRTUAL DIRECTO‐
4363              RIES section above.
4364
4365       CLIFM_LINE
4366              When  running a plugin via a keybinding, this variable holds the
4367              content of the current line buffer. For a usage example see  the
4368              xclip.sh plugin.
4369
4370       SHLVL  Incremented by one each time a new shell is started.
4371
4372       CLIFMLVL
4373              Same as SHLVL, but specific to clifm.
4374
4375       If  Notifications is set to false for the current prompt, the following
4376       variables are exported to the environment to be  used,  if  needed,  by
4377       your custom prompt:
4378
4379       CLIFM_STAT_SEL
4380              Current amount of selected files
4381
4382       CLIFM_STAT_TRASH
4383              Current amount of trashed files
4384
4385       CLIFM_STAT_ERROR_MSGS
4386              Current amount of error messages
4387
4388       CLIFM_STAT_WARNING_MSGS
4389              Current amount of warning messages
4390
4391       CLIFM_STAT_NOTICE_MSGS
4392              Current amount of notice messages
4393
4394       CLIFM_STAT_WS
4395              Current workspace number
4396
4397       CLIFM_STAT_EXIT
4398              Exit code of the last executed command
4399
4400       CLIFM_STAT_ROOT
4401              1 if user is root (UID = 0), 0 otherwise
4402
4403       CLIFM_STAT_STEALTH
4404              1 if running in stealth mode, 0 otherwise
4405
4406

20. SECURITY

4408       Since clifm executes OS commands, it needs to provide a way to securely
4409       run these commands, specially when it comes to untrusted  environments.
4410       Two  features  are provided to achieve this aim: secure environment and
4411       secure commands.
4412
4413       Both features are aimed at protecting the program  and  the  system  as
4414       such  from malicious input, either coming from environment variables or
4415       from indirect input, that is to say, input coming not from the  command
4416       line  (in which is assumed that it is the user herself who is executing
4417       the given command), but from files: this is the case of default associ‐
4418       ated  applications (the mime command), autocommands, (un)mount commands
4419       (via the net command), just as profile and prompt commands.
4420
4421       In an untrusted environment, an attacker could cause unexpected and in‐
4422       secure  behavior  (even command injection) using environment variables,
4423       or inject malicious commands via indirect input, commands which will be
4424       later  executed  by  clifm  without  the user's consent (i.e. automati‐
4425       cally). This is why we provide a mechanism to minimize this danger:  if
4426       running  in an untrusted environment, the secure environment and secure
4427       commands features are there to prevent (at least as  far  as  possible)
4428       this kind of attacks.
4429
4430       A) Secure environment
4431
4432       Programs  inherit  the environment from the parent process. However, if
4433       this inherited environment is not trusted, not secure, it is  always  a
4434       good  idea to sanitize it using only sane values, preventing thus unde‐
4435       sired and uncontrolled input that might endanger the  program  and  the
4436       system itself.
4437
4438       The  secure-environment  function forces clifm to run on a such a sani‐
4439       tized environment.
4440
4441       There are two secure-environment modes, the regular, and the full  one.
4442       To  enable  the  regular  mode, run clifm with the --secure-env command
4443       line option. Otherwise, enable the full mode using --secure-env-full.
4444
4445       a) Regular: in this mode, the inherited environment is cleared,  though
4446       a few variables are preserved to keep clifm running as stable as possi‐
4447       ble. These preserved variables are: TERM, DISPLAY, LANG,  TZ,  and,  if
4448       FZF TAB completion mode is enabled, FZF_DEFAULT_OPTS.
4449
4450       The  following  variables  are set in an environment agnostic way (that
4451       is, securely):
4452                - HOME, SHELL, and USER are retrieved using getpwuid(3)
4453                - PATH is set consulting _PATH_STDPATH  (or  _CS_PATH  if  the
4454              former is not available)
4455                -  IFS is set to a sane, hard-coded value: " \n\t" (space, new
4456              line char, and horizontal TAB)
4457
4458       As a plus, 1) core dumps are disabled, 2) the umask  value  is  set  to
4459       0077  at  startup and the creation mode (when using the new command) is
4460       forced to 0700 for directories and 0600 for files, and 3)  non-standard
4461       file descriptors (>2) are closed.
4462
4463       b)  Full:  this mode is just like the regular mode, except that nothing
4464       is imported from the environment at all and only PATH and IFS  are  set
4465       (as  described above). Everything else remains unset, and is the user's
4466       responsibility to set environment variables (via the export  function),
4467       as needed. In this case, you might want to set, at least, TERM, and, if
4468       running in a graphical environment, DISPLAY.
4469
4470       Be aware that enabling secure-environment might break  some  functions,
4471       depending on the system configuration.
4472
4473       B) Secure commands
4474
4475       Some  commands  are automatically executed by clifm: (un)mount commands
4476       (via the net command), opening applications (via Lira), just as prompt,
4477       profile, and autocommands. These commands are read from a configuration
4478       file and then executed. Now, if an attacker has access to any of  these
4479       files,  she might force clifm to run any arbitrary command, and thereby
4480       possibly exposing the whole system.
4481
4482       Every time a command is thus  automatically  executed  via  the  system
4483       shell  (i.e.  without  the  user's direct consent), the secure commands
4484       function performs three different, though intrinsically  related  tasks
4485       intended to mitigate command injection and/or unexpected behavior:
4486
4487       a) Only command base names are allowed: nano, for instance, is allowed,
4488       while /usr/bin/nano is not. In this way we can guarantee that only com‐
4489       mands  found  in  a sanitized PATH (see the point c below) will be exe‐
4490       cuted. This is done in order to prevent the execution of  custom  bina‐
4491       ries/scripts, for example: /tmp/exec_file.
4492
4493       b)  Commands are validated using a whitelist of safe characters (mostly
4494       to prevent stream redirection, conditional execution, and  so  on,  for
4495       example,  'your_command;some_injected_command'). This set of safe char‐
4496       acters slightly vary depending on the command being  executed  (because
4497       they use different syntaxes):
4498
4499               Net command:                   a-zA-Z -_.,/=
4500               Prompt, profile, autocommands: a-zA-Z -_.,/"'
4501               Mime command:                  a-zA-Z -_.,%&
4502
4503       Commands  containing at least one unsafe character will be rejected. Of
4504       course, we cannot (and should not) prevent what looks like  legitimate,
4505       benign  commands from being executed. But we can stop commands that, in
4506       an untrusted environment, look suspicious. This is specially  the  case
4507       of  stream  redirection  (>), pipes (|), sequential (;) and conditional
4508       execution (&&, ||),  command  substitution  ($(cmd)),  and  environment
4509       variables ($VAR).
4510
4511       c)  A  secure  environment is set (--secure-env is implied; to run on a
4512       fully  sanitized  environment  run  as  follows:  --secure-cmds   --se‐
4513       cure-env-full.
4514
4515

21. MISCELLANEOUS NOTES

4517       Sequential and conditional execution of commands:
4518
4519       For  each of the internal commands (see the COMMANDS section above) you
4520       can use the semicolon to execute them sequentially  and/or  the  double
4521       ampersand to execute them conditionally. Example: cmd1; cmd2 && cmd3.
4522
4523       Though  you  can use here external commands as well, bear in mind that,
4524       whenever at least one internal command is involved in a chained list of
4525       commands,  clifm  will take care of executing this list (simply because
4526       the system shell isn't able to understand any of  these  commands),  so
4527       that no shell inter-process function (like pipes), nor any stream redi‐
4528       rection or shell expression (like IF  blocks  or  FOR  loops)  will  be
4529       available. However, the shell is still used to run single external com‐
4530       mands found in the chained list, but in isolation  from  the  remaining
4531       commands in this list.
4532
4533       As a rule of thumb, when using chained commands make sure to always ex‐
4534       pand ELN's to avoid undesired consequences. If, for instance, you issue
4535       this  command:  touch aaa && r 3,  you  will end up deleting a file you
4536       were not intended to delete, simple because after the successful execu‐
4537       tion  of  the  first  command, the ELN 3 corresponds now to a different
4538       file.
4539
4540
4541       External commands:
4542
4543       clifm is not limited to its own set of internal  commands,  like  open,
4544       sel,  trash, etc. It can run any external command as well, provided ex‐
4545       ternal commands are allowed (see the -x option, the ext command, or the
4546       configuration file).
4547
4548       External  commands are executed using an actual shell (say, /bin/bash),
4549       which is specified by clifm as follows:
4550         1. If the CLIFM_SHELL environment variable  is  set,  this  value  is
4551       used.
4552         2. If the SHELL environment variable is set, this value is used.
4553         3.  If  none  of  the  above, the value will be taken from the passwd
4554       database (via getpwuid(3)).
4555
4556       By beginning the external command by a colon or a semicolon (':',  ';')
4557       you  tell clifm not to parse the input string, but instead letting this
4558       task to the system shell.
4559
4560       Bear in mind that clifm is not intended to be used as a shell,  but  as
4561       the file manager it is.
4562
4563
4564       Terminal emulators and non-ASCII characters:
4565
4566       It  depends  on  the  terminal  emulator  you  use to correctly display
4567       non-ASCII characters and characters from the  extended  ASCII  charset.
4568       If,  for example, you create a file named "ñandú" (the Spanish word for
4569       ´rhea´), it will be correctly displayed by the Linux console,  Lxtermi‐
4570       nal,  and  Urxvt,  but  not  thus by more basic terminal emulators like
4571       Aterm.
4572
4573
4574       Spaces and file names:
4575
4576       When dealing with file names containing spaces, you can use both single
4577       and  double  quotes (ex: "this file" or 'this file') plus the backslash
4578       character (ex: this\ file).
4579
4580
4581       Starting path:
4582
4583       By default, clifm starts in the current working directory. However, you
4584       can always specify a different path by passing it as positional parame‐
4585       ter. Ex: clifm /home/user/misc. You can also  permanently  set  up  the
4586       starting  path  in the clifm configuration file. If the RestoreLastPath
4587       option is set to true, clifm will start instead in the last visited di‐
4588       rectory (and in the last used workspace), unless the starting path (and
4589       optionally the workspace number) is  specified  using  the  appropriate
4590       command line options.
4591
4592
4593       Default profile:
4594
4595       clifm's  default profile is default. To create alternative profiles use
4596       the -P command line option or the pf add command (see above).
4597
4598

22. FILES

4600       CONFIGURATION FILE
4601              The  main  configuration  file  is   $XDG_CONFIG_HOME/clifm/pro‐
4602              files/PROFILE/clifmrc.  It  will  be  copied  from DATADIR/clifm
4603              (usually /usr/local/share/clifm), and if not found, it  will  be
4604              created  anew  with default values. Here you can permanently set
4605              up clifm options, define aliases, prompt commands, and  autocom‐
4606              mands. You can access the configuration file either via the con‐
4607              fig command or pressing F10.
4608
4609              A description for each option in the configuration file  can  be
4610              found in the configuration file itself.
4611
4612       PROFILE FILE
4613              The profile file is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/pro‐
4614              file.clifm.  In this file you can add those commands you want to
4615              be  executed  at startup. You can also permanently set here some
4616              custom variables, ex: 'dir="/path/to/dir"'. This variable may be
4617              used  as  a  shortcut  to that directory, for instance: cd $dir.
4618              Custom variables could also be temporarily defined via the  com‐
4619              mand  prompt: Ex: user@hostname ~ $ var="This is a test". Tempo‐
4620              rary variables will be removed at program exit.  Internal  vari‐
4621              ables  are  disabled  by default; enable them via the --int-vars
4622              command line switch.
4623
4624       PROMPTS FILE
4625              This  file  contains  prompts  definitions  and  is  located  in
4626              DATADIR/clifm/prompts.clifm.  It  will  be  copied automatically
4627              into $XDG_CONFIG_HOME/clifm/prompts.clifm if it  doesn't  exist.
4628              The  Prompt line in the color scheme file should point to one of
4629              the prompt names defined in this file. See  the  PROMPT  section
4630              for more information.
4631
4632       KEYBINDINGS FILE
4633              The  keybindings file is $XDG_CONFIG_HOME/clifm/keybindings,cfm.
4634              It will be copied from DATADIR/clifm (usually /usr/share/clifm),
4635              and  if  not found, it will be created anew with default values.
4636              This file is used to specify the  keyboard  shortcuts  used  for
4637              some ClifM's functions. The format for each keybinding is always
4638              "keyseq:function", where 'keyseq' is an escape sequence  in  GNU
4639              emacs  style.  A  more  detailed explanation can be found in the
4640              keybindings file itself.
4641
4642       PLUGINS DIRECTORY
4643              The directory used to store programs or scripts  pointed  to  by
4644              actions (in other words, plugins) is DATADIR/clifm/plugins (usu‐
4645              ally /usr/share/clifm/plugins). To edit these plugins copy  them
4646              to  $XDG_CONFIG_HOME/clifm/plugins and edit them to your liking.
4647              Plugins in this local directory take precedence  over  those  in
4648              the system one.
4649
4650       COLORS DIRECTORY
4651              This  directory, $DATADIR/clifm/colors, contains available color
4652              schemes (or just themes) as files with a .clifm  extension.  You
4653              can  copy  these themes to the local colors directory ($XDG_CON‐
4654              FIG_HOME/clifm/colors) and edit them to your liking  (or  create
4655              new  themes  from the ground up). Themes in the local colors di‐
4656              rectory take precedence over those in the system directory.  You
4657              can  create as many themes as you want by dropping them into the
4658              local colors directory.  The  default  color  scheme  file  (de‐
4659              fault.clifm) can be used as a guide.
4660
4661       ACTIONS FILE
4662              The   file   used   to   define   custom  actions  is  $XDG_CON‐
4663              FIG_HOME/clifm/profiles/PROFILE/actions.clifm. It will be copied
4664              from DATADIR/clifm (usually /usr/share/clifm), and if not found,
4665              it will be created anew with default values.
4666
4667       MIMELIST FILE
4668              The  mimelist   file   is   $XDG_CONFIG_HOME/clifm/profiles/PRO‐
4669              FILE/mimelist.clifm.  It is a list of file types and name/exten‐
4670              sions and their associated applications used by lira. It will be
4671              copied from DATADIR/clifm (usually /usr/share/clifm).
4672
4673       PREVIEW FILE
4674              The preview file is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/pre‐
4675              view.clifm and is shotgun's configuration file. It makes use  of
4676              the  same  syntax  used  by the mimelist file. It will be copied
4677              from DATADIR/clifm (usually /usr/share/clifm).
4678
4679       BOOKMARKS FILE
4680              The  bookmarks  file   is   $XDG_CONFIG_HOME/clifm/profiles/PRO‐
4681              FILE/bookmarks.clifm  Just the list of the user's bookmarks used
4682              by the bookmarks function.
4683
4684
4685       HISTORY FILE
4686              The  history   file   is   ~/.config/clifm/profiles/PROFILE/his‐
4687              tory.clifm.   A list of commands entered by the user and used by
4688              the history function.
4689
4690       COMMANDS LOG FILE
4691              The commands log  file  is  $XDG_CONFIG_HOME/clifm/profiles/PRO‐
4692              FILE/cmdlogs.clifm.  Command logs keep track of commands entered
4693              in the command line. These logs have  this  form:  "[date]  cur‐
4694              rent_working_directory:command".
4695
4696       MESSAGES LOG FILE
4697              The  messages  log  file is $XDG_CONFIG_HOME/clifm/profiles/PRO‐
4698              FILE/msglogs.clifm. Message logs are  a  record  of  errors  and
4699              warnings and have the following form: "[date] message".
4700
4701       KANGAROO DATABASE
4702              The   directory   jumper   database   is   stored  in  $XDG_CON‐
4703              FIG_HOME/clifm/profiles/PROFILE/jump.clifm.
4704
4705       NOTE: If $XDG_CONFIG_HOME is not set, $HOME/.config/ is used instead.
4706
4707

23. EXAMPLES

4709       NOTE: Always try TAB. TAB completion is available for many things
4710
4711       NOTE 2: Suggestions for possible completions are printed  next  to  the
4712       text typed so far. To accept the given suggestion press Right (or Alt-f
4713       to accept only the first/next suggested word). Otherwise,  the  sugges‐
4714       tion is just ignored
4715
4716       Get help: F1: manpage F2: keybindings F3: commands
4717
4718       1. NAVIGATION
4719
4720
4721       ┌────────────────────────┬────────────────────────────────────────────────────────────────────┐
4722Command                 Description                                                        
4723       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4724       │/etc                    │ Change directory to /etc (1)                                       │
4725       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4726       │5                       │ Change to the directory whose ELN is 5 (2)                         │
4727       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4728       │j <TAB> (also dh <TAB>) │ Navigate through visited directories                               │
4729       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4730       │j xproj                 │ Jump to ~/media/data/docs/work/mike/xproject (3)                   │
4731       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4732       │b (Shift-Left, Alt-j)   │ Go back in the directory history list                              │
4733       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4734       │f (Shift-Right, Alt-k)  │ Go forth in the directory history list                             │
4735       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4736       │.. (Shift-Up, Alt-u)    │ Change to the parent directory                                     │
4737       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4738       │...                     │ Change to the parent directory of the current parent directory (4) │
4739       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4740       │bd w                    │ Change to the parent directory matching "w" (5)                    │
4741       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4742       │ws2 (Alt-2)             │ Swtich to the second workspace (6)                                 │
4743       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4744       │/*.pdf<TAB>             │ List PDF files (current dir)                                       │
4745       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4746       │=x<TAB>                 │ List executable files (current dir) (7)                            │
4747       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4748       │@gzip<TAB>              │ List files (current dir) whose MIME type includes "gzip"           │
4749       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4750       │pin mydir               │ Pin the directory named mydir
4751       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4752       │,                       │ Change to pinned directory                                         │
4753       ├────────────────────────┼────────────────────────────────────────────────────────────────────┤
4754       │view (Alt+-)            │ Preview files (current dir) (8)                                    │
4755       └────────────────────────┴────────────────────────────────────────────────────────────────────┘
4756
4757        (1) cd /etc also works
4758        (2)  Press TAB to make sure 5 is the file you want, or just pay atten‐
4759       tion to the suggestion. Press Right to accept the given suggestion
4760        (3) This depends on the database ranking. For more  accuracy:  j  mike
4761       xproj. TAB completion is available: j xproj<TAB>
4762        (4)  This  is  the fastback function: each susequent dot after the two
4763       first dots is understood as an extra "/.."
4764        (5) Type bd <TAB> to list all parent directories
4765        (6) Alt-[1-4] is available for workspaces 1-4
4766        (7) Type =<TAB> to get the list of  available  file  type  characters.
4767       Consult the FILE FILTERS section above for more information
4768        (8) This feature depends on fzf(1)
4769
4770       2. FILE OPERATIONS
4771
4772
4773       ┌─────────────────────────┬───────────────────────────────────────────────────────────────────────────┐
4774Command                  Description                                                               
4775       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4776       │myfile.txt               │ Open myfile.txt (with the default associated application)                 │
4777       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4778       │myfile.txt vi            │ Open myfile.txt using vi (1)                                              │
4779       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4780       │24&                      │ Open the file whose ELN is 24 in the background                           │
4781       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4782       │n myfile mydir/          │ Create a new file named myfile and a new directory named mydir (2)(3)     │
4783       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4784       │p4                       │ Print the properties of the file whose ELN is 4                           │
4785       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4786       │pc myfile.txt            │ Edit the permission set of the file myfile.txt (use oc to edit ownership) │
4787       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4788       │s *.c                    │ Select all c files in the current directory                               │
4789       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4790       │s /media/*<TAB>          │ Interactively select files in the directory /media (4)                    │
4791       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4792       │s 1-4 8 19-26            │ Select multiple files in the current directory by ELN                     │
4793       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4794       │sb (sel<TAB> or s:<TAB>) │ List selected files (5)                                                   │
4795       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4796       │ds (ds <TAB>)            │ Selectively deselect files using a menu                                   │
4797       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4798       │bm add mydir/ mybm       │ Bookmark the directory mydir/ as "mybm"                                   │
4799       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4800       │bm mybm (b:mybm)         │ Access the bookmark named mybm (6)                                        │
4801       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4802       │bm del mybm              │ Remove the bookmark named mybm
4803       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4804       │bm (Alt-b or b:<TAB>)    │ Open the bookmarks manager                                                │
4805       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4806       │t 1-3 *.old              │ Trash a few files                                                         │
4807       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4808       │u (u <TAB>)              │ Selectively undelete/restore trashed files using a menu                   │
4809       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4810       │t del (t del <TAB>)      │ Selectively remove files from the trash can using a menu                  │
4811       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4812       │t empty                  │ Empty the trash can                                                       │
4813       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4814       │ta *.pdf :mypdfs         │ Tag all PDF files in the current directory as mypdfs
4815       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4816       │p t:mypdfs               │ Print the file properties of all files tagged as mypdfs
4817       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4818       │/*.pdf                   │ Search for all PDF files in the current directory                         │
4819       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4820       │c sel                    │ Copy selected files into the current directory                            │
4821       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4822       │c *.txt 2                │ Copy all txt file into the directory whose ELN is 2                       │
4823       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4824       │r sel                    │ Remove all selected files (7)                                             │
4825       ├─────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
4826       │m4                       │ Rename the file whose ELN is 4 (8)                                        │
4827       └─────────────────────────┴───────────────────────────────────────────────────────────────────────────┘
4828
4829        (1)  Use the ow command to select the opening application from a menu:
4830       ow myfile.txt or ow myfile.txt <TAB>
4831        (2) Note the ending slash in the directory name
4832        (3) Since clifm is integrated to the system shell, you  can  also  use
4833       any  of  the  shell  commands  you usually use to create new files. Ex:
4834       touch myfile or nano myfile
4835        (4) Only for non-standard TAB completion: fzf, fnf, smenu
4836        (5) You can also TAB expand the sel keyword: p sel<TAB>  to  list  se‐
4837       lected  files  (and  optionally mark multiple selected files to operate
4838       on)
4839        (6) Type bm <TAB> to get the list of available bookmark names
4840        (7) To remove files in bulk use the rr command
4841        (8) To rename files in bulk use the br command
4842
4843       3. MISC
4844
4845
4846       ┌───────────────────────────┬───────────────────────────────────────┐
4847Command                    Description                           
4848       ├───────────────────────────┼───────────────────────────────────────┤
4849       │hh (Alt-.)                 │ Toggle hidden files                   │
4850       ├───────────────────────────┼───────────────────────────────────────┤
4851       │ll (Alt-l)                 │ Toggle detail/long view mode          │
4852       ├───────────────────────────┼───────────────────────────────────────┤
4853       │rf (Enter -on empty  line- │ Clear/refresh the screen              │
4854       │or Ctrl-l)                 │                                       │
4855       ├───────────────────────────┼───────────────────────────────────────┤
4856       │Alt-,                      │ Toggle list-directories-only          │
4857       ├───────────────────────────┼───────────────────────────────────────┤
4858       │Alt-TAB, Ctrl-Alt-i        │ Toggle disk usage analyzer mode       │
4859       ├───────────────────────────┼───────────────────────────────────────┤
4860       │!<TAB>                     │ Navigate through the command history  │
4861       ├───────────────────────────┼───────────────────────────────────────┤
4862       │config (F10)               │ View/edit the main configuration file │
4863       ├───────────────────────────┼───────────────────────────────────────┤
4864       │pf set test                │ Change to profile test
4865       ├───────────────────────────┼───────────────────────────────────────┤
4866       │actions                    │ List available actions/plugins        │
4867       ├───────────────────────────┼───────────────────────────────────────┤
4868       │icons on                   │ Want icons?                           │
4869       ├───────────────────────────┼───────────────────────────────────────┤
4870       │cs (cs <TAB>)              │ List available color schemes          │
4871       ├───────────────────────────┼───────────────────────────────────────┤
4872       │prompt (prompt <TAB>)      │ List available prompts                │
4873       ├───────────────────────────┼───────────────────────────────────────┤
4874       │q                          │ I´m tired, quit                       │
4875       └───────────────────────────┴───────────────────────────────────────┘
4876
4877       There  is  a  lot more you can do, but this should be enough to get you
4878       started.
4879
4880

EXIT STATUS

4882       clifm returns the exit status of the last executed command
4883
4884

CONFORMING TO

4886       clifm is C99 compliant, and, if compiled with the _BE_POSIX flag, it is
4887       POSIX.1-2008  compliant  as well. If not, just a single non-POSIX func‐
4888       tion is used: statx(2) (Linux specific), to get files birth time.
4889
4890

BUG AND FEATURE REQUESTS

4892       Report at <https://github.com/leo\-arch/clifm/issues>
4893
4894

AUTHOR

4896       L. M. Abramovich <leo.clifm@outlook.com>
4897
4898       For additional contributors, use  git  shortlog  -s  on  the  clifm.git
4899       repository.
4900
4901
4902
4903clifm 1.15                       Oct 25, 2023                         CLIFM(1)
Impressum