.TH "CLIFM" "1" "Aug 16, 2024" "clifm 1.20" "CLIFM Manual"
.SH NAME
clifm \- The Command Line File Manager
.SH SYNOPSIS
.B clifm
[\fI\,OPTION\/\fR]... [\fI\,PATH\/\fR]

.SH INDEX
\fB1.\fR Getting help
.sp
\fB2.\fR Description
.sp
\fB3.\fR Parameters
   . Positional parameters
   . Options
.sp
\fB4.\fR Commands
.sp
\fB5.\fR File Filters (by file name, file type, and MIME type)
.sp
\fB6.\fR Keyboard shortcuts
.sp
\fB7.\fR Theming
.sp
\fB8.\fR Built\-in expansions
.sp
\fB9.\fR Resource opener (third\-party openers are also supported)
.sp
\fB10.\fR Shotgun, a built\-in files previewer
.sp
\fB11.\fR Auto\-suggestions (including a warning prompt for invalid command names)
.sp
\fB12.\fR Shell functions
.sp
\fB13.\fR Plugins
.sp
\fB14.\fR Autocommands
.sp
\fB15.\fR File tags
.sp
\fB16.\fR Virtual directories
.sp
\fB17.\fR Note on speed
.sp
\fB18.\fR Kangaroo frecency algorithm
.sp
\fB19.\fR Environment
.sp
\fB20.\fR Security
.sp
\fB21.\fR Miscellaneous notes
.sp
\fB22.\fR Files
.sp
\fB23.\fR Examples

.SH 1. GETTING HELP
There are several ways of getting help in \fBclifm\fR. Once in the program, enter \fI?\fR or \fIhelp\fR for some basic usage examples, or press \fBF1\fR to access this manpage, \fBF2\fR to go to the \fBCOMMANDS\fR section of this very manpage, or \fBF3\fR to jump to the \fBKEYBOARD SHORTCUTS\fR section.
.sp
To get help about some specific topic, type \fIhelp <TAB>\fR to get a list of available help topics. Choose the topic you want and then press \fIEnter\fR.
.sp
For a list of available commands and a brief description type \fIcmd<TAB>\fR.
.sp
Help for all internal commands can be accessed via the \fI\-h\fR or \fI\-\-help\fR flags. For example, to get help about the selection function, \fIs \-h\fR or \fIs \-\-help\fR.
.sp
A convenient way of getting full information about \fBclifm\fR commands is via the \fIih\fR action, bound by default to the interactive help plugin (\fIihelp.sh\fR). Enter \fIih\fR to run the plugin (it depends on \fBfzf\fR(1)) and select the command you want to obtain information about.
.sp
For a quick introduction jump to the \fBEXAMPLES\fR section at the bottom of this document.

.SH 2. DESCRIPTION
\fBClifm\fR is a \fBC\fRommand \fBL\fRine \fBI\fRnterface \fBF\fRile \fBM\fRanager. This is its main feature and strength: all input and interacion is performed via commands typed in a prompt. In other words, \fBclifm\fR is a REPL, since it's basic structure is simply this: \fBR\fRead (user input via a command line), \fBE\fRvaluate/\fBE\fRxecute the command, \fBP\fRrint the results, \fBL\fRoop (start all over again).
.sp
Unlike most terminal file managers out there, indeed, \fBclifm\fR replaces the traditional TUI interface (also known as curses or text\-menu based interface) by a simple command\-line interface (REPL). In this sense, it is a file manager, but also \fBa shell extension\fR: search for files, copy, rename, and trash some of them, but, at the same time, update/upgrade your system, add some cronjob, stop a service, and run nano (or vi, or emacs, if you like).
.sp
Simply put, with \fBclifm\fR the command\-line is still there, never hidden, but enriched with file management oriented functionalities.

.SH 3. PARAMETERS
.SH POSITIONAL PARAMETERS
.TP
If the first non\-option parameter is a directory, \fBclifm\fR will start in this directory (for example, the command \fIclifm\ /etc\fR instructs \fBclifm\fR to start in the directory \fI/etc\fR).
.TP
If not specified, the first workspace is used. To start in a different workspace use the \fI\-w\fR option (for instance, \fIclifm\ \-w4\ /etc\fR).
.TP
If no positional parameter, and the \fI\-w\fR option is not used, \fBclifm\fR starts by default in the last visited directory (and in the last active workspace). To disable this behavior use \fI\-\-no\-restore\-last\-path\fR (see below).

.SH OPTIONS
.TP
\fBNote\fR: If compiled in POSIX mode, the following list of options does not apply. In this case, run \fIclifm \-h\fR to get the actual list of options. (To make sure run \fIclifm \-v\fR: if compiled in POSIX mode the version number is followed by "\-POSIX").
.TP
\fB\-a\fR, \fB\-\-show\-hidden\fR
do not ignore entries starting with .
.TP
\fB\-A\fR, \fB\-\-no\-hidden\fR
ignore entries starting with .
.TP
\fB\-b\fR, \fB\-\-bookmarks\-file\fR=\fI\,FILE\/\fR
set an alternative bookmarks file
.TP
\fB\-c\fR, \fB\-\-config\-file\fR=\fI\,FILE\/\fR
set an alternative configuration file
.TP
\fB\-D\fR, \fB\-\-config\-dir\fR=\fI\,DIR\/\fR
set an alternative configuration directory (if configuration files do not exist already, they will be created in \fIDIR\fR).
.TP
\fB\-e\fR, \fB\-\-no\-eln\fR
do not print ELN's (entry list number) at the left of file names. Bear in mind, however, that though ELN's are not printed, they are still there and can be used as always.
.TP
\fB\-E\fR, \fB\-\-eln\-use\-workspace\-color\fR
ELN's use the current workspace color
.TP
\fB\-f\fR, \fB\-\-dirs\-first\fR
list directories first
.TP
\fB\-F\fR, \fB\-\-no\-dirs\-first\fR
do not list directories first
.TP
\fB\-g\fR, \fB\-\-pager\fR
enable \fIMas\fR, the built-in pager for files listing
.TP
\fB\-G\fR, \fB\-\-no\-pager\fR
disable the files pager
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help and exit
.TP
\fB\-H\fR, \fB\-\-horizontal\-list\fR
list files horizontally (instead of vertically)
.TP
\fB\-i\fR, \fB\-\-no\-case\-sensitive\fR
ignore case distinctions when listing files
.TP
\fB\-I\fR, \fB\-\-case\-sensitive\fR
do not ignore case distinctions when listing files
.TP
\fB\-k\fR, \fB\-\-keybindings\-file\fR=\fI\,FILE\/\fR
set an alternative keybindings file
.TP
\fB\-l\fR, \fB\-\-long\-view\fR
print file extended metadata next to file names. Displayed fields can be customized via \fI\-\-prop\-fields\fR (\fIPropFields\fR in the configuration file). Set a custom time/date format using \fI\-\-time\-style\fR (\fITimeStyle\fR in the configuration file).
.TP
\fB\-L\fR, \fB\-\-follow\-symlinks\-long\fR
when running in long view, show information for the file symbolic links reference rather than for the symbolic links themselves
.TP
\fB\-m\fR, \fB\-\-dirhist\-map\fR
enable the directory history map to keep in view previous, current, and next entries in the directory history list
.TP
\fB\-o\fR, \fB\-\-autols\fR
the \fIcd\fR command changes directory \fBand\fR lists files automatically
.TP
\fB\-O\fR, \fB\-\-no\-autols\fR
the internal \fIcd\fR command works like the shell \fIcd\fR command: change directory but \fBdo not\fR list files automatically
.TP
\fB\-P\fR, \fB\-\-profile\fR=\fI\,PROFILE\/\fR
use \fIPROFILE\fR as profile. If \fIPROFILE\fR does not exist, it will be created. The default profile is \fIdefault\fR.
.TP
\fB\-r\fR, \fB\-\-no\-refresh\-on\-empty\-line\fR
do not refresh the current list of files when pressing \fIEnter\fR on an empty line
.TP
\fB\-s\fR, \fB\-\-splash\fR
enable the splash screen
.TP
\fB\-S\fR, \fB\-\-stealth\-mode\fR
in stealth mode (also known as incognito or private mode) no trace is left on the host system. Nothing is read from files nor any file is created: all settings are set to the default values. However, most settings can still be controlled via command line options and dedicated environment variables (see the \fBENVIRONMENT\fR section below). Take a look as well to the \fIhistory\fR command and the \fI\-\-no\-history\fR command line switch.
.TP
\fB\-t\fR, \fB\-\-disk\-usage\-analyzer\fR
run in disk usage analyzer mode. Equivalent to \fI\-\-sort=size \-\-long\-view \-\-full\-dir\-size \-\-no\-dirs\-first\fR. The total size of the current directory, plus the name and size of the largest file, will be printed after the list of files. Press \fICtrl\-Alt\-i\fR (or \fIAlt\-TAB\fR) to toggle this mode on/off in\-place.
.TP
\fB\-T\fR, \fB\-\-trash\-dir\fR=\fI\,DIR\/\fR
set an alternative trash directory
.TP
\fB\-v\fR, \fB\-\-version\fR
show version details and exit
.TP
\fB\-w\fR, \fB\-\-workspace\fR=\fI\,NUM\/\fR
start in workspace \fINUM\fR. By default, \fBclifm\fR will recover the last visited directory for each workspace. However, you can override this behaviour using positional parameters to start in workspace \fINUM\fR and in path \fIPATH\fR. E.g.: \fIclifm -w4 /etc\fR.
.TP
\fB\-x\fR, \fB\-\-no\-ext\-cmds\fR
disallow the use of external (shell) commands
.TP
\fB\-y\fR, \fB\-\-light\-mode\fR
enable the light mode to speed up \fBclifm\fR. See the \fBNOTE ON SPEED\fR section below.
.TP
\fB\-z\fR, \fB\-\-sort\fR=\fI\,METHOD\/\fR
sort files by \fIMETHOD\fR, where \fIMETHOD\fR is one of: 0 = none, 1 = name, 2 = size, 3 = atime, 4 = btime, 5 = ctime, 6 = mtime, 7 = version, 8 =  extension, 9 = inode, 10 = owner, 11 = group, 12 = blocks, or 13 = links. Both numbers and strings are allowed. E.g: \fI\-\-sort=9\fR or \fI\-\-sort=inode\fR.
.TP
\fB\-\-bell\fR=\fI\,TYPE\/\fR
set the terminal bell type, where TYPE is: 0 = none, 1 = audible, 2 = visible (requires readline >= 8.1), and 3 = flash. Defaults to \fB1\fR (\fBvisible\fR), and, if not available, \fB0\fR (\fBnone\fR). Only numbers are allowed.
.TP
\fB\-\-case\-sens\-dirjump\fR
do not ignore case when consulting the jump database (via the \fIj\fR command)
.TP
\fB\-\-case\-sens\-path\-comp\fR
enable case sensitive path completion
.TP
\fB\-\-cd\-on\-quit\fR
write the last visited directory to \fI$XDG_CONFIG_HOME/clifm/.last\fR to be later accessed by the corresponding shell function at program exit. Consult the \fBSHELL FUNCTIONS\fR section below for more information.
.TP
\fB\-\-color\-scheme\fR=\fI\,NAME\/\fR
use the color scheme named \fINAME\fR
.TP
\fB\-\-color\-links\-as\-target\fR
colorize symbolic links using the target file color
.TP
\fB\-\-cwd\-in\-title\fR
print the current working directory in the terminal window title (otherwise, only the program name is printed)
.TP
\fB\-\-data\-dir=\fI\,DIR\/\fR
load data files, such as plugins, color schemes, and default configuration files, from \fIDIR\fR 
.TP
\fB\-\-desktop\-notifications\fR
enable desktop notifications. Enter \fIhelp desktop\-notifications\fR in \fBclifm\fR for more information.
.TP
\fB\-\-disk\-usage\fR
show disk usage for the file system the current directory belongs to (in the form \fIfree/total (free-percentage) fs-type dev-name\fR)
.TP
\fB\-\-full\-dir\-size\fR
when running in long view, print the full (or total) size of directories
.TP
\fB\-\-fuzzy\-algo\fR=\fI\,VER\/\fR
fuzzy matching algorithm, where \fIVER\fR is either \fI1\fR (faster, but not Unicode aware), or \fI2\fR (slower, Unicode aware). Bear in mind however that the second algorithm will fallback to the first one (because it's faster) whenever the query string contains only ASCII characters, to minimize thus the performance penalty.
.TP
\fB\-\-fuzzy\-matching\fR
enable fuzzy matches for filename/path completions and suggestions
.TP
\fB\-\-fzfpreview\-hidden\fR
enable file previews for TAB completion (fzf mode only) with the preview window hidden (toggle it via \fIAlt\-p\fR)
.TP
\fB\-\-fzftab\fR
use \fIfzf\fR to display completion matches
.TP
\fB\-\-fnftab\fR
use \fIfnf\fR to display completion matches
.TP
\fB\-\-icons\fR
enable icons
.TP
\fB\-\-icons\-use\-file\-color\fR
instead of a specific color, icons take the color of the corresponding file name (specified either via file type or file extension). Useful when building custom color schemes. This option implies \fB\-\-icons\fR. Only if compiled with support for either icons\-in\-terminal or Nerdfonts. The default build is compiled with emoji\-icons support, in which case this option is ignored (Unicode icons has their own color built\-in)
.TP
\fB\-\-int\-vars
allow the use of internal variables (e.g.: \fIVAR=/bin; cd $VAR\fR)
.TP
\fB\-\-list\-and\-quit\fR
list files and quit. Useful in conjunction with positional parameters. E.g.: \'clifm \-\-list\-and\-quit /etc\'
.TP
\fB\-\-ls\fR
short for \fI\-\-list\-and\-quit\fR
.TP
\fB\-\-lscolors\fR
read file colors from the \fBLS_COLORS\fR environment variable (GNU ls only). Bear in mind that clifm-specific colors (like empty directory or inaccessible file) will be disabled. Note also that colors for specific file names, as defined in \fBLS_COLORS\fR, are not supported. Consult \fBdircolors\fR(1) for more information.
.TP
\fB\-\-max\-dirhist\fR
maximum number of visited directories to remember
.TP
\fB\-\-max\-files\fR=\fI\,NUM\/\fR
list only up to \fINUM\fR files. Use \-1 or \'unset\' to remove the files limit (default). See the \fImf\fR command for a more detailed description.
.TP
\fB\-\-max\-path\fR=\fI\,NUM\/\fR
set the maximum number of characters after which the current directory in the prompt line will be abbreviated to the directory base name (whenever the \fI\\z\fR code is used in the prompt)
.TP
\fB\-\-mnt\-udisks2\fR
use \fIudisks2\fR instead of \fIudevil\fR (default), for the \fImedia\fR command
.TP
\fB\-\-no\-apparent\-size\fR
print file sizes as used blocks (actual device usage) instead of used bytes (apparent size)
.TP
\fB\-\-no\-bold\fR
disable bold colors (applies to all color schemes)
.TP
\fB\-\-no\-cd\-auto\fR
by default, \fBclifm\fR changes directories by just specifying the corresponding ELN (e.g. \'12\' instead of \'cd 12\'). This option forces the use of \fIcd\fR.
.TP
\fB\-\-no\-classify\fR
by default, \fBclifm\fR appends a file type indicator character to file names when running with no colors (see the \fB\-\-no\-color\fR option below) and a directory indicator (plus a files counter) when running with colors. Classification characters are: 
 /n: directories (n = files counter)
 @:  symbolic links
 !:  broken symbolic links
 |:  fifo/pipes
 =:  sockets
 *:  executable files
 +:  block devices
 -:  character devices
 ?:  unknown file type
Use this option to disable file type classification.
.TP
\fB\-\-no\-clear\-screen\fR
do not clear the screen before listing files
.TP
\fB\-\-no\-color\fR
disable colors
.TP
\fB\-\-no\-columns\fR
disable columns for files listing (use a single column)
.TP
\fB\-\-no\-dir\-jumper\fR
disable the directory jumper function
.TP
\fB\-\-no\-file\-cap\fR
do not check file capabilities when listing files (only meaningful for performance reasons)
.TP
\fB\-\-no\-file\-ext\fR
do not check file extensions (mostly used to colorize specific file names) when listing files
.TP
\fB\-\-no\-files\-counter\fR
disable the files counter for directories (speeding up this the listing process: counting files in directories is particularly expensive).
.TP
\fB\-\-no\-follow\-symlinks\fR
do not follow symbolic links when listing files (links to directories will be listed as regular files). Overrides both \fI\-L\fR and \fI\-\-color\-links\-as\-target\fR.
.TP
\fB\-\-no\-fzfpreview\fR
disable file previews for TAB completion (fzf mode only)
.TP
\fB\-\-no\-highlight\fR
disable syntax highlighting. To customize highlighting colors see the \fBCOLOR CODES\fR section below.
.TP
\fB\-\-no\-history\fR
do not write commands into the history file (see also the \fIHistIgnore\fR option in the configuration file)
.TP
\fB\-\-no\-open\-auto\fR
same as \fI\-\-no\-cd\-auto\fR, but for files instead of directories
.TP
\fB\-\-no\-refresh\-on\-resize\fR
do not attempt to refresh the list of files upon window's resize
.TP
\fB\-\-no\-restore\-last\-path\fR
by default, \fBclifm\fR saves the last visited directory for each workspace to be restored in the next session. Use this option to disable this behavior.
.TP
\fB\-\-no\-suggestions\fR
disable the auto\-suggestions system
.TP
\fB\-\-no\-tips\fR
disable startup tips
.TP
\fB\-\-no\-trim\-names\fR
do not trim file names (see \fIMaxFilenameLen\fR in the configuration file)
.TP
\fB\-\-no\-warning\-prompt\fR
disable the warning prompt (used to highlight invalid command names)
.TP
\fB\-\-no\-welcome\-message\fR
disable the welcome message
.TP
\fB\-\-only\-dirs\fR
list directories only
.TP
\fB\-\-open\fR=\fI\,FILE\/\fR
run as a standalone resource opener: open \fIFILE\fR and exit, where FILE could be a regular file or a directory, using either standard notation (/dir/file) or the URI file scheme (file:///dir/file]), or a URL (www.domain or https://domain).
.TP
\fB\-\-opener\fR=\fI\,APPLICATION\/\fR
use APPLICATION (e.g.: \fIrifle\fR or \fIxdg\-open\fR) as files opener/launcher (instead of \fILira\fR, \fBclifm\fR's default opener).
.TP
\fB\-\-pager\-view\fR=\fI\,MODE\/\fR
list files in the pager according to MODE. Possible values: \fIauto\fR (use the current listing mode - this is the default), \fIlong\fR (list files in long view), and \fIshort\fR (list files in short view).
.TP
\fB\-\-physical\-size\fR
same as \fI\-\-no\-apparent\-size\fR
.TP
\fB\-\-preview\fR=\fI\,FILE\/\fR
display a preview of \fIFILE\fR (via \fIShotgun\fR) and exit. Use \fI\-\-shotgun\-file\fR to set an alternative confiuguration file via. Consult the \fBSHOTGUN\fR section below for more information.
.TP
\fB\-\-print\-sel\fR
print the list of selected files. The maximum number of selected files to be printed can be specified via the \fIMaxPrintSelfiles\fR option in the configuration file. Defaults to 0 (auto, i.e. never take more than half terminal height). Use \-1 to remove the limit or any other positive value.
.TP
\fB\-\-prop\-fields\fR=\fI\,FORMAT\/\fR
set fields to be displayed in long view mode. For information on how to construct this format string consult the \fIPropFields\fR option in the configuration file.
.TP
\fB\-\-ptime\-style\fR=\fI\,STYLE\/\fR
time/date style used by the \fIp/pp\fR command and the \fI\-\-stat\fR/\fI\-\-stat\-full\fR command line switches. Available styles: \fBdefault\fR, \fBiso\fR, \fBlong-iso\fR, \fBfull\-iso\fR, \fBfull\-iso\-nano\fR, \fB+FORMAT\fR. FORMAT is interpreted like in \fBstrftime\fR(3). Nano-second precision is available via the \fB%N\fR modifier (like in \fBdate\fR(1)).
.TP
\fB\-\-readonly\fR
run in read\-only mode (internal commands able to modify the file system are disabled). Disabled commands are: ac, ad, bb, bl/bleach, br/bulk, c, dup, l, le, m, md, n/new, oc, paste, pc, r, rr, t/trash, tag, te, u/undel/untrash, and vv, plus the shell commands cp, rm, mv, ln, mkdir, rmdir, link, and unlink.
.TP
\fB\-\-rl\-vi\-mode\fR
set readline to vi editing mode (defaults to emacs editing mode)
.TP
\fB\-\-secure\-cmds\fR
filter commands passed to the OS to mitigate command injection attacks (\fI\-\-secure\-env\fR is implied). Consult the \fBSECURITY\fR section below
.TP
\fB\-\-secure\-env\fR
run \fBclifm\fR in a secure environment (regular mode). Consult the \fBSECURITY\fR section below
.TP
\fB\-\-secure\-env\-full\fR
run \fBclifm\fR in a secure environment (full mode). Consult the \fBSECURITY\fR section below
.TP
\fB\-\-sel\-file\fR=\fI\,FILE\/\fR
set \fIFILE\fR as selections file
.TP
\fB\-\-share\-selbox\fR
make the Selection Box common (that is, accessible) to different profiles. By default, each profile has a private Selection Box.
.TP
\fB\-\-shotgun\-file\fR=\fI\,FILE\/\fR
set \fIFILE\fR as shotgun\'s configuration file. Only effective when running as a standalone files previewer via the \fI\-\-preview\fR switch. See the \fBSHOTGUN\fR section below for more information
.TP
\fB\-\-si\fR
print file sizes in powers of 1000, as defined by the International System of Units (SI), instead of 1024
.TP
\fB\-\-smenutab\fR
use \fIsmenu\fR to display completion matches
.TP
\fB\-\-sort\-reverse\fR
sort files in reverse order (e.g.: z\-a instead of a\-z)
.TP
\fB\-\-stat\fR \fI\,FILE...\/\fR
run the \fIp\fR command on FILE(s) and exit. This must be the \fBlast option\fR on the command line. Use \fI\-\-ptime\-style\fR to set a custom date/time format.
.TP
\fB\-\-stat\-full\fR \fI\,FILE..\/\fR
same as \fI\-\-stat, but it runs the \fIpp\fR command (instead of \fIp\fR) on FILE(s)
.TP
\fB\-\-stdtab\fR
use the standard mode (readline\'s built\-in) for TAB completion
.TP
\fB\-\-time\-style\fR=\fI\,STYLE\/\fR
time/date style used in long view. Available styles: \fBdefault\fR, \fBrelative\fR, \fBiso\fR, \fBlong-iso\fR, \fBfull-iso\fR, \fB+FORMAT\fR. FORMAT is interpreted like in \fBstrftime\fR(3).
.TP
\fB\-\-trash\-as\-rm\fR
the \fIr\fR command executes the built-in \'trash\' (see the \fIt\fR command) instead of \fBrm\fR(1) to prevent accidental deletions
.TP
\fB\-\-virtual\-dir\fR=\fI\,PATH\/\fR
use PATH as CliFM\'s virtual directory
.TP
\fB\-\-virtual\-dir\-full\-paths\fR
print file names in virtual directories as full paths instead of just base names
.TP
\fB\-\-vt100\fR
run in VT100 compatibility mode
.PP
Options precedence order: 1) command line flags; 2) configuration file; 3) default values.

.SH 4. COMMANDS
Help for all commands listed here can be accessed via the \fI\-h\fR or \fI\-\-help\fR options. For example: \fIp \-\-help\fR to get help about the properties function.
.sp
\fBNOTE:\fR ELN = Entry List Number. Example: in the line "12 openbox" (when listing files), 12 is the ELN corresponding to the file named "openbox". The slash followed by a number (/xx) after directories and symbolic links to directories (the files counter) indicates the amount of files contained by the corresponding directory, excluding self and parent directories ("." and ".." respectively).
.sp
\fBNOTE 2:\fR In case of ELN\-filename conflict the backslash can be used to prevent ELN expansion. For example, if we have at least two files and one of them is named "2", then \fBclifm\fR cannot know in advance if the command refers to the ELN 2 or to the file name "2". In we want the ELN, we just write the ELN number, for example: \fIs\ 2\fR. But if we want the file name, we need to escape the file name using the backlash character: \fIs\ \\2\fR.
.sp
\fBNOTE 3:\fR \fBclifm\fR supports \fBfused parameters\fR for internal commands taking an ELN or range of ELN\'s as parameters. Much like short options for command line programs, you can drop or omit the space between internal commands and the corresponding ELN passed as argument. In general, you can write \fICMDELN\fR instead of \fICMD\ ELN\fR. For example: \fIo12\fR or \fIs1\-5\fR instead of \fIo\ 12\fR and \fIs\ 1\-5\fR respectively. Bear in mind, however, that in thus omitting the space char TAB completion for ELN's will not be available. If there is a file named \fIo12\fR (more generally, CMDELN), and if you want to refer to this file instead of a \fBclifm\fR command, escape the file name to prevent the split; for example: \fIs\ \\o12\fR.
.sp
\fBNOTE 4:\fR \fBclifm\fR implements a \fBfastback\fR function, that is to say, the conversion of "... n" or "cmd ... n" into "../.. n" or "cmd ../.. n". In other words, subsequent dots after ".." will be converted each into "/..". For example, if you are in your home directory and type "..." or "cd ...", and since "..." amounts to "../..", you will be taken to the root directory. TAB completion is available for the fastback function: "....bin" \-> TAB \-> "../../../bin".

.TP
.B \fIFILE/DIR\fR
if the \fIautocd\fR and \fIauto-open\fR functions are enabled, which is the default value, open FILE or change directory to DIR. In other words, \fIFILE\fR amounts to \fIopen\ FILE\fR or \fIo\ FILE\fR, and \fIDIR\fR to \fIcd\ DIR\fR. ELN's, of course, are allowed. Example: \fI12\fR.
.TP
.B /\fIPATTERN\fR [\fI\-filetype\fR] [\fI\-x\fR] [\fIDIR\fR]
this is the \fBquick search\fR function. Type \fI/\fR followed by a glob or regular (or extended regular) expression, and \fBclifm\fR will list all matches in the current working directory. For example, both \fI/*.pdf\fR and \fI/.pdf$\fR expressions will list all PDF files in the current working directory, the former using wildcards, and the second a regular expression.
.sp
You can list previously used search patterns via TAB: \fI/*<TAB>\fR.
.sp
\fBNote\fR: By default, the search function attempts to resolve a pattern first as glob, and then, if no matches are found, as a regular expression. This behavior can be customizad however in the configuration file, via the \fISearchStrategy\fR option.
.sp
\fBNote 2\fR: If no further parameter is provided, but only a glob pattern (wildcards), you can expand the pattern into the corresponding matches via the TAB key. For example, to list all C files in the current directory: \fI/*.c\fR<TAB>.
.sp
\fBNote 3\fR: Expressions containing no pattern metacharacter are automatically transformed into a glob/regular expression (depending on the value of the \fISearchStrategy\fR option). For example, \fI/test\fR becomes \fI*test*\fR or \fI/.*test.*\fR.
.sp
\fB1. Case sensitivity\fR
.sp
By default, regular expressions are case insensitive (glob expressions, by contrast, are always case sensitive). However, you can enable case sensitive search by setting the \fICaseSensitiveSearch\fR option to \fItrue\fR in the configuration file.
.sp
\fB2. Destiny directory\fR
.sp
To search for files in any directory other than the current directory, specify the directory name as a further parameter. This parameter (DIR) could be an absolute path, a relative path, or an ELN. For example, enter \fI/^A\ 7\fR to search for all files starting with \'A\' in the directory corresponding to the ELN 7.
.sp
\fB3. File type filter\fR
.sp
The result of the search could be further filtered by specifying a filter type: \-b, \-c, \-d, \-f, \-l, \-p, \-s, \-D, and \-P (block device, character device, directory, regular file, symbolic link, FIFO/pipe, socket, door (Solaris), and port (Solaris) respectively. For example, \fI/[.\-].*d$\ \-d Documents/\fR will list all directories containing a dot or a dash and ending with \'d\' in the directory named \fIDocuments\fR.
.sp
\fB4. Negate a pattern\fR
.sp
The quick search function also supports invert search: prepend the exclamation mark (!) to negate a given search pattern. For example: \fI!.*s$\ \-d\ /etc\fR will match all directories in \fI/etc\fR NOT ending with \'s\', just as \fI!D*\fR will match all files in the current directory NOT starting with \'D\'.
.sp
\fB5. Recursive search\fR
.sp
To perform a recursive search use the \fI\-x\fR parameter, and, optionally, a search path (DIR) (file type filter is not allowed). The search will be performed using \fIfind\fR as follows: \fIfind\ DIR\ MODE PATTERN\fR. If no search path is provided, the search is executed starting in the current directory. Otherwise, the search starts in DIR. MODE is one of:
.sp
 \-name: \fISearchStrategy\fR is not \fIregex\-only\fR and \fICaseSensitiveSearch\fR is set to \fItrue\fR
.sp
 \-iname: \fISearchStrategy\fR is not \fIregex\-only\fR and \fICaseSensitiveSearch\fR is set to \fIfalse\fR
.sp
 \-regex: \fISearchStrategy\fR is \fIregex\-only\fR and \fICaseSensitiveSearch\fR is set to \fItrue\fR
.sp
 \-iregex: \fISearchStrategy\fR is \fIregex\-only\fR and \fICaseSensitiveSearch\fR is set to \fIfalse\fR
.TP
.B ;\fR[\fICMD\fR], \fB:\fR[\fICMD\fR]
If no CMD, run the system shell in the current working directory. If CMD is specified, skip all \fBclifm\fR expansions (see the \fBBUILT\-IN EXPANSIONS\fR section below) and run the input string (CMD) as is via the default system shell.
.TP
.B ac, ad \fIELN/FILE\fR...
archive/compress and dearchive/decompress one or multiple files and/or directories. The archiver function brings two modes: \fIac\fR, to generate archives or compressed files, and \fIad\fR, to decompress or dearchive files, either just listing, extracting, recompressing, or mounting their content. In this latter case, the mountpoint used automatically is \fI$HOME/.config/clifm/PROFILE/mounts/ARCHIVE_NAME\fR.
.sp
The function accepts single and multiple file names, wildcards, ELN ranges, and the 'sel' keyword. For example: \fIac\ sel\fR, \fIac\ 4\-25\ myfile\fR, or \fIad\ *.tar.gz\fR. Multiple archive/compression formats are supported, including Zstandard. When it comes to ISO 9660 files only single files are supported.
.sp
The archive mount function for non ISO files depends on \fBarchivemount\fR, while the remaining functions depend on \fBatool\fR and other third\-party utilities for achive formats support, for example, \fBp7zip\fR. \fBp7zip\fR is also used to manage most decompressing options for ISO 9660 files, except for mount, in which case \fBmount(8)\fR is used. Creation of ISO files is done via \fBgenisoimage\fR(1). For more information consult \fBatool\fR(1), \fBarchivemount\fR(1), \fBzstd\fR(1), and \fB7z\fR(1).
.TP
.B acd, autocd \fR[\fIon\fR, \fIoff\fR, \fIstatus\fR]
toggle the autocd function on/off. If set to on, \fIDIR\fR amounts to \fIcd\ DIR\fR.
.TP
.B actions \fR[\fIlist\fR] [\fIedit\fR [\fIAPP\fR]]
to list available actions (or plugins) use the \fIlist\fR subcommand. Note that, since \fIlist\fR is the default action, it can be omitted.
.sp
Use the \fIedit\fR subcommand to add, remove or modify custom actions (using APP if specified or the default associated application for text files otherwise).
.sp
The aim of this function is to allow the user to easily add custom commands and functions to \fBclifm\fR. In other words, the actions function is a plugins capability.
.sp
The general procedure is quite simple: a) edit the actions file (via \fIactions edit\fR) and bind a custom action name to an executable file (written in any language you want, be it a shell or Python script, a C program or whatever you like). Example: "myaction=myscript.sh". b) Now, drop the corresponding script (in our example, \fImyscript.sh\fR) into the plugins directory (see the \fBFILES\fR section below). 3) Once this is done, you can call the script using the custom action name defined before as if it were any other command: run \fImyaction\fR, and \fImyscript.sh\fR will be executed.
.sp
All arguments passed to the action command are passed to the script or program as well (which is executed via the system shell).
.sp
The plugins bundled with \fBclifm\fR (take a look at the plugins directory) could be used as a starting point to create new plugins.
.TP
.B alias \fR[\fIimport FILE\fR] [\fIls\fR,\fIlist\fR] [\fINAME\fR]
with no argument (or with \fIls,list\fR parameters), it prints the list of available aliases, if any. To get the description of a specific alias enter \fIalias\fR followed by the alias name. To write a new alias simply enter \fIedit\fR (or press F10) to open the configuration file and add a line like this: "alias name=\'command args...\'" or "alias name=\'directory\'".
.sp
To import aliases from a file, provided it contains aliases in the specified form, use the \fIimport\fR parameter. Aliases conflicting with some of the internal commands won\'t be imported.
.sp
However, a neat usage for the alias function is not so much to bind short keys to commands, but to files and directories visited regularly. In this way, it is possible to bind as many files or directories, no matter how deep they are in the file system, to very short strings, even single characters. For example, "alias w=\'/some/file/deep/in/the/filesystem\'. Now, no matter where we are, we can just enter \'w\', provided \fIautocd\fR and/or \fIauto\-open\fR function is enabled, to access the file or directory we want. Theoretically at least, this procedure could be repeated until the system memory is exhausted.
.sp
To create multiple aliases for files at once, this is the recommended procedure: 1) Select all files you want to alias with the \fIsel\fR function: \fIs\ file1\ file2\ file3\ ...\fR. 2) Export the selected files into a temporary file running \fIexp\ sel\fR; 3) Edit this file to contain only valid alias lines:

 alias a1=\'file1\'
 alias b1=\'file2\'
 alias c1=\'file3\'

NOTE: Make sure alias names do not conflict with other commands, either internal or external. To bypass the conflicts check, performed automatically by the \'alias import\' command, you can edit the aliases file manually (F10).

4) Finally, import this file with the \fIalias\fR function: \fIalias\ import\ tmp_file\fR. Now, you can access any of these files by entering just a few characters: a1, b1, and c1.
.TP
.B ao, auto\-open \fR[\fIon\fR, \fIoff\fR, \fIstatus\fR]
toggle the auto\-open function on/off. If set to on, \fIFILE\fR amounts to \fIopen\ FILE\fR.
.TP
.B b, back \fR[\fIh\fR, \fIhist\fR] [\fIclear\fR] [\fIW!ELN\fR]
unlike \fIcd\ ..\fR, which sends you to the parent directory of the current directory, this command (with no argument) sends you back to the previously visited directory.
.sp
\fBclifm\fR keeps a record of all visited directories (to prevent a directory from being added to the directory history list use the \fIDirhistIgnore\fR option in the main configuration file). You can see this list by typing \fIb\ hist\fR or \fIb\ h\fR, and you can access any element in this list by simply passing the corresponding ELN in this list to the \fIback\fR command. Example:
        :) > ~ $ bh
        1 /home/user
        2 /etc
        3 /proc
        :) > ~ $ b !3
        :) > /proc $
.sp
\fBNOTE:\fR the line printed in green indicates the current position of the \fIback\fR function in the directory history list.
.sp
Finally, you can also clear this history list by typing \fIb\ clear\fR.
.sp
The best way of navigating the directory history list, however, is via the \fIdirectory jumper\fR function. See the \fIj\fR command below. You can take a look at the \fIdh\fR command as well.
.TP
.B bb, bleach \fIELN/FILE\fR...
\fIBleach\fR is a built\-in file names cleaner (based on detox [\fIhttps://github.com/dharple/detox\fR]), whose main aim is to rename file names using only safe characters.
Bleach cleans file names up either by removing unsafe (extended\-ASCII/Unicode) characters without an ASCII alternative/similar character, or by translating these unsafe characters into an alternative ASCII character based on familiarity/similarity.
.sp
These following simple rules are used to compose clean/safe file names:
    \- NUL (\\0) and slash (/) characters are completely disallowed
    \- Only characters from the \fBPortable Filename Characters Set\fR (a\-zA\-Z0-9._\-) are allowed
    \- { [ ( ) ] } are replaced by a dash (\-). Everything else is replaced by an underscore (_)
    \- Unicode characters are translated, whenever possible, into an ASCII replacement. Otherwise, they are just ignored. For example, an upper case A with diacritic (accent, umlaut, diaresis, and so on) will be replaced by an ASCII A, but the smiley face emoji will be simply ignored. A few special signs will be translated into text, for instance, the pound sign will be replaced by "_pound_" and the Euro symbol by "EUR". Translations are made via a translation table (cleaner_table.h)
    \- File names never start with a dash (\-)
    \- Files named . and .. are not allowed
    \- Append .bleach to one character long file names
    \- Do not let a replacement file name start with a dot (hidden) if the original does not
    \- Max file name length is NAME_MAX (usually 255)
.sp
Modified file names will be listed on screen asking the user for confirmation, allowing besides to edit (by pressing 'e') the list of modified file names via a text editor.
.sp
If the replacement file name already exists, a dash and a number (starting from 1) will be appended. E.g.: file\-3.
.TP
.B bd \fR[\fINAME\fR]
\fIbd\fR is the \fBbackdir\fR function: it takes you back to the parent directory matching NAME.
.sp
With no arguments, \fIbd\fR prints a menu with all parent directories relative to the current directory, allowing the user to select an entry. Otherwise, it checks the absolute current directory against the provided query string (NAME): if only one match is found, it automatically changes to that directory; if multiple matches are found, the list of matches is presented to the user in a selection menu. If NAME is a directory name, \fIbd\fR just changes to that directory, be it a parent of the current directory or not.
.sp
TAB completion and suggestions are available for this function.
.sp
\fBExample\fR:
.sp
Provided that the current directory is \fI/home/user/git/repositories/lambda\fR, entering \fIbd git\fR will take you immediatelly to \fI/home/user/git\fR.
.sp
Note that there is no need to type the entire directory name; if the query is unambiguous, only a few characters, and even just one, suffices to match the appropriate directory. In our example, \fIbd g\fR is enough to take you to \fI/home/user/git\fR, just as \fIbd h\fR will take you to \fI/home\fR.
.sp
The query string could match any part of a directory name: \fIbd er\fR, for instance, will take you to \fI/home/user\fR, since it is an unambiguous query.
.TP
.B bl \fIFILE\fR...
Create symbolic links (in the current directory) for each specified file. For example, to create symbolic links in the directory \fIdir\fR for all PNG files in the current directory, issue these commands: \fIs *.png\fR, \fIcd dir\fR, and then \fIbl sel\fR.
.TP
.B bm, bookmarks \fR[\fIa\fR, \fIadd\fR \fIFILENAME\fR \fINAME\fR [\fISHORTCUT\fR]] [\fId\fR, \fIdel\fR [\fINAME\fR]] [\fIe, edit\fR [\fIAPP\fR]] [\fINAME\fR, \fISHORTCUT\fR]
Bookmarks can be manager either from the bookmarks manager screen or from the command line.
.sp
\fB1. The bookmarks manager screen\fR
.sp
To access the bookmarks manager screen simply enter \fIbm\fR. Here you can cd into the desired bookmark by entering either its ELN or name (regular files can be bookmarked as well). In this screen you can also add, remove, or edit your bookmarks by simply entering 'e' to edit the bookmarks file (which is simply a list of lines with this format: \fIname:path\fR. E.g.: "docs:/home/user/documents"). Make your changes, save, and exit.
.sp
\fB2. The command line\fR
.TS
allbox;
lb lb
l l.
Command	Description
T{
bm add /media/mount mnt
T}	Bookmark the \fI/media/mount\fR directory as "mnt"
T{
bm mnt
T}	Change to/open the bookmark named "mnt"
T{
bm del mnt
T}	Delete the bookmark named "mnt"
T{
bm edit
T}	Edit your bookmarks
.TE

.sp
A handy use for the bookmarks function is to create bookmarks using short names, which will be later easily accessible via TAB completion.
.sp
\fBThe b: construct\fR
.sp
The \fIb:\fR construct is used as a way to quickly access/operate on bookmarks. A few examples:
.TS
allbox;
lb lb
l l.
Command	Description
T{
b:<TAB>
T}	List available bookmarks
T{
b:net
T}	Change to the bookmark named "net" \fB(1)\fR
T{
p b:bm1 b:bm2
T}	Print file properties of the bookmarks named "bm1" and "bm2"
T{
s b:
T}	Select all bookmarks at once
.TE

.sp
 \fB(1)\fR If your are not sure about where a bookmark points to, type \fIb:NAME<TAB>\fR.
.TP
.B br, bulk \fIELN/FILE\fR... [:EDITOR]
rename at once all files passed as arguments to the function. It accepts single and multiple file names, wildcards, ELN ranges, and the \fIsel\fR keyword. Example: \fIbr\ myfile\ 4\-10\ sel\fR.
.sp
Each file name will be copied into a temporary file, which will be opened via EDITOR (default associated application for plain text files if omitted), letting the user modify it. Once the file has been modified and saved, the modifications are printed on the screen and the user is asked for confirmation.
.sp
This built\-in bulk rename function won\'t deal with deletions, replacements, file name conflicts and the like. For a smarter alternative use \fBqmv\fR(1).
.TP
\fBc\fR, \fBm\fR, \fBmd\fR, \fBr\fR
short for the following commands respectively: \fIcp\ \-iRp\fR, \fImv\ \-i\fR, \fImkdir\ \-p\fR, and \fIrm\fR (for files) or \fIrm\ \-r\fR (for directories).
.sp
Note that the \fIr\fR command prompts the user for confirmation (printing the list of files to be removed) if the list of files contains: 1. at least one directory, 2. three or more files, 3. at least one non\-explicitly\-expanded ELN (e.g.: \fIr 12\fR).
.sp
By default, the \fIc\fR, \fIm\fR, and \fIr\fR commands ask for confirmation before operations. Since this might sometimes be quite intrusive (specially when operating on large amount of files), it is possible to turn interactivity off in two different ways:

  a) For the current command only: via the \fI\-f\fR, \fI\-\-force\fR switch. Example: \fIc \-f sel\fR, \fIm \-f sel\fR, or \fIr \-f *\fR.

  b) Permanently. Use the \fIcpCmd\fR, \fImvCmd\fR, and \fIrmForce\fR options in the configuration file to permanently set any of these commands to non\-interactive mode.
.sp
To use these commands without any of these arguments, or with any other argument you want, use the non\-abbreviated (shell) command, for instance, \fIcp\fR instead of \fIc\fR. Of course, you can also create aliases to use you preferred commands, for example, "c=\'cp \-adp\'". Consult the \fIalias\fR command above for more information.
.sp
The \fIl\fR command allows the use of the \fIe, edit\fR option to modify the destination of a symbolic link. Example: \fIl\ edit\ 12\fR (or \fIle\ 12\fR)  to relink the symbolic link corresponding to the file whose ELN is 12.
.sp
When using the \fIsel\fR keyword and no destiny is provided, \fIc\fR and \fIm\fR will copy/move selected files into the current directory. Whenever \fIsel\fR is not used, but just a source file name (and no destiny is provided), the \fIm\fR command behaves much like the \fBimv\fR(1) shell command (from the \'renameutils\' package), providing an interactive renaming function: it prompts the user to enter a new name using the source file name as base, so that it does not need to be typed twice. For this alternative prompt, only TAB completion for file names is available.
.sp
\fBclifm\fR supports \fBadvcp\fR(1), \fIwcp\fR, and \fBrsync\fR(1) to copy files (they include a progress bar). To use them instead of \fBcp\fR(1) set the corresponding option (\fIcpCmd\fR) in the configuration file. If \fIadvcp\fR is selected, the command used is \fIadvcp\ \-giRp\fR (or \fIadvcp \-gRp\fR, for non\-interactive mode). If \fIrsync\fR, the command is \fIrsync\ \-avP\fR. \fIwcp\fR takes no argument.
.sp
\fBadvmv\fR(1) is also supported to move files (to add a progress bar to the move command). Use the \fImvCmd\fR option in the configuration file to choose this alternative implementation of \fImv\fR. In this case, the command used is \fIadvmv\ \-gi\fR (or \fIadvmv \-g\fR for non-interactive mode).

.TP
.B cd \fR[\fIELN/DIR\fR]
Change the current working directory to ELN/DIR.
.sp
Directories check order:
  1. If no argument, change to the home directory (\fBHOME\fR, or, if \fBHOME\fR is not set, the sixth field of the entry corresponding to the current user in \fI/etc/passwd\fR)
  2. If argument is an absolute path (begins with a slash character), or the first component is dot (.) or dot\-dot (..), convert to canonical form (via \fBrealpath\fR(3)) and, if a valid directory, change into that directory.
  3. Check \fBCDPATH\fR environment variable and append /DIR to each of the paths specified here. If the result of the concatenation is a valid directory, change into it.
  4. Check directories in the current working directory. If a matching directory is found, change to it.
.sp
You can use either ELN\'s or a string to indicate the directory you want. E.g.: \fIcd\ 12\fR or \fIcd\ ~/media\fR. If \fIautocd\fR is enabled (default), \fIcd\ 12\fR and \fIcd\ ~/media\fR could be written as \fI12\fR and \fI~/media\fR respectively as well.
.sp
Unlike the shell \fBcd\fR(1) command, \fBclifm\fR's built\-in \fIcd\fR function not only changes the current directory, but also lists its content (provided the option \fICdListsAutomatically\fR is enabled, which is the default) according to a comprehensive list of color codes. By default, the output of \fIcd\fR is much like this shell command: \fIcd\ DIR\ &&\ ls\ \-\-color=auto\ \-\-group\-directories\-first\fR.
.sp
Automatic files listing can be disabled by either setting \fIAutoLs\fR to "false" in the configuration file or running \fBclifm\fR with the \fI\-o\fR or \fI\-\-no\-autols\fR option.
.TP
.B cl, columns \fR[\fIon\fR, \fIoff\fR]
toggle columns on/off.
.TP
.B cmd, commands
show this list of commands. A more convenient way of getting information about \fBclifm\fR commands is via the interactive help plugin (depends on \fIfzf\fR), by default bound to the "ihelp" action name.
.TP
.B colors
preview the current color scheme
.TP
.B config \fR[\fIedit\fR [\fIAPP\fR]] [\fIreset\fR, \fIdump\fR]
Manage the main configuration file.
.sp
To edit the configuration file use the \fIedit\fR subcommand. If an application is specified (\fIconfig edit APP\fR), \fIAPP\fR will be used to open the file (otherwise, the default associated program will be used). Edit settings to your liking if necessary, save, and quit the editor. Changes are automatically applied. Note that, since \fIedit\fR is the default action, it can be omitted. Enter just \fIconfig\fR to open the configuration file, or \fIconfig APP\fR to open it using \fIAPP\fR.
.sp
Use the \fIreset\fR subcommand to generate a fresh configuration file and create a backup copy of the old one (named \fIclifmrc.YYYYMMDD@HH:MM:SS\fR).
.sp
The \fIdump\fR subcommand prints the list of settings (as defined in the main configuration file) with their current value. Those differing from the default values are highlighted, and the default value for the corresponding option is displayed in brackets.
.sp
\fBNOTE\fR: The \fIedit\fR command (though deprecated) can be used as well instead of \fIconfig\fR.
.TP
.B cs, colorschemes \fR[\fIedit\fR [\fIAPP\fR]] [\fIn\fR, \fIname\fR] [\fIp\fR, \fIpreview\fR] [\fINAME\fR]
with no arguments, list available color schemes (\fIcs name\fR (or \fIcs n\fR) to print the current color scheme name). 
.sp
To get a preview of the current color scheme use the \fIpreview\fR subcommand: \fIcs preview\fR.
.sp
Use the \fIedit\fR subcommand to open/edit the configuration file of the current color scheme (open with APP if specified or via the default associated application).
.sp
To switch color schemes, specify the color scheme name: \fIcs NAME\fR. (TAB completion is available: \fIcs <TAB>\fR).
.TP
.B d, dup \fIFILE\fR...
Duplicate files passed as parameters, either directories or regular files. The user will be asked for a destiny directory. Duplicated file names are generated by appending ".copy" to the basename of each source file. For example: \fId\ /my/file\fR will copy \fI/my/file\fR into the directory selected by the user as \fIfile.copy\fR. If \fIfile.copy\fR already exists, an extra suffix will be added as follows: \fIfile.copy\-N\fR, where N is a positive integer (starting at 1).
.sp
If \fBrsync\fR(1) is found, it will be used as follows: \fIrsync\ \-aczvAXHS\ \-\-progress\fR. Else, \fBcp\fR(1) will be used: \fIcp\ \-a\fR.
.TP
.B dh \fR[\fISTRING\fR] [\fIPATH\fR] [\fI!ELN\fR]
With no parameters, it prints the directory history list. To filter this list just pass a query string: only entries matching this query will be displayed. In both cases, TAB completion is available. For example: \fIdh down<TAB>\fR will list only those entries matching \fIdown\fR (fuzzily, if \fIfuzzy\-matching\fR is enabled).
.sp
To access a specific entry, you can pass the entry number preceded by an exclamation mark. For example, if you want the entry number 12, enter \fIdh !12\fR to change to the corresponding directory.
.sp
Finally, if an absolute path is passed as first parameter, \fIdh\fR works just as the \fIcd\fR command.
.sp
\fINote\fR: Take a look at the \fIj\fR command as well. Both commands deal with the list of visited directories, but in slightly different ways: while \fIdh\fR deals with the list of the last \fIMaxDirhist\fR entries (see the configuration file), the \fIj\fR command deals with the \fIranked\fR list of visited directories.
.TP
.B ds, desel \fR[\fI*\fR, \fIa\fR, \fIall\fR] [\fIFILE\fR]...
deselect one or more selected files.
.sp
If no parameter is passed, the user is prompted to either mark selected files to be deselected or to edit the selections file (entering \'e\') via a text editor to manually deselect files.
.sp
Use \fI*\fR, \fIa\fR or \fIall\fR to deselect all selected entries at once. E.g.: \fIds\ *\fR.
.sp
You can also pass the file name(s) (or ELN\'s) to be deselected as a parameter. For example: \fIds\ myfile\ 24\fR.
.sp
TAB completion is available for this command.
.TP
.B exp \fR[\fIFILE\fR]...
with no argument, export the list of files in the current working directory to a temporary file. Otherwise, export only those specified as further arguments: they could be directories, file names, ELN\'s or some search expression like "*.c".
.TP
.B ext \fR[\fIon\fR, \fIoff\fR, \fIstatus\fR]
toggle external commands on/off.
.TP
.B f, forth \fR[\fIh\fR, \fIhist\fR] [\fIclear\fR] [\fI!ELN\fR]
it works just like the \fIback\fR function, but it goes forward in the history record. Of course, you can use \fIf\ hist\fR, \fIf\ h\fR, and \fIf\ !ELN\fR.
.TP
.B  fc \fR[\fIon\fR, \fIoff\fR, \fIstatus\fR]
By default, \fBclifm\fR prints the amount of files contained by listed directories next to directories name. However, since this is an expensive feature, it might be desirable (for example, when listing files in a remote machine) to disable this feature. Use the \fIoff\fR subcommand to disable it. To permanently disable it, use the \fIFilesCounter\fR option in the configuration file.
.TP
.B ff, dirs\-first \fR[\fIon\fR, \fIoff\fR, \fIstatus\fI]
toggle list directories first on/off.
.TP
.B fs
print an extract from 'What is Free Software?', written by Richard Stallman.
.TP
.B ft, filter \fR[\fIunset\fR] [[\fI!\fR]REGEX,=FILE\-TYPE\-CHAR]
filter the current list of files, either by file name (via a regular expression) or file type (via a file type character).
.sp
With no argument, \fIft\fR prints the current filter. To remove the current filter use the \fIunset\fR option. To set a new filter enter \fIft\fR followed by a filter expression (use the exclamation mark to reverse the meaning of a filter). Examples:
.sp
Exclude hidden files:
 ft !^\.
.sp
List only files ending with .pdf:
 ft .*\\.pdf$
.sp
List only symbolic links:
 ft =l
.sp
Exclude socket files:
 ft !=s
.sp
The list of file type characters is included in the \fBFILE FILTERS\fR section below.
.sp
The filter will be lost at program exit. To permanently set a filter use the \fIFilter\fR option (in the configuration file) or the \fBCLIFM_FILTER\fR environment variable (consult the \fBENVIRONMENT\fR and the \fBFILE FILTERS\fR sections below).
.TP
.B fz \fR[\fIon\fR, \fIoff\fR]
Toggle full directory size on/off (only for long view mode).
.TP
.B hf, hh, hidden \fR[\fIon\fR, \fIoff\fR, status\fR]
toggle hidden files on/off.
.TP
.B history \fR[\fIedit\fR [\fIAPP\fR]] [\fIclear\fR] [\fI\-n\fR] [\fIon\fR, \fIoff\fR, \fIstatus\fR, \fIshow\-time\fR]
with no arguments, it prints the commands history list (use \fIshow\-time\fR to print timestamps as well). If \fIclear\fR is passed as argument, it will delete all entries in the history file. Use \fIedit\fR to open the history file and modify it if needed (the file will be opened with APP, if specified, or with the default associated application otherwise). \fI\-n\fR tells the \fIhistory\fR command to list only the last 'n' commands in the history list. Finally, you can disable history (subsequent entries won\'t be written to the history file) via \fIhistory\ off\fR (you can also use the \fIHistIgnore\fR option in the configuration file to prevent specific command lines from being added to the history list).
.sp
You can use the exclamation mark (!) to perform some history commands:
  !<TAB>: List history entries
  !!: Execute the last command.
  !n: Execute the command number \'n\' in the history list.
  !\-n: Execute the \'last \- n\' command in the history list.
  !STRING: Execute the command starting with STRING. TAB completion is available in this case: \fI!STRING<TAB>\fR.
.TP
.B icons \fR[\fIon\fR, \fIoff\fR]
toggle icons on/off
.TP
.B j [\fI\-\-purge\fR [\fINUM\fR]] [\fI\-\-edit\fR], jc, jl, jp \fR[\fISTR\fR]..., \fBje\fR
\fIj\fR is the fastest way of using \fBKangaroo\fR, a \fBdirectory jumper\fR function used to quickly navigate through the jump database (i.e. a database of visited directories).
.sp
With no argument, \fIj\fR just lists the entries in the jump database \fB(1)\fR, printing: \fBa)\fI order number of the corresponding entry, \fBb)\fI total sum of visits, \fBc)\fR days since the first visit, \fBd)\fI hours since the last visit, \fBe)\fR the rank value, and \fBf)\fR the directory name itself. An asterisk next to the rank value means that the corresponding directory will not be removed from the database, despite its rank, either becuase it has been visited in the lasat 24 hours, or because it is bookmarked, pinned, or currently active in some workspace.
.sp
\fB(1)\fR To prevent a directory from being added to the jump database use the \fIDirhistIgnore\fR option in the main configuration file.
.sp
Otherwise, if a query string is provided as parameter, \fIj\fR searches for this string in the database and cd into the best ranked matching entry. Example: \fIj\ Down\fR will probably take you to \fI/home/user/Downloads\fR, provided this directory has been already visited and is the best ranked match in the database. For a more detailed description of the matching algorithm see the \fBKANGAROO FRECENCY ALGORITHM\fR section below.
.sp
Multiple query strings could be passed to the function. For example, \fIj\ et\ mo\fR will first check for "et" in the jump database and then will further filter the search using the second parameter: "mo". It will most probably take you (again, provided the directory has been already visited and is the best ranked match) to \fI/etc/modprobe.d\fR directory. Bear in mind that if STR is an actual directory, \fIjump\fR will just cd into it without performing any query.
.sp
The backslash (\\) and the slash (/) could be used to instruct \fBKangaroo\fR to search for the string query only in the first or last path segment of each entry in the database respectively. Let\'s suppose we have two entries matching \fBsrc\fR in the database: \fI/media/src/images\fR and \fI/home/user/Downloads/clifm/src\fR. If the first entry is better ranked than the second, \fIj src\fR will match this first entry. However, if what we really want is the second entry, appending a slash to the query string instructs \fBKangaroo\fR to only match entries having src in the last path segment, here \fI/home/user/Downloads/clifm/src\fR.
.sp
Since it is not always obvious or easy to know where exactly a query string will take you, \fBclifm\fR (if the suggestions system is enabled) will print, at the right of the cursor, the path matched by \fBKangaroo\fR. If that is the actually intended path, press the Right arrow key to accept the suggestion. Otherwise, it will be ignored. You can also use TAB completion to print the list of matches for the current query string. For example: \fIj \- c<TAB>\fR to list all entries in the directory history list containing a dash (\-) and a \'c\'.
.sp
\fIj\fR accepts four modifiers: \'e\', \'p\' \'c\', and \'l\', the first standing for "edit", the second for "parent", the third for "child", and the last one for "list". Thus, \fIje\fR (or \fIj \-\-edit\fR) will open the jump database to be edited if needed; \fIjc\fR will search for files querying only child directories relative to the current working directory, while \fIjp\fR will do the same but for parent directories. Finally, \fIjl\fR just prints the matches for the given query string(s), but without changing the current directory. Examples:

.TS
allbox;
lb lb
l l.
Command	Description
T{
jp foo
T}	Change to the best ranked \fBparent\fR directory containing the string "foo".
T{
jc bar test
T}	Change to the best ranked \fBchild\fR directory containing the string "bar" and "test"
T{
jl foo
T}	Print all entries in the database containing the word "foo"
.TE

.sp
 \fB(1)\fR TAB completion is available to expand order numbers into the corresponding paths.
.sp
Use the \fI\-\-purge\fR option to shrink the database. Without further parameters, \fI\-\-purge\fR removes all non\-existent (un\-stat\'able) directories from the database. If a numeric parameter is passed, by contrast, all entries ranked below this number will be removed from the database. For example, \fIj \-\-purge 100\fR will remove all entries ranked below 100.
.sp
You can also manually edit the database file using the \fIje\fR (or \fIj \-\-edit\fR) command: edit whatever needs to be edited, save changes, and close the editor. This is useful, for example, to remove a specific entry/directory from the database (however, bear in mind that if the directory is in the directory history, it won't be removed from the jump database).
.sp
To mark an entry as permanent (prevent it from being removed from the database), follow any of these procedures:
 a. Bookmark it.
 b. Edit the jump database (\fIje\fR or \fIj --edit\fR) and prepend a plus sign (+) to the corresponding entry.
.sp
An alternative way of navigating the jump database is using the jumper plugin (located in the plugins directory and bound by default to the "++" action name), which uses \fIfzf\fR to enable fuzzy searches. Enter \fI++\fR to perform a fuzzy search over the jump database.
.sp
Take a look at the \fIdh\fR command as well.
.TP
.B k
if running in long view, toggle follow-links (\fIAlt\-+\fR is also available). See the \fI\-L,\-\-follow\-symlinks\-long\fR command line switch.
.TP
.B kk
toggle max-filename-len on/off (\fICtrl\-Alt\-l\fR is also available)
.TP
.B kb, keybinds \fR[\fIlist\fR] [\fIedit\fR [\fIAPP\fR]] [\fIconflict\fR] [\fIreset\fR] [\fIreadline\fR]
with no argument (or if the argument is \fIlist\fR), prints the current keyboard codes and their associated functions. To edit the keybindings file, use the \fIedit\fR option (the file will be opened with APP, if specified, or with the default associated application otherwise). If you somehow messed up your keybindings, you can check your keybindings for conflicts with the \fIconflict\fR option, or use the \fIreset\fR option to create a fresh keybindings file with the default values. To list readline keybindings, use the \fIreadline\fR option. Bear in mind that these keybindings are not provided by \fBclifm\fR, but by readline itself, and as such depend on the system settings (they can be customized however via the \fI~/.inputrc\fR file).
.TP
.B l, le
Create (\fIl\fR) or edit (\fIle\fR) symbolic links.
.sp
The syntax for the \fIl\fR command is: \fIl TARGET [LINK_NAME]\fR. Note that if \fILINK_NAME\fR is omitted, the symbolic link is created as \fITARGET_BASENAME.link\fR in the current directory.
.sp
By default, the link target is created literally (like \fIln -s\fR would). The link creation mode can be set via the \fILinkCreationMode\fR option in the configuration file. Available modes are: \fIabsolute\fR, \fIliteral\fR, and \fIrelative\fR (like \fIln -rs\fR would).
.sp
To edit the target of a symbolic link use the \fIle\fR command followed by the desired link name. The user will be prompted to enter a new link target, using the current one as template.
.TP
.B ll, lv \fR[\fIon\fR, \fIoff\fR]
Toggle long/detail view mode
.TP
.B lm \fR[\fIon\fR, \fIoff\fR]
Toggle the light mode on/off. This option, aimed at making files listing faster than the default mode, is especially useful for really old hardware or when working on remote machines (for more information see the \fBNOTE ON SPEED\fR section below).
.TP
.B log \fR[\fIcmd\fR [\fIlist\fR, \fIon\fR, \fIoff\fR, \fIstatus\fR, \fIclear\fR]] [\fImsg\fR [\fIlist\fR, \fIon\fR, \fIoff\fR, \fIstatus\fR, \fIclear\fR]]
Enable, disable, clear, list or check the status of the program logs, either message (errors and warnings) or command logs. Example: \fIlog cmd on\fR, to enable command logs, or \fIlog msg clear\fR, to clear/remove message logs.
.sp
Consult the \fBFILES\fR section below for information about how logs are written into the logs file.
.TP
.B media
.sp
\fBNOTE\fR: This command is Linux\-specific
.sp
List available storage devices and mount/unmount the selected one using either \fIudevil\fR or \fIudisks2\fR (at least one of these must be installed. \fIudevil\fR will be preferred over \fIudisks2\fR). If the device is unmounted, it will be automatically mounted, and if mounted, it will be automatically unmounted.
.sp
Though mountpoints are determined by the mounting application itself (\fIudevil\fR or \fIudisks2\fR), \fBclifm\fR will automatically cd into the corresponding mountpoint whenever the mount operation was succesfull.
.sp
When unmounting, and if the current directory is inside the mountpoint, \fBclifm\fR will attempt to cd into the previous visited directory, and, if none, into the home directory, before unmounting the device.
.sp
To get information about a device, enter \fIiELN\fR, for example, \fIi12\fR, provided \'12\' is the ELN of the device you want.
.TP
.B mf \fR[\fINUM\fR, \fIunset\fR]
List only up to NUM files (valid range: >= 0). Use \fIunset\fR to list all files (default). An indicator (listed_files/total_files) will be printed below the list of files whenever some file is excluded from the current list (e.g. 20/310). Note however that though some files are excluded, all of them are loaded anyway, so that you can still perform any valid operation on them. For example, even if only 10 files are listed, you can still search for ALL symbolic links in the corresponding directory using the appropriate command: \fI/*\ \-l\fR.
.TP
.B mm, mime \fR[\fIopen FILE\fR] [\fIinfo FILE\fR] [\fIedit\fR [\fIAPP\fR]] [\fIimport\fR]
This is \fILira\fR, \fBclifm\fR's resource opener.
.sp
Use the \fIopen\fR subcommand to open a file with the default associated application. Note that, since \fIopen\fR is the default action, it can be omitted. For example: \fImm file.pdf\fR. The same can be achieved more easily via the \fIopen\fI command: \fIopen file.pdf\fR (or using the short command, \fIo file.pdf). Or, even shorter, just \fIfile.pdf\fR.
.sp
The \fIinfo\fR option prints MIME information about FILE: its MIME type, and, if any, the application associated to this file name or to the file's MIME type.
.sp
The \fIedit\fR option allows you to edit and customize the MIME list file. So, if a file has no default associated application, first get its MIME info or its file extension (running \fImm\ info\ FILE\fR), and then add a value for it to the MIME list file using the \fIedit\fR option (\fImm\ edit\fI or F6). Check the \fBRESOURCE OPENER\fR section below for information about the mimelist file syntax.
.sp
Finally, via the \fIimport\fR option \fBclifm\fR will try to import MIME associations from the system looking for \fImimeapps.list\fR files in those paths specified by the Freedesktop specification (see \fIhttps://specifications.freedesktop.org/mime\-apps\-spec/mime\-apps\-spec\-latest.html\fR). If at least one MIME association is successfuly imported, it will be stored as \fImimelist.clifm.XXXXXX\fR (where XXXXXX is a random six digits alphanumerical string). You can add these new associations to your mimelist file using the \fImime edit\fR command.
.TP
.B mp, mountpoints
list available mountpoints and change the current working directory to the selected mountpoint.
.TP
.B msg, messages \fR[\fIclear\fR]
with no arguments, prints the list of messages in the current session. The \fIclear\fR option tells \fBclifm\fR to empty the messages list.
.TP
.B n, new \fR[\fIFILE\fR]... [\fIDIR/\fR]...
create new empty files and/or directories.
.sp
If a file name ends with a slash (/), it will be taken as a directory name. Else, it will be created as a regular file. E.g.: \fIn\ myfile\ mydir/\fR, to create a file named \fImyfile\fR and a directory named \fImydir\fR. If no file name is provided, the user will be asked to enter one.
.sp
File name validation is performed over names before creation. In case of an unsafe name, the user is warned and asked for confirmation.
.sp
A name (namely, any component of a path) is considered unsafe if:
  1. Starts with a dash (\-): command option flags collision
  2. Is a reserved keyword/expression (internal): fastback (...), ELN/range (12, 1\-45), and MIME/file type expansion (@query, =x)
  3. Is a reserved system/shell keyword (\'~\', \'.\' ,\'..\')
  4. Contains embedded control characters (0x00\-0x1f in the ASCII table)
  5. Contains embedded shell meta\-characters (*?:[]"<>|(){}&'!\\;$)
  6. It is too long (larger than NAME_MAX, usually 255 bytes)
.sp
For more information about unsafe file names consult \fIhttps://dwheeler.com/essays/fixing\-unix\-linux\-filenames.html\fR.
.TP
.B net \fR[\fINAME\fR] [\fIlist\fR] [\fIedit\fR] [\fIm\fR, \fImount NAME\fR] [\fIu\fR, \fIunmount NAME\fR]
\fB1. The configuration file\fR
.sp
The \fInet\fR command manages connections to remote systems via a simple samba\-like configuration file (\fI$HOME/.config/clifm/profiles/PROFILE/nets.clifm\fR). Here you can specify multiple remotes and options for each of these remotes. Syntax example for this file:
.sp
 [remote_name]
 Comment=A nice descriptive comment
 Mountpoint=/path/to/mountpoint
 MountCmd=sudo mount.cifs //192.168.0.12/share %m \-o OPTIONS
 UnmountCmd=sudo umount %m
 AutoUnmount=true (Auto\-unmount this remote at exit)
 AutoMount=false (Auto\-mount this remote at startup)
.sp
\fBNote\fR: \fI%m\fR could be used as a placeholder for \fIMountpoint\fR. \fI%m\fR will be replaced by the value of \fIMountpoint\fR.
.sp
\fB1.a.\fR Mounting remote file systems
.sp
\fBA Samba share\fR:
  [samba_share]
  Comment=My samba share
  Mountpoint="~/.config/clifm/mounts/smb_share"
  MountCmd=sudo mount.cifs //192.168.0.26/samba_share %m \-o mapchars,credentials=/etc/samba/credentials/samba_share
  UnmountCmd=sudo umount %m
  AutoUnmount=false
  AutoMount=false

\fBA SSH file system (sshfs)\fR:
  [ssh_share]
  Comment=My ssh share
  Mountpoint="/media/ssh"
  MountCmd=sshfs user@192.168.0.26: %m \-C \-p 22
  UnmountCmd=fusermount3 \-u %m
  AutoUnmount=true
  AutoMount=false
.sp
\fB1.b.\fR Mounting local file systems
.sp
Though originally intended to manage remote file systems, \fInet\fR can also manage \fBlocal file systems\fR. Just provide the appropriate mount and unmount commands. Since the device name assigned by the kernel might change accross reboots (specially when it comes to removable drives), it is recommended to mount using the device\'s UUID (Universal Unique Identifier) instead of the drive name. For example:

  MountCmd=sudo mount \-U c98d91g4\-6781... %m

Here\'s an example of how to set up \fInet\fR to mount USB devices, one with a FAT file system, and another with an ISO9660 file system:

  [Sandisk USB]
  Comment=Sandisk USB drive
  Mountpoint="/media/usb"
  MountCmd=sudo mount \-o gid=1000,fmask=113,dmask=002 \-U 5847\-xxxx %m
  UnmountCmd=sudo umount %m
  AutoUnmount=false
  AutoMount=false

  [Kingston USB]
  Comment=Kingston USB drive
  Mountpoint="/media/usb2"
  MountCmd=sudo mount \-t iso9660 \-U 2020\-10\-01\-15\-xx\-yy\-zz %m
  UnmountCmd=sudo umount %m
  AutoUnmount=false
  AutoMount=false

\fBNOTE\fR: The \fIgid\fR, \fIfmask\fR, and \fIdmask\fR options are used to allow the user to access the mountpoint without elevated privileges.
.sp
If the device data is unknown, as it often happens when it comes to removable devices, you should use the \fImedia\fR command instead.
.sp
\fB2. Command syntax\fR
.sp
Without arguments (or via the \fIlist\fR subcommand), \fInet\fR lists the configuration for each remote available in the configuration file.
.sp
Use the \fIedit\fR option to edit the remotes configuration file. If no further argument is specified, the file will be opened with the current resource opener. However, you can pass an application as second parameter to open to configuration file. Example: \'net edit nano\'.
.sp
If not already mounted, the \fIm\fR, \fImount\fR option mounts the specified remote using the mount command and the mounpoint specified in the confifuration file and automatically cd into the corresponding mountpoint. Example: \fInet m smb_work\fR. Since \fImount\fR is the default action, it can be omitted: \fInet smb_work\fR.
.sp
The \fIu\fR, \fIunmount\fR option unmounts the specified remote using the unmount command specified in the configuration file. For example: \fInet u smb_work\fR. TAB completion is also available for this function.
.sp
\fBNOTE\fR: If you only need to copy some files to a remote location (including mobile phones) without the need to mount the resource, you can make use of the cprm.sh plugin, bound by default to the \fIcr\fR action. Set up your remotes (\fIcr \-\-edit\fR) and then send the file you want (\fIcr FILE\fR).
.TP
.B o, open \fIELN/FILE\fR [\fIAPPLICATION\fR]
open FILE, which can be either a directory, in which case it works just like the \fIcd\fR command (see above), a regular file, or a symbolic link to either of the two. For example: \fIo\ 12\fR, \fIo\ filename\fR, \fIo\ /path/to/filename\fR.
.sp
By default, the \fIopen\fR function will open files with the default application associated to them via \fILira\fR, the built\-in resource opener (see the \fImime\fR command above). However, if you want to open a file with a different application, add the application name as second argument, e.g. \fIo\ 12\ leafpad\fR or \fIo12\ leafpad\fR.
.sp
If you want to run the program in the background, simply add the ampersand character, as usual: \fIo\ 12\ &\fR, \fIo\ 12&\fR, \fIo12&\fR or (if auto\-open is enabled) just \fI12&\fR.
.sp
If the file to be opened is an archive/compressed file, the archive function (see the \fIad\fR command above) will be executed instead.
.TP
.B oc \fIELN/FILE\fR...
Interactively change files ownership
.sp
A new prompt is displayed using user and primary group common to all files passed as parameters as ownership template.
.sp
Ownership (both user and primary group, if specified) is changed for all files passed as parameters. If the file is a symbolic link, the operation is performed on the target file, and not on the symbolic link itself. Bear in mind that recursion is not supported: use \fBchown\fR(1) (with the \fI\-R\fR option) instead.
.sp
Both names and ID numbers are allowed (TAB completion for names is available).
.sp
If only a name/number is entered, it is taken as the user who owns the file(s).
.sp
Use the \fIpc\fR command to edit files permissions.
.TP
.B opener \fR[\fIdefault\fR] [\fIAPPLICATION\fR]
with no argument, prints the currently used resource opener (by default, \fILira\fR, \fBclifm\fR\'s built\-in opener). Otherwise, set APPLICATION (say \fIrifle\fR or \fIxdg\-open\fR) as opener or, if \fIdefault\fR is passed instead, use \fILira\fR.
.TP
.B ow \fIELN/FILE\fR [\fIAPPLICATION\fR]
If APPLICATION is specified, open ELN/FILE with APPLICATION. In case you need to add parameters to APPLICATION, it is recommended to quote the expression: \fIow FILE "APP ARG..."\fR.
.sp
If no APPLICATION is specified, the list of available applications associated to ELN/FILE (either via its MIME type or its file extension) is printed, allowing the user to choose one of these applications, and then open the file with the selected application.
.sp
This command supports TAB completion. Type "\fIow filename <TAB>\fR" and those applications able to open ELN/FILE will be listed.
.TP
.B p, pp, prop \fIELN/FILE\fR...
print file properties for ELN/FILE. The output of this function is much like the combined output of \fIls\ \-l\fR and \fIstat\fR.
.sp
By default, directories size is not shown. Use \fIpp\fR instead of just \fIp\fR to print directories size as well (it could take longer depending on the directory's content). On the other side, and unlike \fIp\fR, \fIpp\fR provides information about the dereferenced symlinks (namely, the symlink target) instead of the symlink itself. However, note that, in case of symbolic links to directories, \fIp\fR provides information about the link \fItarget\fR if the provided file name ends with a slash. Otherwise, information about the link \fIitself\fR is displayed.
.sp
The time format used to display time information can be customized via the \fIPTimeStyle\fR option in the configuration file (defaults to "%Y\-%m\-%d %H:%M:%S.%N %z", where %N stands for nano\-second precision).
.sp
If you need to list the properties of all files in the current directory, try the long view mode (\fIll\fR or \fIAlt\-l\fR). Fields displayed in this mode can be customized using the \fIPropFields\fR option in the configuration file. For custom timestamp formats use the \fITimeStyle\fR option.
.sp
For more information about file details consult the \fIfile\-details\fR help topic: \fIhelp file\-details\fR.
.TP
.B pc \fIELN/FILE\fR...
Interactively change files permissions (only traditional Unix permissions are supported).
.sp
A new prompt is displayed using actual permissions (in symbolic notation) of the file to be edited as template. If editing multiple files with \fIdifferent sets of permissions\fR, only shared permission bits are set in the permissions template.
.sp
Bear in mind that, if editing multiple files at once, say \fIpc sel\fR or \fIpc *.c\fR, the new permissions set will be applied to \fIall\fR of them.
.sp
Both symbolic and octal notation for the new permissions set are allowed.
.sp
Recursivelly setting file permissions is not supported. Use \fBchmod\fR(1) with the \fI\-R\fR flag instead.
.sp
If you just need to toggle the executable permission bit on a file, you can use the \fIte\fR command.
.sp
Use the \fIoc\fR command to edit files ownership.
.TP
.B pf, profile \fR[\fIls\fR, \fIlist\fR] [\fIset\fR, \fIadd\fR, \fIdel PROFILE\fR] [\fIrename PROFILE NEW_NAME\fR]
with no arguments, prints the name of the currently used profile. Use the \fIls\fR or \fIlist\fR option to list available profiles. To switch, add, delete, or rename a profile, use the \fIset\fR, \fIadd\fR, \fIdel\fR, and \fIrename\fR options respectively.
.TP
.B pg, pager \fR[\fIon\fR, \fIoff\fR, \fIonce\fR, \fIstatus\fR, [\fINUM\fR]]
toggle \fBMas\fR, the built\-in pager, on/off. Useful to list directories with hundreds or thousands of files, the pager will start working, if set to \fIon\fR, whenever the screen is not enough to list all files.
.sp
Set it to any positive integer greater than 1 to run the pager whenever the amount of files in the current directory is greater than or equal to this value, say 1000 (0 amounts to \fIoff\fR and 1 to \fIon\fR).
.sp
Set to \fIonce\fR to run the pager only once. Since this is the default parameter, \fIpg\fR (with no parameter) is equivalent to \fIpg once\fR. \fIAlt\-0\fR is also available.
.sp
While paging, the following keys are available:
.sp
 \fB?\fR, \fBh\fR: Help
 \fBDown arrow\fR, \fBEnter\fR, \fBSpace\fR: Advance one line
 \fBPage down\fR: Advance one page
 \fBq\fR: Stop paging (without printing remaining files)
 \fBc\fR: Stop paging (printing remaining files)
.sp
Note: To scroll lines up, use whatever your terminal emulator has to offer (e.g.: mouse scrolling or some keybinding).
.sp
By default, the pager lists files using the current listing mode (long or short). Use \fIPagerView\fR in the configuration file (or \fI\-\-pager\-view\fR in the command line) to force the use of a specific mode. Possibles values:
.sp
 \fBauto\fR: Use the current listing mode (default)
 \fBlong\fR: List files in long view
 \fBshort\fR: List files in short view
.TP
.B pin \fR[\fIFILE/DIR\fR]
pin a file or a directory to be accessed later via the comma (,) keyword. For example, run \fIpin mydir\fR and then access \fImydir\fR as follows: \fIcd\ \,\fR where the comma is automatically expanded to the pinned file, in this case \fImydir\fR. The comma keyword could be used with any command, either internal or external, e.g, \fIls\ \,\fR.
.sp
With no arguments, the \fIpin\fR command prints the current pinned file, if any. If an argument is given, it will be taken as a file name to be pinned. Running this command again, frees the previous pinned file and sets a new one. In other words, only one pin is supported at a time. 
.sp
An easy alternative to create as many pins or shortcuts as you want, and how you want, is to use the \fIalias\fR function. Bookmarks could also be used to achieve a very similar result.
.sp
At program exit, the pinned file is written to a file in the configuration directory (as .pin) to be loaded in the next session.
.TP
.B prompt \fR[\fIset\fR NAME] [\fIlist\fR] [\fIedit\fR [APP]] [\fIunset\fR] [\fIreload\fR]
Manage \fIclifm\fR's prompts. Use the \fIset\fR subcommand to temporarily change the current prompt to the prompt named NAME (use the \fIunset\fR subcommand to unset the current prompt and set the default one). Available prompts (which can be listed via \fIprompt list\fR or \fIprompt set <TAB>\fR) are defined in the prompts file (\fI$HOME/.config/clifm/prompts.clifm\fR). To permanently set a prompt, edit your color scheme file (via the \fIcs edit\fR command) and set \fIPrompt\fR to either a prompt code or a prompt name (as defined in the prompts file).
.TP
.B q, quit, exit
Quit \fBclifm\fR.
.TP
.B rf, refresh
refresh the screen, that is, reprint files in the current directory and update the prompt. If the current directory is not accessible for any reason, \fIrf\fR will go up until it finds an accessible one and then will change to that directory.
.TP
.B rl, reload
Reload all settings, except those passed as command line arguments, from the configuration file.
.TP
.B rr \fR[\fIDIR\fR] [\fIEDITOR\fR]
Remove files and/or directories in bulk using a text editor.
.sp
\fIrr\fR sends all files in \fIDIR\fR (or in the current directory if \fIDIR\fR is omitted) to a temporary file and opens it using \fIEDITOR\fR (or the default associated application for \fItext/plain\fR MIME type, if \fIEDITOR\fR is omitted).
.sp
Once in the editor, remove the lines corresponding to the files you want to delete. Save changes and close the editor. Removed files will be listed and the user asked for confirmation.
.TP
.B s, sel \fIELN/FILE\fR... [[\fI!\fR]\fIPATTERN\fR] [\fI\-filetype\fR] [\fI:PATH\fR]
send one or multiple files (either regular files or directories) to the Selection Box. \fIsel\fR accepts individual elements, range of elements, say 1\-6, file names and paths, just as wildcards (globbing) and regular expressions. Example: \fIs 1 4\-10 ^r file* filename /path/to/filename\fR.
.sp
If not in light mode, once a file is selected, and if the file is in the current working directory, the corresponding file name will be marked with an asterisk (colored according to the value of \fIli\fR in the color scheme file (by default bold green)), at the left of the file name (and at the right of its ELN).
.sp
Just as in the \fIsearch\fR function, it is also possible to further filter the list of matches indicating the desired file type. For instance, \fIs ^ \-d\fR will select all directories in the current working directory. For available file type filters see the \fIsearch\fR function above.
.sp
By default, the selection function operates on the current working directory. To select files in any other directory use the ":PATH" expression. For example, to select all regular files with a .conf extension in the /etc directory, the command would be: \fIs\ .*\\.conf$\ \-f :/etc\fR, or using wildcards: \fIs *.conf \-f\ :/etc\fR. Of course, you can also do just \fIs \-f /etc/*.conf\fR.
.sp
Just as in the case of the \fIsearch\fR function, inverse matching is supported for patterns, either wildcards or regular expressions. To invert the meaning and action of a pattern, prepend an exclamation mark (!). E.g., to select all non\-hidden regular files in the Documents directory, issue this command: \fIs !^\.\ \-f :Documents\fR, or, to select all directories in /etc, except those ending with ".d": \fIs !*.d \-d :/etc\fR.
.sp
Glob and regular expressions could be used together. For example: \fIs ^[r|R].*d$ /etc/*.conf\fR will select all files starting with either 'r' or 'R' and ending with 'd' in the current working directory, plus all .conf files in the \fI/etc\fR directory. However, this use is discouraged if both patterns refer to the same directory, since the second one will probably override the result of the first one.
.sp
It is important to note that glob expressions are evaluated before regular expressions, in such a way that any pattern that could be understood by both kinds of pattern matching mechanisms will be evaluated first according to the former, that is, as a glob expression. For example, '.*', as regular expression, should match all files. However, since glob expressions are evaluated first, it will only match hidden files. To select all files using a glob expression, try \'.* *\', or, with a regular expression: \'^\' or \'(.*?)\'. The keyboard shortcut \fIAlt\-a\fR is also available to perform the same operation.
.sp
The Selection Box is accessible from different instances of the program, provided they use the same profile (see the \fIprofile\fR command below). By default, indeed, each profile keeps a private Selection Box, being thus not accessible to other profiles. You can nonetheless modify this behavior via the \fIShareSelbox\fR option in the configuration file. If \fIShareSelbox\fR is enabled, selected files are stored in \fI/tmp/clifm/username/.selbox.clifm\fR. Otherwise, \fI/tmp/clifm/username/.selbox_profilename.clifm\fR is used (this is the default).
.sp
\fBOperating on selected files\fR
.sp
To operate on one or more selected files use the \fIsel\fR keyword (\fIs:\fR can be used as well). For example, to print the file properties of all selected files: \fIp sel\fR (or \fIp s:\fR). Use \fIs:<TAB>\fR to list selected files (multi\-selection is available if running in FZF mode).
.sp
\fBListing selected files\fR
.sp
To list selected files use the \fIsb\fR command (standing for Selection Box). You can also type \fIs:<TAB>\fR.
.sp
\fBDeselecting files\fR
.sp
To deselect files use the \fIds\fR command. See above. You can also press \fIAlt\-d\fR to deselect all files at once.
.sp
\fBNote\fR:  If there is a file named \fIsel\fR in the current directory, use \fI./sel\fR to distinguish it from the \fIsel\fR keyword. For example, enter \fIp ./sel\fR to tell CliFM that you want to get the properties of the file named \fIsel\fR rather than the properties of the currently selected files.
.sp
For more information consult the \fBBUILT\-IN EXPANSIONS\fR section below.
.TP
.B sb, selbox
show the elements currently contained in the Selection Box.
.TP
.B splash
show the splash screen.
.TP
.B st, sort \fR[\fIMETHOD\fR] [\fIrev\fR]
with no argument, print the current sorting order. Else, sort files by METHOD, where METHOD is one of: 0 = none, 1 = name, 2 = size, 3 = atime, 4 = btime, 5 = ctime, 6 = mtime, 7 = version, 8 = extension, 9 = inode, 10 = owner, 11 = group, 12 = blocks, or 13 = links. Both numbers and names are allowed (e.g.: \fIst 3\fR or \fIst atime\fR). Bear in mind that methods 10 and 11 sort by owner and group ID number, \fBnot\fR by owner and group names. The default is \fIversion\fR.
.sp
By default, files are sorted from less to more (e.g.: from \'a\' to \'z\' if sorting by \fBname\fR). Use the \fIrev\fR subcommand to invert this order. E.g.: \fIst\ rev\fR or \fIst\ inode\ rev\fR. Switch back to the previous state running \fIst rev\fR again.
.TP
.B stats
print statistics about files in the current directory (not available in light mode).
.TP
.B t, trash \fR[\fIELN/FILE\fR]... [\fIls\fR, \fIlist\fR] [\fIclear\fR, \fIempty\fR] [\fIdel\fR [\fIFILE\fR]...]]
with no argument (or by passing the \fIls\fR option), it prints the list of currently trashed files. The \fIclear\fR or \fIempty\fR parameter removes all files from the trash can, while the \fIdel\fR parameter lists trashed files allowing the user to remove one or more of them. If using \fIdel\fR, TAB completion to list/select currently trashed files is available.
.sp
The trash directory is \fI$XDG_DATA_HOME/Trash\fR, usually \fI~/.local/share/Trash\fR. Since this trash system follows the Freedesktop specification, it is able to handle files trashed by different Trash implementations.
.sp
To restore trashed files (to their original location) see the \fIundel\fR command below.
.TP
.B tag \fR[\fIadd\fR, \fIdel\fR, \fIlist\fR, \fIlist\-full\fR, \fInew\fR, \fImerge\fR, \fIrename\fR, \fIuntag\fR] [\fIFILE\fR]... [[\fI:\fR]\fITAG\fR]
\fItag\fR is the main \fIEtiqueta\fR command, \fBclifm\fR's built\-in files tagging system. See the \fBFILE TAGS\fR section for a complete description of this command.
.TP
.B te \fIFILE\fR...
toggle executable bit (on user, group, and others) on FILE(s). It is equivalent to the \fB\-x\fR and \fB+x\fR options for the \fBchmod\fR(1) command.
.TP
.B tips
print the list of \fBclifm\fR tips
.TP
.B u, undel, untrash \fR[\fI*\fR, \fIa\fR, \fIall\fR] [\fIFILE\fR]...
If file names are passed as parameters, undelete these files, that is, restore them to their original location. Otherwise, this function prints a list of currently trashed files allowing the user to choose one or more of these files to be restored. Use the \fI*\fR, \fIa\fR or \fIall\fR parameters to restore all trashed files at once. TAB completion to list/select currently trashed files is available.
.TP
.B unpin
this command takes no argument. It just frees the current pin and, if it exists, deletes the \fI.pin\fR file generated by the \fIpin\fR command..TP
.B vv \fIFILE\fR... \fIDIR\fR
copy FILE(s) into DIR and bulk rename them at once.
.TP
.B ver, version
show \fBclifm\fR version details.
.TP
.B view \fR[\fIedit\fR [\fIAPP\fR]]
preview files in the current directory (full screen). Requires \fBfzf\fR(1). Alt+\- is also available.
.sp
To edit the previewer configuration file, enter \fIview edit\fR, or \fIview edit vi\fR to open it with a specific application, in this case, \fBvi\fR(1).
.sp
By pressing Enter or Right, the currently highlighted file will be selected and \fIview\fR closed. To select multiple files, mark them with the TAB key and then press Enter or Right to confirm. To quit \fIview\fR press Escape or Left.
.sp
For \fBimage previews\fR consult the Wiki (\fIhttps://github.com/leo\-arch/clifm/tree/master/misc/tools/imgprev\fR).
.sp
For further information consult the \fBSHOTGUN\fR section below.
.TP
.B ws \fR[\fINUM/NAME\fR [\fIunset\fR], \fI+\fR, \fI\-\fR]
\fBclifm\fR offers up to eight workspaces, each with its own independent path.
.sp
With no argument, the \fIws\fR command prints the list of workspaces and its corresponding paths, highlighting the current workspace.
.sp
Use \fINUM\fR to switch to the workspace number NUM, \fINAME\fR to switch to the workspace named NAME, the plus sign (+) to switch to the next workspace, and the minus sign (\-) to switch to the previous workspace.
.sp
To unset a workspace use the \fIunset\fR subcommand preceded by the workspace (either number or name) to be unset. For example: \fIws 2 unset\fR.
.sp
Four keyboard shortcuts are available to easily switch to any of the first four workspaces: \fBAlt\-[1\-4]\fR.
.sp
Every time an empty workspace is created, it starts in the current working directory.
.sp
Though by default workspaces are unnamed, you can name them wathever you like using the \fIWorkspaceNames\fR option in the configuration file.
.sp
Use autocommands to persistenly set options per workspace, for example, to always list files in the third workspace in long view. See the \fBAUTOCOMMANDS\fR section below for more information.
.sp
Make local settings private to the current workspace by setting the \fIPrivateWorkspaceSettings\fR option to \fItrue\fR in the configuration file: settings changed via either the command line or keyboard shortcuts (say Alt\-l, to toggle the long view) will apply only to the current workspace and will be remembered even when switching workspaces.
.TP
.B x, X \fR[\fIDIR\fR]
open DIR, or the current working directory if DIR is not specified, in a new instance of \fBclifm\fR (as root if \fIX\fR, as the current unprivileged user if \fIx\fR) using the value of \fITerminalCmd\fR (from the configuration file) as terminal emulator. If this value is not set, \fIxterm\fR will be used as fallback terminal emulator. This function is only available for graphical environments.
.TP
.B Shell\-builtins implementations
.sp
.B pwd \fR[\fI\-LP\fR]
.sp
  print the current working directory
.sp
.B export \fINAME=VALUE\fR...
.sp
  export variables to the environment
.sp
.B umask \fR[\fIVALUE\fR]
.sp
  print/set the current umask value
.sp
.B unset \fINAME\fR
.sp
  remove a variable from the environment

.SH 5. FILE FILTERS
\fBClifm\fR provides multiple ways to filter the current list of files:
.sp
\fBa)\fR Hidden files: via the \fB\-A\fR and \fB\-a\fR command line flags, the \fIhh\fR command, and the \fIAlt\-.\fR keybinding.
.sp
Files listed in a file named \fI.hidden\fR in the current directory will hidden as well whenever dotfiles are not shown. Wildcards are supported.
.sp
\fBb)\fR Directories: via the \fI\-\-only\-dirs\fR command line switch and the \fIAlt\-,\fR keybinding.
.sp
\fBc)\fR File names and file types: either via a regular expression or a file type character (see below) using the \fIft\fR command (the \fIFilter\fR option in the configuration file and the \fBCLIFM_FILTER\fR environment variable are also available). For example, to exclude backup files (ending with a tilde):
.sp
 CLIFM_FILTER=\'!.*~$\' clifm
.sp
or (in the configuration file):
.sp
 Filter="!.*~$"
.sp
or (via the \fIft\fR command):
.sp
 ft !.*~$
.sp
See the \fIft\fR command for a few more examples.
.sp
\fBd)\fR Filtering files via the TAB key:
.sp
You can filter files \fBby name\fR using wildcards. For example: \fIp *.mp3<TAB>\fR (or \fI/*.mp3<TAB>\fR) to get a list of MP3 files in the current directory.
.sp
Files can also be filtered \fBby MIME\-type\fR via the \'@\' keyword. Type \fI@<TAB>\fR to list all MIME\-types found in the current directory, or \fI@query<TAB>\fR to list all files whose MIME\-type includes the string "query". For example, \fI@image<TAB>\fR will list all files in the current directory whose MIME type includes the string "image".
.sp
Finally, files can be filtered as well \fBby file type\fR using the \'=\' keyword followed by a file type character (see below). For example, \fI=l<TAB>\fR to get a list of symbolic links in the current directory.
.sp
Note: If using TAB completion in fzf mode, multi\-selection is allowed (except in the case of \fI@<TAB>\fR).
.sp
Available file type characters:

 \fBb\fR: Block devices
 \fBc\fR: Character devices
 \fBC\fR: Files with capabilities (1)(2)
 \fBd\fR: Directories
 \fBf\fR: Regular files
 \fBg\fR: SGID files (2)
 \fBh\fR: Multi\-hardlink files (directories excluded)
 \fBl\fR: Symbolic links
 \fBo\fR: Other\-writable files (2)
 \fBp\fR: FIFO/pipes (2)
 \fBs\fR: Sockets (2)
 \fBD\fR: Doors (Solaris only)
 \fBP\fR: Event ports (Solaris only)
 \fBt\fR: Files with the sticky bit set (2)
 \fBu\fR: SUID files (2)
 \fBx\fR: Executable files (2)
.sp
(1) Only for TAB completion
.sp 0
(2) Not available in light mode
.sp
\fBe)\fR Grouping files (via automatic expansion):
.sp
By means of the above features, you can easily group and operate on groups of files. For example, this command:
.sp
 vt :b @image =x sel t:work *.txt
.sp
opens a virtual directory (see the \fBVIRTUAL DIRECTORIES\fR section below) automatically expanding the above expressions as follows:

.TS
allbox;
lb lb
l l.
Expression	Description
T{
:b
T}	All your bookmarks (paths)
T{
@image
T}	All image files (CWD)
T{
=x
T}	All executable files (CWD)
T{
sel
T}	All selected files
T{
t:work
T}	All files tagged as \fIwork\fR
T{
*.txt
T}	All .txt files (CWD)
.TE

.SH 6. KEYBOARD SHORTCUTS
.TP
\fBCtrl\-Alt\-j:\fR Switch to vi editing mode
.TP
\fBCtrl\-Alt\-e:\fR Switch back to emacs editing mode (default)
.TP
\fBRight\fR, \fBCtrl\-f:\fR Accept the entire current suggestion
.TP
\fBAlt\-Right\fR, \fBAlt\-f:\fR Accept only the first word of the current suggestion (up to first slash or space)
.TP
\fBAlt\-c:\fR Clear the current command line buffer
.TP
\fBAlt\-q:\fR Delete last word (up to last slash or space)
.TP
\fBAlt\-i, Alt\-.:\fR Toggle hidden files on/off
.TP
\fBAlt\-l:\fR Toggle long view mode on/off
.TP
\fBAlt\-+:\fR Toggle follow links (long view only)
.TP
\fBAlt\-g:\fR Toggle list\-directories\-first on/off
.TP
\fBAlt\-,:\fR Toggle list only directories on/off
.TP
\fBCtrl\-Alt\-l:\fR Toggle max file name length on/off
.TP
\fBCtrl\-Alt\-i:\fR, \fBAlt\-TAB:\fR Toggle disk usage analyzer on/off
.TP
\fBAlt\-w:\fR Toggle full path file names in virtual directories
.TP
\fBCtrl\-l:\fR Refresh the screen (reprint the list of files in the current directory)
.TP
\fBAlt\-t:\fR Clear program messages
.TP
\fBAlt\-m:\fR List mountpoints
.TP
\fBAlt\-b:\fR Launch the Bookmarks Manager
.TP
\fBAlt\-h:\fR Show directory history
.TP
\fBAlt\-n:\fR Create new file or directory
.TP
\fBAlt\-s:\fR Open the Selection Box
.TP
\fBAlt\-\-:\fR Launch the files previewer (\fIview\fR command)
.TP
\fBAlt\-a:\fR Select all files in the current working directory
.TP
\fBAlt\-d:\fR Deselect all selected files
.TP
\fBAlt\-0:\fR Run MAS, the files pager
.TP
\fBAlt\-p:\fR Change to pinned directory
.TP
\fBAlt\-1:\fR Switch to workspace 1
.TP
\fBAlt\-2:\fR Switch to workspace 2
.TP
\fBAlt\-3:\fR Switch to workspace 3
.TP
\fBAlt\-4:\fR Switch to workspace 4
.TP
\fBAlt\-r:\fR Change to root directory
.TP
\fBAlt\-e, Home:\fR Change to home directory
.TP
\fBAlt\-u, Shift\-Up:\fR Change to parent directory
.TP
\fBAlt\-j, Shift\-Left:\fR Change to previous visited directory
.TP
\fBAlt\-k, Shift\-Right:\fR Change to next visited directory
.TP
\fBCtrl\-Alt\-o:\fR Switch to previous profile
.TP
\fBCtrl\-Alt\-p:\fR Switch to next profile
.TP
\fBCtrl\-Alt\-a:\fR Archive selected files
.TP
\fBCtrl\-Alt\-e:\fR Export selected files
.TP
\fBCtrl\-Alt\-r:\fR Rename selected files
.TP
\fBCtrl\-Alt\-d:\fR Remove selected files
.TP
\fBCtrl\-Alt\-t:\fR Trash selected files
.TP
\fBCtrl\-Alt\-u:\fR Restore trashed files
.TP
\fBCtrl\-Alt\-g:\fR Open/change-to last selected file/directory
.TP
\fBCtrl\-Alt\-n:\fR Move selected files into the current directory
.TP
\fBCtrl\-Alt\-v:\fR Copy selected files into the current directory
.TP
\fBAlt\-y:\fR Toggle light mode on/off
.TP
\fBAlt\-z:\fR Switch to previous sorting method
.TP
\fBAlt\-x:\fR Switch to next sorting method
.TP
\fBCtrl\-x:\fR Launch a new instance of \fBclifm\fR
.TP
\fBCtrl\-y:\fR Copy the contents of the line buffer to the clipboard \fB(1)\fR
.TP
\fBF1:\fR Go to the manpage
.TP
\fBF2:\fR List commands
.TP
\fBF3:\fR List keybindings
.TP
\fBF6:\fR Open the MIME list file
.TP
\fBF7:\fR Open the shotgun configuration file
.TP
\fBF8:\fR Open the current color scheme file
.TP
\fBF9:\fR Open the keybindings file
.TP
\fBF10:\fR Open the main configuration file
.TP
\fBF11:\fR Open the bookmarks file
.TP
\fBF12:\fR Quit
.TP
NOTE 1: Some of these keybindings might not work on your console/terminal emulator, depending on your system. Some useful tips on this regard:
.TP
\fB(1)\fR This shortcut is bound to the \fIxclip\fR plugin. See the \fBPLUGINS\fR section below for more information.
.TP
Haiku terminal: Most of these keybindings won\'t work on the Haiku terminal, since Alt plays here the role Ctrl usually plays in most other systems (see the Haiku documentation). To fix this, set your custom keybindings.
.TP
Kernel built-in console: Key sequences involving the Shift key (S\-up, S\-left, and S\-right in our case) will just not work. Use the alternative key sequences instead: M\-u, M\-j, and M\-k respectively
.TP
NetBSD (wsvt25) and OpenBSD (vt220) kernel consoles: Key sequences involving the Alt key won\'t work out of the box. Here\'s how to make it work:

 On OpenBSD:
 1) Copy /etc/examples/wsconsctl.conf to /etc (if it does not already exist)
 2) Add the metaesc flag to your current keyboard enconding. For example keyboard.encoding=us.metaesc
 You might need to reboot the machine for changes to take effect.

 On NetBSD:
 Add the metaesc flag to your current encoding in /etc/wscons.conf. Example: encoding us.metaesc
 You might need to reboot the machine for changes to take effect.
.TP
Konsole: If Shift+left and Shift+right are not already bound to any function, you need to bind them manually. Go to Settings \-> Edit current profile \-> Keyboard \-> Default (Xfree4), and add these values:
 Left+Shift	\\E[1;2D
 Right+Shift	\\E[1;2C
.sp
If they are already bound, by contrast, you only need to unbound them. Go to "Settings \-> Configure keyboard shortcuts", click on the corresponding keybinding, and set it to "Custom (none)").
.TP
Terminology/Yakuake: Shift+left and Shift+right are already bound to other functions, so that you only need to unbind them or rebind the corresponding functions to different key sequences.
.TP
Of course, the above two procedures should be similar in case of keybinding issues in other terminal emulators.
.TP
In case some of these keybindings are already used by your Window Manager, you only need to unbind the key or rebind the corresponding function to another key. Since each Window Manager uses its own mechanisms to set/unset keybindings, you should consult the appropriate manual.
.TP
\fBCustomizing keybindings\fR
.TP
The above are the default keyboard shortcuts. However, they can be freely modified using the \'kb edit\' command (or pressing F9), or editing the keybindings file (see the \fBFILES\fR section below) to your liking.
.TP
Since \fBclifm\fR does not depend on the curses library, keybindings are set up via ANSI escape codes, for example, "\e[17~" for the F6 key. The two main difficulties with ANSI escape codes are: 1) They are not intuitive at all, and 2) They vary depending on the terminal emulator used. This is why we provide a plugin (kbgen) to more easily configure your keybindings.
.TP
The plugin can be found in the plugins directory as a C source file. The first step, therefore, is to compile this source file to produce a binary file. Compile as follows:
.TP
 gcc \-o kbgen kbgen.c
.TP
\fBNote\fR: Depending on your system, you might need to link against the curses library adding either \fB\-lcurses\fR or \fB\-lncurses\fR to the above line. 
.TP
Now, run the plugin by entering \'./kbgen\'. Use either octal, hexadecimal codes or symbols. Example: For F12 'kbgen' will print the following lines:
.sp
 Hex  | Oct  | Symbol
 \-\-\-\- | \-\-\-\- | \-\-\-\-\-\-
 \\x1b | \\033 | ESC (\\e)
 \\x5b | \\133 | [
 \\x32 | \\062 | 2
 \\x34 | \\064 | 4
 \\x7e | \\176 | ~
.TP
In this case, supposing you want to use F12 to open the configuration file, the keybinding would be any of the following:
.sp
 open\-config:\\x1b\\x5b\\x32\\x34\\x7e (Hex)
 open\-config:\\033\\133\\062\\064\\176 (Oct)
 open\-config:\\e[24~ (Symbol)
.TP
GNU emacs escape sequences are also allowed (e.g.: "\\M\-a", Alt\-a in most keyboards, or "\\C\-r" for Ctrl\-r). Some codes, especially those involving keys like Ctrl or the arrow keys, vary depending on the terminal emulator and the system settings. These keybindings should be set up thus on a per terminal basis. You can also consult the terminfo database via the \fIinfocmp\fR command. See \fBterminfo\fR(5) and \fBinfocmp\fR(1).
.TP
.B Readline keybindings
.TP
System readline keybindings for command line editing, such as \fICtrl\-a\fR, to move the cursor to the beginning of the line, or \fICtrl\-e\fR, to move it to the end, should work out of the box. Of course, you can modify readline keybindings using the \fI$HOME/.inputrc\fR file, either globally or for some specific terminal or application. In this latter case, it is possible to set keybindings specifically for \fBclifm\fR using the \fIapplication\fR construct, that is, telling readline that the following keybindings apply only to \fBclifm\fR. For example, to bind the function "kill\-whole\-line" to \fICtrl\-b\fR, add the following lines to your \fI.inputrc\fR file:
.sp
 $if clifm
 "\\C\-b": kill\-whole\-line
 $endif
.TP
.B Keybindings for plugins
.TP
\fBclifm\fR provides four customizable keybindings for custom plugins. The procedure for setting a keybinding for a plugin is the following:
 1) Copy your plugin to the plugins directory (or use any of the plugins already in there)
 2) Link pluginx (where \'x\' is the plugin number [1\-4]) to your plugin using the \'actions edit\' command. E.g.: "plugin1=myplugin.sh"
 3) Set a keybinding for pluginx using the \'kb edit\' command. E.g.: "plugin1:\\M\-7"

.SH 7. THEMING
.TP
All customization settings (theming) are made from a single configuration file (the color scheme file), installed by default in \fIXDG_DATA_DIRS/clifm/colors\fR (usuallly \fI/usr/local/share/clifm/colors\fR or \fI/usr/share/clifm/colors\fR), though color scheme files found in \fIXDG_CONFIG_HOME/clifm/colors\fR (usually \fIHOME/.config/clifm/colors\fR) take precedence.
.TP
\fBNote\fR: Color scheme files are copied automatically into the local colors directory when running the \fIcs edit\fR command.
.TP
Each color scheme may include any (or all) of the below options:
.TP
 \fIFiletypeColors\fR = Colors for different file types, such as directory, regular files, and so on. See the \fBCOLORS\fR section below.
.TP
 \fIInterfaceColors\fR = Colors for \fBclifm\fR's interface, such as ELN's, file properties bits, suggestions, syntax highlighting, etc. See the \fBCOLORS\fR section below.
.TP
 \fIExtColors\fR = Colors for files based of file name's extension. See the \fBCOLORS\fR section below.
.TP
 \fIDateShades\fR = A comma delimited list of colors used to print timestamps (long view). Consult the default color scheme file for more information.
.TP
 \fISizeShades\fR = A comma delimited list of colors used to print file sizes (long view). Consult the default color scheme file for more information.
.TP
 \fIDirIconColor\fR = Color for the directory icon (when icons are enabled). See the \fBCOLORS\fR section below. Only when using icons\-in\-terminal or Nerfonts. If using rather emoji\-icons (default build), this option is ignored.
.TP
 \fIPrompt\fR = Define CliFM\'s prompt. See the \fBTHE PROMPT\fR section below.
.TP
 \fIDividingLine\fR = The line dividing the current list of files and the prompt. See the \fBTHE DIVIDING LINE\fR below.
.TP
 \fIFzfTabOptions\fR = Options to be passed to fzf when using the fzf mode for TAB completion, including colors. See the \fBBUILT\-IN EXPANSIONS\fR section below.
.TP
The color scheme (or just theme) can be set either via the command line (\fI\-\-color\-scheme=NAME\fR), via the \fIColorScheme\fR option in the main configuration file, or using the \fIcs\fR command, for instance, \fIcs mytheme\fR. Enter just \fIcs\fR to list available color schemes (TAB completion is available). To edit the current color scheme enter \fIcs edit\fR.
.TP
.B 1. COLORS
.TP
If 256 colors support is detected for the current terminal, and not set in any other way (either via the \fIColorScheme\fR option in the configuration file or the \fI\-\-color\-scheme\fR command line switch), \fBclifm\fR will attempt to load the 256 colors version of the default color scheme: default\-256. Otherwise, it falls back to the 16 colors version.
.TP
All color codes are specified in the corresponding color scheme file (by default \fI~/.config/clifm/colors/default.clifm\fR). You can edit this file pressing \fBF8\fR or entering \fIcs edit\fR.
.TP
\fBa. Color codes\fR
.TP
Colors are specified using the same format used by \fBdircolors\fR(1) and the \fBLS_COLORS\fR environment variable, namely, a colon separated list of codes with this general format: \fIname=value\fR, where \fIname\fR refers to an interface element, and \fIvalue\fR to the color to be used by this element.
.TP
This is the list of \fBfile type codes\fR (you will find them in the \fIFiletypeColors\fR section of the current color scheme file):
.sp
 di = directory
 ed = empty directory
 nd = directory with no read/exec permission
 fi = regular file
 ef = empty regular file
 nf = file with no access permission
 ln = symlink
 mh = multi\-hardlink file
 or = orphaned or broken symlink
 bd = block device
 cd = character device
 pi = FIFO, pipe
 so = socket
 su = SUID file
 sg = SGID file
 tw = sticky and other writable directory
 st = sticky and not other writable directory
 ow = other writable directory
 ex = executable file
 ee = empty executable file
 ca = file with capabilities
 oo = door/port (Solaris only)
 no = unknown file type
 uf = unaccessible files (\fBfstatat\fR(3) error)

.TP
The following codes are used for different interface elements (in the \fIInterfaceColors\fR section of the current color scheme file):
.sp
 \fBSuggestions\fR
 sb = shell built\-ins
 sc = aliases and shell command names
 sd = internal commands description
 sf = ELN's, bookmarks, tag, and file names
 sh = commands history entries
 sx = suggestions for \fBclifm\fR's internal commands and parameters
 sp = suggestions pointer (e.g.: 56 > filename, where '>' is the suggestion pointer)
 sz = file names (fuzzy)

 \fBSyntax highlighting\fR
 hb = brackets \'()[]{}\'
 hc = comments (lines starting with '#')
 hd = slashes
 he = expansion chars \'~*\'
 hn = numbers
 hp = option parameters (starting with \'\-\')
 hq = quoted strings (both single and double quotes)
 hr = process redirection (>)
 hs = process separators (; & |)
 hv = variable names (starting with \'$\')
 hw = Backslash (aka whack)

 \fBPrompt elements\fR
 li = selected files
 ti = trash indicator
 em = error message indicator
 wm = warning message indicator
 nm = notice message indicator
 ro = read-only mode indicator
 si = stealth mode indicator
 tx = command line text (regular prompt)

 \fBFile properties\fR
 db  = file allocated blocks
 dd  = last access/change/modification time \fB(1)\fR
 de  = file inode number (long view only)
 dg  = group ID (provided the user has access to the file)
 dk  = number of links (long view only)
 dn  = dash (unset property)
 do  = octal value for file properties
 dp  = SUID, SGID, sticky bit
 dr  = read permission bit
 dt  = timestamp identification mark \fB(2)\fR
 du  = user ID (provided the user has access to the file)
 dw  = write permission bit
 dxd = executable permission bit (directories)
 dxr = executable permission bit (regular files)
 dz  = size \fB(1)\fR
.sp
 \fB(1)\fR If unset (default), gradient colors are used (based on file size and file age).
.sp 0
 \fB(2)\fR If unset (default), a dimmed version of the current timestamp color is used.
.sp
 \fBNOTE\fR: For a better graphical representation of file properties, 256 colors are used if possible (otherwise, \fBclifm\fR falls back to 16 colors).
.sp
 \fBMiscellaneous interface elements\fR
 fc  = files counter
 df  = default color
 dl  = dividing line
 el  = ELN color
 lc  = symbolic link indicator (\fIColorLinksAsTarget\fR only)
 mi  = misc indicators (disk usage, sort method, bulk rename, jump database list)
 ts  = matching suffix for possible TAB completed entries
 tt  = tilde for trimmed file names
 wc  = welcome message
 wsN = color for workspace N (1\-8)
 xs  = exit code: success
 xf  = exit code: failure
.TP
\fBb. Supported colors\fR
.TP
4-bit, 8-bit (256-colors), and 24-bit (true colors) colors are supported.
.TP
Colors are defined basically as SGR sequences (excluding the initial escape character and the ending 'm'), the same sequences used by the \fBLS_COLORS\fR environment variable. However, shortcuts for 8-bit (256-colors) and 24-bit (true color) colors are available. For example:
.sp
 31            4-bit
 38;5;160      8-bit
 @160          8-bit  (short)
 38;2;255;0;0  24-bit
 #ff0000       24-bit (short, HEX)
.TP
A \fIsingle\fR attribute can be added to hex colors and 256 colors (in the form @NUM) using a dash and an attribute number (#RRGGBB-[1-9] or @NUM-[1-9]), where 1-9 is:
.sp
 1: Bold or increased intensity
 2: Faint, decreased intensity or dim
 3: Italic (Not widely supported)
 4: Underline
 5: Slow blink
 6: Rapid blink
 7: Reverse video or invert
 8: Conceal or hide (Not widely supported)
 9: Crossed\-out or strike
.TP
\fBNote\fR: Some attributes may not be supported by all terminal emulators.
.TP
For example, for bold red the hex code is \fB#ff0000\-1\fR, while the 256-colors code is \fB\@160\-1\fR. (for more information about SGR sequences consult \fIhttps://en.wikipedia.org/wiki/ANSI_escape_code\fR).
.TP
\fBc. Color names\fR
.TP
\fBXterm\-like color names\fR are also supported. For example: \fBex=DodgerBlue2\fR.
.TP
This is the list of color names (as defined by \fBvifm\fR(1)):
.sp
  0 Black                  86 Aquamarine1           172 Orange3
  1 Red                    87 DarkSlateGray2        173 LightSalmon3_2
  2 Green                  88 DarkRed_2             174 LightPink3
  3 Yellow                 89 DeepPink4_2           175 Pink3
  4 Blue                   90 DarkMagenta           176 Plum3
  5 Magenta                91 DarkMagenta_2         177 Violet
  6 Cyan                   92 DarkViolet            178 Gold3_2
  7 White                  93 Purple                179 LightGoldenrod3
  8 LightBlack             94 Orange4_2             180 Tan
  9 LightRed               95 LightPink4            181 MistyRose3
 10 LightGreen             96 Plum4                 182 Thistle3
 11 LightYellow            97 MediumPurple3         183 Plum2
 12 LightBlue              98 MediumPurple3_2       184 Yellow3_2
 13 LightMagenta           99 SlateBlue1            185 Khaki3
 14 LightCyan             100 Yellow4               186 LightGoldenrod2
 15 LightWhite            101 Wheat4                187 LightYellow3
 16 Grey0                 102 Grey53                188 Grey84
 17 NavyBlue              103 LightSlateGrey        189 LightSteelBlue1
 18 DarkBlue              104 MediumPurple          190 Yellow2
 19 Blue3                 105 LightSlateBlue        191 DarkOliveGreen1
 20 Blue3_2               106 Yellow4_2             192 DarkOliveGreen1_2
 21 Blue1                 107 DarkOliveGreen3       193 DarkSeaGreen1_2
 22 DarkGreen             108 DarkSeaGreen          194 Honeydew2
 23 DeepSkyBlue4          109 LightSkyBlue3         195 LightCyan1
 24 DeepSkyBlue4_2        110 LightSkyBlue3_2       196 Red1
 25 DeepSkyBlue4_3        111 SkyBlue2              197 DeepPink2
 26 DodgerBlue3           112 Chartreuse2_2         198 DeepPink1
 27 DodgerBlue2           113 DarkOliveGreen3_2     199 DeepPink1_2
 28 Green4                114 PaleGreen3_2          200 Magenta2_2
 29 SpringGreen4          115 DarkSeaGreen3         201 Magenta1
 30 Turquoise4            116 DarkSlateGray3        202 OrangeRed1
 31 DeepSkyBlue3          117 SkyBlue1              203 IndianRed1
 32 DeepSkyBlue3_2        118 Chartreuse1           204 IndianRed1_2
 33 DodgerBlue1           119 LightGreen_2          205 HotPink
 34 Green3                120 LightGreen_3          206 HotPink_2
 35 SpringGreen3          121 PaleGreen1            207 MediumOrchid1_2
 36 DarkCyan              122 Aquamarine1_2         208 DarkOrange
 37 LightSeaGreen         123 DarkSlateGray1        209 Salmon1
 38 DeepSkyBlue2          124 Red3                  210 LightCoral
 39 DeepSkyBlue1          125 DeepPink4_3           211 PaleVioletRed1
 40 Green3_2              126 MediumVioletRed       212 Orchid2
 41 SpringGreen3_2        127 Magenta3              213 Orchid1
 42 SpringGreen2          128 DarkViolet_2          214 Orange1
 43 Cyan3                 129 Purple_2              215 SandyBrown
 44 DarkTurquoise         130 DarkOrange3           216 LightSalmon1
 45 Turquoise2            131 IndianRed             217 LightPink1
 46 Green1                132 HotPink3              218 Pink1
 47 SpringGreen2_2        133 MediumOrchid3         219 Plum1
 48 SpringGreen1          134 MediumOrchid          220 Gold1
 49 MediumSpringGreen     135 MediumPurple2         221 LightGoldenrod2_2
 50 Cyan2                 136 DarkGoldenrod         222 LightGoldenrod2_3
 51 Cyan1                 137 LightSalmon3          223 NavajoWhite1
 52 DarkRed               138 RosyBrown             224 MistyRose1
 53 DeepPink4             139 Grey63                225 Thistle1
 54 Purple4               140 MediumPurple2_2       226 Yellow1
 55 Purple4_2             141 MediumPurple1         227 LightGoldenrod1
 56 Purple3               142 Gold3                 228 Khaki1
 57 BlueViolet            143 DarkKhaki             229 Wheat1
 58 Orange4               144 NavajoWhite3          230 Cornsilk1
 59 Grey37                145 Grey69                231 Grey100
 60 MediumPurple4         146 LightSteelBlue3       232 Grey3
 61 SlateBlue3            147 LightSteelBlue        233 Grey7
 62 SlateBlue3_2          148 Yellow3               234 Grey11
 63 RoyalBlue1            149 DarkOliveGreen3_3     235 Grey15
 64 Chartreuse4           150 DarkSeaGreen3_2       236 Grey19
 65 DarkSeaGreen4         151 DarkSeaGreen2         237 Grey23
 66 PaleTurquoise4        152 LightCyan3            238 Grey27
 67 SteelBlue             153 LightSkyBlue1         239 Grey30
 68 SteelBlue3            154 GreenYellow           240 Grey35
 69 CornflowerBlue        155 DarkOliveGreen2       241 Grey39
 70 Chartreuse3           156 PaleGreen1_2          242 Grey42
 71 DarkSeaGreen4_2       157 DarkSeaGreen2_2       243 Grey46
 72 CadetBlue             158 DarkSeaGreen1         244 Grey50
 73 CadetBlue_2           159 PaleTurquoise1        245 Grey54
 74 SkyBlue3              160 Red3_2                246 Grey58
 75 SteelBlue1            161 DeepPink3             247 Grey62
 76 Chartreuse3_2         162 DeepPink3_2           248 Grey66
 77 PaleGreen3            163 Magenta3_2            249 Grey70
 78 SeaGreen3             164 Magenta3_3            250 Grey74
 79 Aquamarine3           165 Magenta2              251 Grey78
 80 MediumTurquoise       166 DarkOrange3_2         252 Grey82
 81 SteelBlue1_2          167 IndianRed_2           253 Grey85
 82 Chartreuse2           168 HotPink3_2            254 Grey89
 83 SeaGreen2             169 HotPink2              255 Grey93
 84 SeaGreen1             170 Orchid
 85 SeaGreen1_2           171 MediumOrchid1
.TP
Just as with hex colors, a single attribute can be appended to color names. For example, \fISteelBlue1\-1\fR to get the bold version of this color.
.TP
\fBd. Color variables\fR
.TP
Up to 128 custom color variables can be used via the \fIdefine\fR keyword to make it easier to build and read theme files. Example:

 \fBdefine FTYPE_DIR=31\fR
 \fBdefine IFACE_ELN=4;38;2;255;255;0;48;2;0;14;191\fR

 \fBFiletpeColors="di=FTPYE_DIR:"\fR
 \fBInterfaceColors="el=IFACE_ELN:"\fR
.TP
These variables can only be used for \fIFiletypeColors\fR, \fIInterfaceColors\fR, \fIExtColors\fR, and \fIDirIconColor\fR. The \fIPrompt\fR line (if using a prompt code) uses full SGR sequences instead.
.TP
\fBe. Examples\fR
.TP
A few examples to put all this together:

 \fBfi=4;31\fR    (regular files are 4-bit underlined red)
 \fBdi=@33-1\fR   (directories are 8-bit bold light-blue)
 \fBln=#5fd7ff\fR (symbolic links are 24-bit light cyan)
 \fBso=Yellow3\fR (socket files are Yellow3)
.TP
More complex combinations can be achieved using complete SGR sequences (for example, to add a background color). E.g.:

 \fBfi=4;38;2;245;76;48;2;0;0;255\fR
.TP
will print regular files underlined and using a bold orange color on a blue background. In this case, just make sure to use a terminal emulator supporting true colors. To test your terminal color capabilities use the \fIcolors.sh\fR script (in the plugins directory).
.TP
\fBNOTE\fR: It may happen that, for some reason, you need to force \fBclifm\fR to use colors despite the value of the \fBTERM\fR variable. The OpenBSD console, for example, sets \fBTERM\fR to \fIvt220\fR by default, which, according to the \fIterminfo\fR database, does not support color. However, the OpenBSD console does actually support color. In this case, you can set the \fBCLIFM_FORCE_COLOR\fR to either \fItrue\fR or  \fI1\fR to use color even if the value of \fBTERM\fR says otherwise.
.TP
To see a colored list of the currently used colors run the \fIcolors\fR command.
.TP
To run colorless use the \fI\-\-no\-color\fR command line option or set either \fBCLIFM_NO_COLOR\fR or \fBNO_COLOR\fR environment variables to any value. For more information about the no\-color initiative see \fIhttps://no\-color.org/\fR
.TP
For a full no\-color experience recall to edit your prompt removing all color codes.
.TP
.B 2. THE PROMPT
.TP
\fBclifm\fR's prompt (regular and warning ones) is taken from the \fIPrompt\fR line in the color scheme file using a prompt name as defined in the prompts file, for example, \fIPrompt="security\-scanner"\fR.
.TP
Prompts can be customized via the \fIprompt edit\fR command.
.TP
Each prompt is built following almost the same escape codes and rules used by the Bash prompt, except that it does not accept shell functions (like conditionals and loops). Command substitution (in the form $(cmd)), string literals, and escape codes can be used to build the prompt line and its colors. This is a list of supported escape codes:
.TP
\fB\\e\fR: Escape character
.TP
\fB\\s\fR: The name of the shell (everything after the last slash) currently used by \fBclifm\fR
.TP
\fB\\S\fR: Current workspace number (or name, if named), colored according to \fIwsN\fR code in the \fIInterfaceColors\fR section in the color scheme file
.TP
\fB\\l\fR: Print an \'L\' if in light mode
.TP
\fB\\P\fR: The current profile name
.TP
\fB\\u\fR: The username
.TP
\fB\\H\fR: The full hostname
.TP
\fB\\h\fR: The hostname, up to the first \'.'\
.TP
\fB\\n\fR: A newline character
.TP
\fB\\r\fR: A carriage return
.TP
\fB\\a\fR: A bell character
.TP
\fB\\d\fR: The date, in abbreviated form (e.g.: \'Tue May 26\')
.TP
\fB\\t\fR: The time, in 24\-hour HH:MM:SS format
.TP
\fB\\T\fR: The time, in 12\-hour HH:MM:SS format
.TP
\fB\\@\fR: The time, in 12\-hour am/pm format
.TP
\fB\\A\fR: The time, in 24\-hour HH:MM format
.TP
\fB\\w\fR: The full current working directory, with $HOME abbreviated with a tilde
.TP
\fB\\W\fR: The basename of $PWD, with $HOME abbreviated with a tilde
.TP
\fB\\p\fR: A mix of the two above, it abbreviates the current working directory only if longer than PathMax (a value defined in the configuration file).
.TP
\fB\\z\fR: Exit code of the last executed command (colored according to the \fIxs\fR (success) and \fIxf\fR (failure) codes in \fIInterfaceColors\fR in the color scheme file)
.TP
\fB\\i\fR: The value of \fBCLIFMLVL\fR (number of nested instances of \fBclifm\fR)
.TP
\fB\\I\fR: Same as \fB\\I\fR, but formatted as "(n)" (nothing is printed if \fBCLIFMLVL\fR is 1)
.TP
\fB\\$\fR \'#\', if the effective user ID is 0, and \'$\' otherwise
.TP
\fB\\nnn\fR: The character whose ASCII code is the octal value nnn
.TP
\fB\\\\\fR: A literal backslash
.TP
\fB\\[\fR: Begin a sequence of non\-printing characters. This is mostly used to add color to the prompt line
.TP
\fB\\]\fR: End a sequence of non\-printing characters
.TP
The following files statistics escape codes are also recognized (not available in light mode):
.TP
\fB\\D\fR: Amount of sub\-directories in the current directory
.TP
\fB\\R\fR: Amount of regular files in the current directory
.TP
\fB\\X\fR: Amount of executable files in the current directory
.TP
\fB\\.\fR: Amount of hidden files in the current directory
.TP
\fB\\U\fR: Amount of SUID files in the current directory
.TP
\fB\\G\fR: Amount of SGID files in the current directory
.TP
\fB\\F\fR: Amount of FIFO/pipe files in the current directory
.TP
\fB\\K\fR: Amount of socket files in the current directory
.TP
\fB\\B\fR: Amount of block device files in the current directory
.TP
\fB\\C\fR: Amount of character device files in the current directory
.TP
\fB\\x\fR: Amount of files with capabilities in the current directory
.TP
\fB\\L\fR: Amount of symbolic links in the current directory
.TP
\fB\\o\fR: Amount of broken symbolic links in the current directory
.TP
\fB\\M\fR: Amount of multi\-link files in the current directory
.TP
\fB\\E\fR: Amount of files with extended attributes in the current directory
.TP
\fB\\O\fR: Amount of other\-writable files in the current directory
.TP
\fB\\>\fR: Amount of door files in the current directory (Solaris only)
.TP
\fB\\"\fR: Amount of files with the sticky bit set in the current directory
.TP
\fB\\?\fR: Amount of files of unknown file type in the current directory
.TP
\fB\\!\fR: Amount of unstatable files in the current directory
.TP
Escape codes for prompt notifications (mostly used for custom prompts which need to handle notifications themselves, in which case \fINotifications\fR should be set to \fIfalse\fR in the color scheme file to prevent automatic insertion of notifications at the left of the prompt):
.TP
\fB\\*\fR: \'*\' + amount of selected files
.TP
\fB\\%\fR: \'T\' + amount of trashed files
.TP
\fB\\#\fR: \'R\' if root user
.TP
\fB\\)\fR: \'W\' + amount of warning messages
.TP
\fB\\(\fR: \'E\' + amount of error messages
.TP
\fB\\=\fR: \'N\' + amount of notice messages
.TP
\fBNote\fR: Except for '\\#', nothing is printed if the number is zero.
.TP
By default, for example, \fBclifm\fR's prompt line is this:

\fB"\\[\\e[0m\\][\\S\\[\\e[0m\\]]\\l \\A \\u:\\H \\[\\e[00;36m\\]\\w\\n\\[\\e[0m\\]<\\z\\[\\e[0m\\]>\\[\\e[0;34m\\] \\$\\[\\e[0m\\] "\fR

.TP
which once decoded should look something like this:

 \fB[1] 13:45 user:hostname /my/path
 <0> $\fR
.TP
with the workspace number printed in blue, the path in cyan, the last exit status in green, and the dollar sign in blue.
.TP
A more "classic" prompt could be built as follows:

 \fB"\\u@\\U \\w> "\fR
.TP
or, using now command substitution:

 \fB"$(whoami)@$(hostname) $(pwd)> "\fR
.TP

\fBAdvanced prompt customization\fR
.TP
Besides commands substitution, which allows you to include in the prompt any information you like via shell scripts or simple shell commands, the use of Unicode characters allows you to build colorful and modern prompts.
.TP
Inserting Unicode characters in the prompt can be made in two ways:
.TP
\fBa)\fR Pasting the character itself using a text editor
.TP
\fBb)\fR Entering the octal code corresponding to the character. Use \fBhexdump\fR(1) as follows to get the appropriate hex code:

 echo \-ne "[paste the char here]" | hexdump \-c
.TP
The first line of the output will be something along these lines:

 00000000  256 234 356               |...|
.TP
In this case, the octal code is: "256 234 356". So, to insert this Unicode character in the prompt, add it as follows:

 Prompt="... \\256\\234\\356 ..."
.TP
\fBNote\fR: Make sure you have installed a font able to display Unicode characters.
.TP
A few advanced prompt examples can be found in the prompts file.
.TP
\fBA simple use case for the files statistics escape codes\fR
.TP
We all want to keep our systems safe. One of the many ways to get a bit of safety is by checking that there is not file in our file system that could somehow endanger our machines. SUID, SGID, executable, and other\-writable files are to be count among these dangers. This is why it could be useful to build a little files scanner for our prompt using the above mentioned files statistics escape codes. This is the code for our scanner:

 \fB\\[\\e[0m\\]\\[\\e[1;31m\\]\\U\\[\\e[0m\\]:\\[\\e[1;33m\\]\\G\\[\\e[0m\\]:
 \\[\\e[1;32m\\]\\O\\[\\e[0m\\]:\\[\\e[1;34m\\]\\X\\[\\e[0m\\]"\fR
.TP
By adding this code to our prompt line, we get something like this:

 \fB24:2:\-:2389\fR
.TP
This tells us that in the current directory we have 24 SUID files (printed in bold red), 2 SGID files (bold yellow), no other\-writable file, and 2389 executable files.
.TP
\fBNOTE\fR: A predefined prompt with this files scanner integrated can be found in the \fIprompts.clifm\fR file.
.TP
\fBNOTE 2\fR: Most of the information these escape codes rely on depends on \fBstat\fR(3). Now, since \fBstat\fR(3) is not used when running in light mode (for performance reasons), this information won\'t be available in light mode either.

.TP
\fBPrompt notifications\fR
.TP
A bold red \'R\' at the left of the prompt reminds the user that the program is running as root. A bold green asterisk indicates that there are elements in the Selection Box. In the same way, a yellow 'T' means that there are currently files in the trash can, just as a bold blue 'S' means that the program is running in stealth mode. Finally, \fBclifm\fR makes use of three kind of messages: errors (a red \'E\' at the left of the prompt), warnings (a yellow \'W\'), and simple notices (a green \'N\').
.TP
If \fINotifications\fR is set to "false" in the prompts file, the above notifications won\'t be printed by the prompt, but is still available to the user as escape codes (see above) and environment variables (see the \fBENVIRONMENT\fR section below) to build custom prompts.
.TP
\fBThe Warning Prompt\fR
.TP
The suggestions system includes a secondary, warning prompt, used to highlight wrong/invalid/non\-existent command names. Once an invalid command is entered, the regular prompt will be switched to the warning prompt and the whole input line will turn dimmed red (though it can be customized to your liking).
.TP
The wrong command name check is omitted if the input string:

 Is quoted (e.g.: "string" or \'string\')
 Is bracketed (e.g.: (string), [string], or {string})
 It starts with a stream redirection character (e.g.: <string or >string)
 Is a comment (e.g.: #string)
 It starts with one or more spaces
 Is an assignment (e.g.: foo=var)
 It is escaped (e.g.: \\string)
.TP
The warning prompt could be customized by means of the same rules used by the regular prompt. To use a custom warning prompt, modify the \fIWarningPrompt\fR line in the prompts file (via the \fIprompt edit\fR command). It defaults to

 \fB"\\[\\e[0;2;31m\\](!) > "\fR
.TP
the last line of the regular prompt will become "\fB(!) > \fR", printed in a dimmed red color, including the input string.
.TP
To disable this feature use the \fI\-\-no\-warning\-prompt\fR command line switch or set the \fIEnableWarningPrompt\fR option to \fBfalse\fR in the prompts file.
.TP
\fBNOTE\fR: Bear in mind that the warning prompt depends on the suggestions system, so that it won\'t be available if this system is disabled.
.TP

\fB3. THE DIVIDING LINE\fR
.TP
The line dividing the current list of files and the prompt. It could be customized via the \fIDividingLine\fR option in the color scheme file to fit your prompt design and/or color scheme.
.TP
\fIDividingLine\fR accepts one or more ASCII or Unicode characters (in both cases you only need to type/paste here the chosen character(s)). If only one character is specified (by default, "\-"), it will be repeatedly printed to fulfill the current line up to the right edge of the screen or terminal window. If you don't want to cover the whole line, specify three or more characters, in which case only these characters (and no more) will be used as dividing line. For example: "\-\-\-\-\-\-\->". To use an empty line, set \fIDividingLineChar\fR to "0" (that is, as a character, not as a number). Finally, is this value is not set, a special line drawn with box\-drawing characters will be used (box\-drawing characters are not supported by all terminal emulators).
.TP
The color of this line is set via the \fIdl\fR color code in the color scheme file. Consult the \fBCOLOR CODE\fR section above for more information.
.TP
\fB4. FZF WINDOW\fR
Refer to the \fBTAB completion\fR section below.

.SH 8. BUILT\-IN EXPANSIONS
.TP
\fBThe SEL keyword\fR
.TP
\fBclifm\fR will automatically expand the \fIsel\fR keyword\fR: \fIsel\fR indeed amounts to \'file1 file2 file3 ...\' In this way, you can use the \fIsel\fR keyword with any command. \fIs:\fR can be used interchangeably (with the difference that \fIs:\fR can be used as first word, and not only as parameter to other commands).
.TP
If you want to set the executable bit on several files, for instance, simply select the files you want and then run this command: \fIchmod +x sel\fR. Or, if you want to copy or move several files into some directory: \fIcp sel 12\fR, or \fImv sel 12\fR (provided the ELN 12 corresponds to a directory), respectively.
.TP
If the destiny directory is omitted, selected files are copied into the current working directory, that is to say, \fImv sel\fR amounts to \fImv sel .\fR.
.TP
To trash or remove selected files, simply run \fItr sel\fR or \fIrm sel\fR respectively. The same goes for wildcards and braces: \fIchmod +x *\fR, for example, will set the executable bit on all files (excluding hidden files) in the current working directory, while \fIchmod +x file{1,2,3}\fR will do it for file1, file2, and file3 respectively.
.TP
If using the FZF mode for TAB completion (see below), you can operate only on \fIsome\fR selected files as follows: type \fICMD sel\fR and, without appending any space char, press TAB: the list of selected files will be displayed. Choose one or more of them (use TAB to mark entries) to operate only on those specific files. For example, to print the file properties of some specific selected files: p sel\->TAB, select the files you want via TAB, press Enter or Right (marked files will be inserted in the command line), and the press Enter, as usual.
.TP
\fBTAB completion\fR
.TP
There are four modes for TAB completion: \fIstandard\fR (interface provided by readline), \fIfzf\fR, which depends on \fBFZF\fR (\fIhttps://github.com/junegunn/fzf\fR) (version 0.18.0 or later), \fIfnf\fR (\fIhttps://github.com/leo\-arch/fnf\fR), and \fIsmenu\fR (\fIhttps://github.com/p\-gen/smenu\fR). By default, if the \fIfzf\fR binary is found in \fBPATH\fR, \fBclifm\fR will attempt to use \fIfzf\fR to display completions. You can force the use of the remaining modes via the \fI\-\-stdtab\fR, \fI\-\-fnftab\fR, and \fI\-\-smenutab\fR command line switches. The \fITabCompletionMode\fR option in the configuration file can be used to permanently set the TAB completion mode.
.TP
If using the \fIfzf\fR mode, the completions interface can be customized using the \fIFzfTabOptions\fR option in the color scheme file. \-\-height, \-\-margin, +i/\-i, \-\-read0, \-\-query, and \-\-ansi will be appended to set up some details of the completions interface. Set this value to \fInone\fR to pass no option, to the empty string to load the default values, or to any other custom value. Unless set to \fInone\fR, any option specified here will override \fBFZF_DEFAULT_OPTS\fR.
.TP
Default values for this option are:
 \-\-color=16,prompt:6,fg+:\-1,pointer:4,hl:5,hl+:5,gutter:\-1,marker:2,border:7:dim \-\-bind tab:accept,right:accept,left:abort,alt-p:toggle\-preview \-\-inline-info \-\-layout=reverse\-list \-\-preview\-window=wrap,border\-left
.TP
Consult \fBfzf\fR(1) for more information.
.TP
If set neither in \fIFzfTabOptions\fR nor in \fBFZF_DEFAULT_OPTS\fR (in this order), the height of the FZF window is set to the default value: 40% of the current terminal amount of line/rows.
.TP
To use FZF global values (defined in \fBFZF_DEFAULT_OPTS\fR), set \fIFzfTabOptions\fR to \fInone\fR.
.TP
File previews are available in FZF mode via \fIshotgun\fR. See the \fBSHOTGUN\fR section above.
.TP
Image previews (X11 only) are available via the \fIclifmimg\fR plugin. Consult the Wiki for more information: \fIhttps://github.com/leo\-arch/clifm/wiki/Specifics#tab\-completion\-with\-file\-previews\fR
.TP
If using the \fIsmenu\fR mode, the interface can be customized using the \fBCLIFM_SMENU_OPTIONS\fR environment variable. For example:
.sp
 export CLIFM_SMENU_OPTIONS="\-a t:2,b b:4 c:r ct:2,r sf:6,r st:5,r mt:5,b"
.TP
Consult \fBsmenu\fR(1) for more information.
.TP
For information about how to customize \fIfnf\fR consult \fBfnf\fR(1).
.TP
\fBClifm\fR can perform fuzzy TAB completion (just as suggestions) for file names and paths (e.g. "dwn" is completed/suggested as "Downloads"). To enable this feature use the \fI\-\-fuzzy\-matching\fR command line switch or set \fIFuzzyMatching\fR to \fItrue\fR in the configuration file.
.TP
Besides the default \fITAB completion\fR for command \fBnames and paths\fR, you can also expand \fBELN's\fR using the TAB key. Example: type 'o 12', press TAB, and it becomes 'o filename ', or, if 12 refers to a directory, 'o dir/'. \fBclifm\fR uses a Bash\-style quoting system, so that this file name: "this is a test@version{1}" is expanded as follows: this\\ is\\ a\\ test\\@version\\{1\\}
.TP
ELN's and \fBELN ranges\fR will be also automatically expanded, provided the corresponding ELN's actually exist, that is to say, provided some file name is listed on the screen under those numbers. For example: 'diff 1 118' will only expand '1', but not '118', if there is no ELN 118. In the same way, the range 1\-118 will only be expanded provided there are 118 or more elements listed on the screen. Note that the second field oa a range can be omitted, in which case the ELN of the last listed file is assumed (e.g.: provided there are 100 listed files, 12\- is equivalent to 12\-100).
.TP
Since ranges could be a bit tricky, TAB completion is available to make sure this range actually includes the desired file names.
.TP
If this feature somehow conflicts with the command you want to run, say, 'chmod 644 ...', because the current amount of files is equal or larger than 644 (in which case \fBclifm\fR will expand that number), then you can simply run the command as external: ';chmod 644 ...'
.TP
TAB completion for commands, paths, users home directory, workspaces, wildcards\fB*\fR, file types\fB*\fR, environment variables, bookmarks, profiles, color schemes, file tags, commands history, directory history (via the \fIjump\fR command), remote resources, sort methods, ranges\fB*\fR, the 'sel' keyword\fB*\fR, trashed files\fB*\fR, plus the deselect\fB*\fR and the open\-with commands (\fIow\fR) is also available. To make use of the bookmarks completion, make sure to specify some name for your bookmarks, since these names are used by the completion function.
.TP
\fB*\fR When using FZF mode for TAB completion, multi\-selection is available: Press TAB to expand possible selections, then press TAB again to mark desired entries. Once desired entries are marked, press Enter or the Right arrow key: marked entries will be inserted into the command line. Multi\-selection is also available for the following commands, provided there is no slash in the query string: \fIac\fR, \fIad\fR, \fIbb\fR, \fIbr\fR, \fId/dup\fR, \fIp/pr/prop\fR, \fIr\fR, \fIs\fR, \fIt/tr/trash\fR, and \fIte\fR.
.TP
Of course, combinations of all these features is also possible. Example: \fIcp sel file* 2 23\-31 .\fR will copy all selected files, plus all files whose name starts with "file", plus those files corresponding to the ELN\'s 2, and 23 to 31, into the current working directory.
.TP
In addition to completions and expansions, an \fIauto\-suggestions system\fR is also available. See the \fBAUTO\-SUGGESTIONS\fR section below.

.SH 9. RESOURCE OPENER
As \fBclifm\fR\'s built\-in resource opener, \fILira\fR takes care of opening files when no opening application has been specified in the command line. It does this by automatically parsing a MIME list file (see the \fBFILES\fR section below): it looks first for a matching pattern (either a MIME type or a file name), then checks the existence of the command associated to this pattern, and finally executes it.
.TP
\fILira\fR is controlled via the \fImime\fR command. File associations are stored in the MIME list file.
.TP
When running for the first time, or whenever the MIME list file cannot be found, \fBclifm\fR will copy the MIME definitions file from the \fBDATADIR\fR directory (usually \fI/usr/share/clifm/mimelist.clifm\fR) to the local configuration directory.
.TP
\fBLira\fR will check the file line by line, and if a matching line is found, and if at least one of the specified applications exists, this application will be used to open the corresponding associated file. Else, the next line will be checked. In other words, the precedence order is top to bottom (for lines) and left to right (for applications).
.TP
\fBNote\fR: In case of directories (whose MIME type is \fIinode/directory\fR), the entry will be used \fBonly\fR for the open\-with command (\fIow\fR).
.TP
\fB1. Syntax\fR
.TP
In its most basic form, each line in the MIME list file consists of:
.TP
\fBa)\fR A left value: this is just a regular expression indicating what we are trying to match (it can be a file name, a file extension, or a MIME type).
.TP
\fBb)\fR A right value: a semicolon separated list of commands to be used as the opening application (the first existing program found in this list will be used).
.TP
For example:

 ^text/.*=leafpad
.TP
which is to be read as follows: Open text files (in this case we are partially matching a MIME type) using \fBleafpad\fR.
.TP
As explained below, this basic rule can be modified to get much more control on \fBwhat\fR we are matching and \fBhow\fR we execute the opening application.
.TP
The syntax is this:

 [!][X:][N:]REGEX=CMD [ARGS] [%[f,x]] [![E,O]] [&]; ...
.TP
Note that this syntax departs from the Freedesktop specification in that we do not rely on desktop files (mostly used by desktop environments), but rather on \fBcommands and parameters\fR.
.TP
\fB2. The left value (REGEX)\fR
.TP
\fB2.1. The X prefix\fR
.TP
Without any prefixes, the rule will attempt to match MIME types, disregarding if we are running on a graphical or non-graphical environment. For example,

 ^text/.*=leafpad
.TP
instructs \fBlira\fR to open all text files using \fBleafpad\fR, no matter if we are running on a graphical or non-graphical environment.
.TP
However, we usually do not want to use \fBleafpad\fR if we are not running on a graphical environment. In this case, we can write a double rule as follows:

 X:^text/.*=leafpad
 !X:^text/.*=nano
.TP
where the first rule (via the \fBX\fR prefix) is intended for use on graphical environments, where we can use \fBleafpad\fR, and the second one (via the \fB!X\fR prefix) for non-graphical environments, where we rather prefer to use \fBnano\fR.
.TP
\fB2.2. The N prefix\fR
.TP
Sometimes MIME types are not enough to identify a file, or we just want to match a specific file name. In this case, we can use the \fBN\fR prefix to tell \fBLira\fR that we want to match a file name instead of a MIME type. For example:

 X:N:^filename.txt$=leafpad
.TP
in which case we want to match exactly the file name \fIfilename.txt\fR (no matter its MIME type).
.TP
If we want to match file extensions, instead of entire file names, we can use a regular expression, as follows:

 X:N:.*\.txt$=leafpad
.TP
Here, we are not matching a specific file name, but a specific file extension, so that the rule reads as follows: open all files ending with .txt using \fBleafpad\fR.
.TP
\fB3. The right value (CMD)\fR
.TP
The right value is a semicolon separated list of commands, each of which contains a command, and optionally, command arguments and modifiers. For example:

 X:N:.*\.txt$=leafpad --sync,geany,mousepad,nano
.TP
which means: Open .txt files (graphical environments only) using \fIleafpad --sync\fR, or, if not found, \fIgeany\fR, \fImousepad\fR, or \fInano\fR, in this order. The file to be opened will be appended to the command string, say \fIleafpad --sync FILE\fR.
.TP
\fB3.1. The %f placeholder\fR
.TP
Use the \fB%f\fR placeholder to specify the position of the file to be opened in the command, for example:

 mpv %f --terminal=no
.TP
will be translated into: \fImpv FILE --terminal=no\fR
.TP
If the placeholder is not specified, the file to be opened will be appended to the command string. Thus, this: \fImpv --terminal=no\fR amounts to this: \fImpv --terminal=no FILE\fR.
.TP
\fB3.2. STDERR and STDOUT\fR
.TP
Sometimes we might need to silence either standard error (\fBSTDERR\fR), standard output (\fBSTDOUT\fR), or both. Use \fB!E\fR and \fB!O\fR to silence them respectively. Both can be used together: \fB!EO\fR. Example: \fIleafpad %f !EO\fR, or, to silence only \fBSTDERR\fR: \fIleafpad %f !E\fR.
.TP
\fB3.3. Run in the background\fR
.TP
The ampersand character (\fB&\fR) can be used, as usual, to run the opening application in the background. Example: \fIleafpad %f &\fR.
.TP
\fB3.4. The %x flag\fR
.TP
The \fB%x\fR flag is a shorthand for "\fB%f !EO &\fR": the command will be executed in the background and both \fBSTDOUT\fR and \fBSTDERR\fR will be silenced. This flag is recommended to open files via graphical applications. Examples:
.TP
For GUI applications:

 APP %x
.TP
For terminal applications:

 TERM -e APP %x
.TP
Replace TERM and APP by the appropriate values (say, xterm and vi respectively). The -e option might vary depending on the terminal emulator used.
.TP
\fBNote\fR: In case of archives, the built-in \fIad\fR command can be used as opening application.
.TP
\fB3.5. Environment variables\fR
.TP
Environment variables (e.g. \fB$EDITOR\fR, \fB$VISUAL\fR, \fB$BROWSER\fR, and even \fB$PAGER\fR) are also recognized by \fILira\fR. You can even set custom environment variables to be used exclusively by \fBclifm\fR. For example, you can set \fBCLIFM_TERM\fR, \fBCLIFM_EDITOR\fR, and \fBCLIFM_PDF\fR, and then use them to define some associations:

 X:text/plain=$CLIFM_TERM \-e $CLIFM_EDITOR %f &
 X:N:.*\\.pdf$=$CLIFM_PDF %f &
.TP
\fB3.6. Using shell scripts\fR
Bear in mind that commands will be executed directly without shell intervention, so that no shell goodies (like pipes, conditions, loops, etc) are available. In case you need something more complex than a single command (including shell capabilities) write your own script and place the path to the script in place of the command. For example:

 X:^text/.*:~/scripts/my_cool_script.sh
.TP
\fB4. Examples\fR:
.TP
Match a full file name:

 X:N:some_filename=nano;vim;vi;emacs
.TP
\fBNote\fR: If the file name contains a dot, quote it like this: some_filename\\.ext (to prevent the REGEX parser from interpreting the dot).
.TP
Open video files with \fBmpv\fR in the foreground and silence STDERR:

 ^video/.*=mpv %f !E
.TP
Open video files with \fBgmplayer\fR in the background and silence both STDERR and STDOUT:

 ^video/.*=gmplayer %f !EO & (or 'gmplayer %x')
.TP
Match multiple file names (starting with "str"):

 X:N:^str.*=leafpad %x;mousepad %x;kate %x;gedit %x
.TP
Match a single extension:

 X:N:.*\\.txt$=leafpad %x;mousepad %x;kate %x;gedit %x
 !X:N:.*\\.^txt$=nano;vim;vi;emacs
.TP
Match multiple extensions:

 X:N:.*\\.(sh|c|py|pl)$:geany %x;leafpad %x;nano
.TP
Match a single mimetype:

 !X:^audio/mp3$=mpv %f \-\-terminal=no;ffplay \-nodisp \-autoexit;mpv;mplayer
.TP
Match mutiple mimetypes:

 X:^audio/.*=mplayer;mplayer2;vlc %x;gmplayer %x;smplayer %x;totem %x
.TP
In case of MIME types, you can also write the entire expression without relying on any regular expression. For example:

 !X:text/plain=$TERM \-e $EDITOR %x
.TP
For more information take a look at the mimelist file itself (\fIF6\fR or \fImm edit\fR).
.TP
\fB5. Using a third\-party opener\fR
.TP
This can be done in two ways:
.TP
\fBa.\fR Set \fIOpener\fR in the configuration file to the name of the desired opener. For example, to use Ranger's \fBrifle\fR(1):

 Opener=rifle
.TP
or, if you prefer \fBxdg\-open\fR(1):

 Opener=xdg\-open
.TP
\fBb.\fR Tell \fILira\fR to open all files, no matter the MIME type or file name, via the desired opener. For example:

 .*=rifle
.TP
\fB6. Using Clifm as a standalone resource opener\fR
.TP
Thought \fBclifm\fR is a file manager, it can be used as a simple resource opener via the \fI\-\-open\fR command line option. For example:

 clifm \-\-open /path/to/my_file.jpg
 clifm \-\-open /path/to/my_dir
 clifm \-\-open https://some_domain
.TP
\fBNote\fR: When opening web resources \fBclifm\fR will query the mimelist file using text/html as MIME type. Whatever association it finds for this specific MIME type will be used to open the web resource.

.SH 10. SHOTGUN
\fB1. TAB completion with file previews\fR
.TP
\fIShotgun\fR is \fBclifm\fR\'s built\-in files previewer. Though, as described below, it may be used as a standalone and general purpose file previewer (similar in this regard to \fBpistol\fR(1)), it is mainly intended to be used by \fBclifm\fR's TAB completion function running in FZF mode: every time TAB completion is invoked for files, \fIshotgun\fR will be executed with the currently highlighted file as argument (as shown below) to generate the preview. Set the \fIFzfPreview\fR option in the configuration file to \fIfalse\fR (or run with \fI\-\-no\-fzfpreview\fR) to disable this feature.
.TP
\fIShotgun\fR is also used by the \fIview\fR command to display file previews in full screen.
.TP
\fB2. Running as a standalone files previewer\fR
.TP
Executed via the \fI\-\-preview\fR command line switch, \fIshotgun\fR performs file preview for any file passed as argument. For example:

        clifm \-\-preview myfile.txt
.TP
This command generates a preview of the file \fImyfile.txt\fR and immediately afterwards quits  \fBclifm\fR.
.TP
\fB3. Customization
.TP
Previewing applications (based on either MIME type or file name) are defined in a configuration file (\fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/preview.clifm\fR) using the same syntax used by \fILira\fR (the built\-in resource opener). See the \fBRESOURCE OPENER\fR section above.
.TP
You can set an alternative configuration file via the \fI\-\-shotgun\-file\fR command line switch:

 clifm \-\-shotgun\-file=/path/to/shotgun/config/file \-\-preview=myfile.txt
.TP
To customize the appearance of the preview window, use the \fI\-\-preview\-window\fR option in the \fIFzfTabOptions\fR line in the current color scheme file. For example, if you want the preview window down the files list (instead of to the right):

 \-\-preview\-window=down
.TP
Default keybindings for the preview window:
.sp
 Alt\-p: Toggle the preview window on/off
 Ctrl\-Up / Shift\-Up: Scroll the preview window up one line
 Ctrl\-Down / Shift\-Down: Scroll the preview window down one line
 Alt\-Up: Scroll the preview window up one page
 Alt\-Down: Scroll the preview window down one page
.TP
Keybindings can be customized using the \fI\-\-bind\fR option in the \fIFzfTabOptions\fR field in the color scheme file.
.TP
Consult \fBfzf\fR(1) for more information.
.TP
\fB4. Image previews\fR
.TP
Image previews are available via the \fIclifmimg\fR plugin. Consult the Wiki for more information: \fIhttps://github.com/leo\-arch/clifm/tree/master/misc/tools/imgprev\fR

.SH 11. AUTO\-SUGGESTIONS
\fIGemini\fR is a built\-in suggestions system (similar to that provided by the Fish shell). As you type, \fIGemini\fR will suggest possible completions right after the current cursor position.

The following checks are availabe (the order can be customized, see below):
.sp
a. ELN\'s
.sp
b. \fBclifm\fR commands and parameters (including the \fIsel\fR keyword)
.sp
c. Entries in the command history list (already used commands)
.sp
d. File names in the current working directory and paths \fB(1)\fR
.sp
e. Entries in the jump database
.sp
f. Aliases names
.sp
g. Bookmarks names
.sp
h. Program names in \fBPATH\fR
.sp
i. Shell builtins \fB(2)\fR

\fB(1)\fR Fuzzy suggestions are supported. For example: dwn > Downloads. Enable this feature via the \fI\-\-fuzzy\-marching\fR command line switch or setting \fIFuzzyMatching\fR to \fItrue\fR in the configuration file.
.sp 0
\fB(2)\fR The shell name is taken from \fI/bin/sh\fR. The following shells are supported: bash, dash, fish, ksh, tcsh, and zsh. Command names are checked in the following order: \fBclifm\fR internal commands, commands in \fBPATH\fR, and shell builtins.
.sp
\fBNote\fR: By default, a brief description for internal commands is suggested. You can disable this feature via the \fISuggestCmdDesc\fR option in the configuration file.
.sp
To accept the entire suggestion press \fBRight\fR or \fBCtrl\-f\fR: the cursor will move to the end of the suggested command and the suggestion color will change to that of the typed text; next, you can press \fBEnter\fR to execute the command as usual. Otherwise, if the suggestion is not accepted, it will be simply ignored and you can continue editing the current command line however you want.

To accept the first suggested word only (up to first slash or space), press rather \fIAlt\-Right\fR or \fIAlt\-f\fR. Not available for ELN\'s, aliases and bookmarks names.

Bear in mind that suggestions for ELN\'s, aliases, bookmarks names, the jump function (invoked by the \fIj\fR command), just as file names and paths (if fuzzy\-suggestions are enabled) do not work as the remaining suggestions: they do not suggest possible completions for the current input, but rather the value pointed to by it. For example, if you type "12" and the current list of files includes a file name whose ELN is '12', the file name corresponding to this ELN will be printed next to "12" as follows: \fB12_ > filename\fR (where the underscore is the current cursor position). Press \fIRight\fR or \fICtrl\-f\fR to accept the suggestion, in which case the text typed so far will be replaced by the suggestion.

The order of the suggestion checks could be customized via the \fISuggestionStrategy\fR option in the configuration file. Each check is assigned a lowercase letter:

 a = Aliases names
 b = Bookmark names
 c = Possible completions
 e = ELN's
 f = Files in the current directory
 h = Entries in the commands history
 j = Entries in the jump database

The value taken by \fISuggestionStrategy\fR is a string of seven (7) characters containing the above letters. The letters order in this string specifies the order in which the suggestion checks will be performed. For example, to perform all checks in the same order above, the value of the string should be \fBabcefhj\fR (without quotes). Or, if you prefer to run the history check first: \fBhabcefj\fR. Finally, you can ignore one or more checks using a dash (\-). So, to ignore the bookmarks and aliases checks, set \fISuggestionStrategy\fR to \fBh\-\-cefj\fR. The default value for this option is \fBehfjbac\fR.

\fBNote\fR: The check for program names in \fBPATH\fR is always executed at last, except when the \fIExternalCommands\fR option is disabled, in which case suggestions for them are simply not displayed.

Suggestions will be printed using one of the following color codes (see the \fBCOLOR CODES\fR section above):

\fIsf\fR: Used for file and directory names. This includes suggestions for ELN\'s, bookmarks names, files in the current directory, and possible completions. Default value: 02;04;36 (dimmed underlined cyan)

\fIsh\fR: Used for entries in the commands history. Default value: 02;35 (dimmed magenta)

\fIsc\fR: Used for aliases and program names in \fBPATH\fR. Default value: 02;31 (dimmed red)

\fIsx\fR: Used for \fBclifm\fR internal commands and parameters. Default value: 02;32 (dimmed green)

\fIsp\fR: Greater\-than sign (>) used when suggesting ELN\'s, bookmarks, and aliases names. Default value: 02;31 (dimmed red)

You can set \fISuggestFiletypeColor\fR to \fItrue\fR in the configuration file to use the color of the file type of the current file name (as set in the color scheme file) instead of the value of
\fIsf\fR. For example, if a suggestion is printed for a file that is a symbolic link, \fIln\fR or \fIor\fR (if a broken link) will be used instead of \fIsf\fR.

.SH 12. SHELL FUNCTIONS
\fBClifm\fR includes a few shell functions to perform specific actions (cd\-on\-quit, file\-picker, and subshell\-notice). Take a look at the corresponding files, in \fI/usr/share/clifm/functions\fR, and follow the instructions. Needles to say, you can write your own functions.

.SH 13. PLUGINS
Plugins are just scripts or programs (written in any language) intended to add, extend or improve \fBclifm\fR\'s functionalities. They are linked to actions names defined in a dedicated configuration file (\fIXDG_CONFIG_HOME/clifm/profiles/PROFILE/actions.clifm\fR).

\fBNote\fR: In \fIstealth mode\fR, since access to configuration files is not allowed, plugins are disabled.

To list available actions and the plugins they are linked to, run \fIactions\fR.

To execute a given plugin, enter the corresponding action name (plus parameters if requiered).

To get information about a specific plugin, enter the action name followed by \fI\-\-help\fR.

Though several plugins are provided at installation time (in the \fIplugins\fR directory), you can write your owns as you like, with any language you like, and for whatever goal you want. Writing plugins is generally quite easy; but your mileage may vary depending on what you are trying to achieve. A good place to start is examining the provide plugins and reading the \fIactions\fR command description, and the \fBENVIRONMENT\fR and \fBFILES\fR sections below.

A convenient helper script is provided to get a consistent look across all plugins, specially those running FZF. This helper script is located in \fIDATADIR/clifm/plugins/plugins\-helper\fR, but it will be overridden by \fIXDG_CONFIG_HOME/clifm/plugins/plugins\-helper\fR if found. The location of this file is set by \fBclifm\fR itself in the \fBCLIFM_PLUGINS_HELPER\fR environment variable to be used by plugins. Source the file and use any of the functions and variables provided by it to write a new FZF plugin:

    # Source our plugins helper
    if [ \-z "$CLIFM_PLUGINS_HELPER" ] || ! [ \-f "$CLIFM_PLUGINS_HELPER" ]; then
        printf "\fBclifm\fR: Unable to find plugins\-helper file\\n" >&2
        exit 1
    fi
    # shellcheck source=/dev/null
    . "$CLIFM_PLUGINS_HELPER"

Plugins can talk to \fBclifm\fR via a dedicated pipe created for this purpose and exposed via an environment variable (\fBCLIFM_BUS\fR). Write to the pipe and \fBclifm\fR will hear and handle the message immediately after the plugin's execution. If the message is a path, \fBclifm\fR will run the \fIopen\fR function, changing the current directory to the new path, if a directory, or opening it with the \fIresource opener\fR, if a file. Otherwise, if the message is not a path, it will be taken and executed as a command. Examples:

    \'echo "/tmp" > "$CLIFM_BUS"\' tells \fBclifm\fR to change the current directory to /tmp

    \'echo "s *.png" > "$CLIFM_BUS"\' makes \fBclifm\fR select all files in the current directory ending with ".png"

The pipe (\fBCLIFM_BUS\fR) is deleted immediately after the execution of its content and recreated before running any other plugin.
.sp
This is a list of available plugins:
.TS
allbox;
lb lb lb
l l l.
Action name	Description	Dependencies
T{
bn
T}	Create files in batch	\-
T{
bcp
T}	Copy files in batch	\-
T{
bmi
T}	Import bookmarks	\-
T{
clip
T}	Interact with the system clipboard	\fB(1)\fR
T{
\fIunset\fR
T}	Test terminal\'s colors capability	\fB(2)\fR
T{
cr
T}	Copy files to a remote location	fzf, and scp, ffsend, or croc
T{
da
T}	Disk usage analyzer	du, fzf
T{
dr
T}	Drag and drop files	dragon or dragon\-drag\-and\-drop
T{
fdups
T}	Find/remove file dups	\fB(3)\fR
T{
+
T}	Find files in the current directory	fzf or rofi
T{
_ (underscore)
T}	Quickly change directory	fzf
T{
h
T}	Browse the commands history	fzf
T{
\- (yes, just a dash)
T}	Navigate/select/preview files	See section below
T{
*
T}	Select files (includes flat view)	fzf, find
T{
**
T}	Deselect files	fzf
T{
\fIunset\fR
T}	Show git repo status	git \fB(4)\fR
T{
ih
T}	Browse \fBclifm\fR's manpage	fzf
T{
i
T}	Image thumbnails previewer	sxiv, feh or lsix
T{
++
T}	Jump to a directory in the jump database	fzf or rofi
T{
kbgen
T}	Get escape codes for keybindings	\fB(5)\fR
T{
kd
T}	Decrypt a GnuPG encrypted file	gpg, tar, sed, grep
T{
ke
T}	Encrypt files/dirs using GnuPG	gpg, tar, sed, fzf, awk, xargs
T{
ml
T}	List files by a given MIME type	fzf, file
T{
music
T}	Create a music playlist	mplayer
T{
gg
T}	Pipe files in CWD through a pager	less, column
T{
ptot
T}	Preview PDF files as text	pdftotext
T{
rrm
T}	Recursively remove files	find, fzf
T{
//
T}	Search files by content	fzf, ripgrep
T{
\fIunset\fR
T}	Update plugins	\fB(6)\fR
T{
vid
T}	Preview video files thumbnails	ffmpegthumbnailer
T{
vt
T}	Virtual directory for sets of files	sed
T{
wall
T}	Set image as wallpaper	\fB(7)\fR
T{
Ctrl-y
T}	Copy the line buffer to the clipboard	\fB(8)\fR
.TE

.sp
\fB(1)\fR xclip or xsel (Xorg), wl\-copy/wl\-paste (Wayland), clipboard (Haiku), clip (Cygwin), pbcopy/pbget (MacOS), termux\-clipboard\-get/termux\-clipboard\-set (Termux), cb (cross\-platform: https://github.com/Slackadays/Clipboard)
.sp
\fB(2)\fR \fIcolors.sh\fR (by default unset)
.sp
\fB(3)\fR find, md5sum, sort, uniq, xargs, sed, stat
.sp
\fB(4)\fR The \fIgit_status.sh\fR plugin is not intended to be used as a normal plugin, that is, executed via an action name, but rather to be executed as a prompt command (it will be executed immediately before each prompt). Add this line to the main configuration file:

 promptcmd /usr/share/clifm/plugins/git_status.sh
.sp
Whereas this plugin provides basic Git integration, it could be easily modified (it is just a few lines long) to include whatever git function you might need.
.sp
\fB(5)\fR It needs to be compiled first: \fIgcc \-o kbgen kbgen.c \-lcurses\fR
.sp
\fB(6)\fR \fIupdate.sh\fR (by default unset)
.sp
\fB(7)\fR feh, xloadimage, hsetroot, or nitrogen (for X); swww or swaybg (for Wayland)
.sp
\fB(8)\fR Dependencies: cb, wl\-copy, xclip, xsel, pbcopy, termux\-clipboard\-set, clipboard, or clip. Consult the plugin file itself (\fIxclip.sh\fR) for more information

.B Dependencies of the previewer plugin (fzfnav.sh)

  \fBarchives\fR: atool, bsdtar, or tar
  \fBimages\fR: kitty terminal, imagemagick, and ueberzug or viu or catimg or img2txt or pixterm
  \fBfonts\fR: fontpreview or fontforge
  \fBdocs\fR: libreoffice, catdoc, odt2txt, pandoc
  \fBPDF\fR: pdftoppm, pdftotext or mutool
  \fBepub\fR: epub\-thumbnailer
  \fBDjVu\fR: djvulibre or djvutxt
  \fBpostscript\fR: ghostscript
  \fBvideos\fR: ffmpegthumbnailer
  \fBaudio\fR: ffmpeg, mplayer, or mpv
  \fBweb\fR: w3m, links, elinks, or pandoc
  \fBmarkdown\fR: glow
  \fBhighlight\fR: bat, highlight, or pygmentize
  \fBtorrent\fR: transmission\-cli
  \fBjson\fR: python or pq
  \fBfile info\fR: exiftool, mediainfo, or file

.TP
To run the \fIpager.sh\fR plugin, for example, you only need to enter the corresponding action name, in this case \fIgg\fR. In case of need, all plugins provide a \fI\-h,\-\-help\fR switch for a brief usage description.
.TP
\fBNote\fR: The \fIfzfnav\fR plugin uses \fBfzf\fR(1) to navigate the file system and \fIBFG\fR (a script located in the plugins directory) to show previews (to display image previews \fIBFG\fR requires \fBueberzug\fR(1) or the Kitty protocol via the Kitty terminal). A configuration file (\fIBFG.cfg\fR, in the plugins directory itself) is provided to customize the previewer's behavior.
.TP
\fBNote 2\fR: An alternative files previewing function (built\-in, and thereby faster than \fIBFG\fR) is provided by \fIshotgun\fR. See the \fBSHOTGUN\fR section above for more information.
.TP
In addition to the built\-in \fIBFG\fR previewer, \fIfzfnav\fR supports the use of both Ranger\'s \fIscope.sh\fR script and \fBpistol\fR(1). To use \fBscope\fR, edit the \fIBFG\fR configuration file and set USE_SCOPE to 1 and SCOPE_FILE to the correct path to the \fIscope.sh\fR file (normally \fI$HOME/.config/ranger/scope.sh\fR). To use \fBpistol\fR instead, set USE_PISTOL to 1.
.TP
.TP
Take a look at the Wiki for more information: \fIhttps://github.com/clifm/wiki/Advanced#plugins\fR

.SH 14. AUTOCOMMANDS
Heavily inspired by \fBVifm\fR, the \fIautocommands\fR function allows the user a fine\-grained control over \fBclifm\fR settings. It is mostly devised as a way to improve performance for remote file systems (usually slower than local ones) by allowing you to turn off some features (like the files counter) that might greatly affect performance under some circumstances (like remote connections). However, the \fIautocommands\fR function is not restricted to this specific use case: use it for whatever purpose you find useful.
.sp
Add a line preceded by the \fIautocmd\fR keyword to the config file. The general syntax is:
 \fIautocmd TARGET cmd,cmd,cmd\fR
.sp
\fBTARGET\fR specifies the object to which subsequent commands will apply. It can match either \fBdirectory names (paths)\fR or \fBworkspaces\fR.
.sp
1. To match directory names use a glob pattern. If no glob metacharacter is provided, the string will be compared as is to the current working directory. To invert the meaning of a pattern, prepend an exclamation mark. To match all directories under a specific directory (including this directory itself) use the double asterisk (**). A few examples:
.sp
 \fB~/Downloads\fR      Match exactly the Downloads directory (and \fIonly\fR this directory) in your home directory
 \fB~/Downloads/*\fR    Match all subdirectories in ~/Downloads (\fIexcluding\fR the Downloads directory itself)
 \fB/~/Downloads/**\fR  \fIRecursively\fR match all subdirectories in ~/Downloads (\fIincluding\fR the Downloads directory itself)
 \fB~/Downloads/*.d\fR  Match all subdirectories in ~/Downloads ending with ".d" (\fRexcluding\fR the Downloads directory itself)
 \fB!~/Downloads\fR     Match everything except the \fI~/Downloads\fR directory
.sp
2. \fBTARGET\fR is also able to match workspaces using the ampersand character (@) followed by the ws keyword and then the workspace number. For example, to match the third workspace: \fI@ws3\fR, and to match the first workspace: \fI@ws1\fR.
.sp
\fBTARGET\fR is followed by a comma separated list of commands:
.sp
\fB!CMD\fR: The exclamation mark allows you to run shell commands, custom binaries or scripts
.sp
The following codes are used to control \fBclifm\fR's files list:
.sp
 \fBCode   Description           Example\fR
 \fBcs\fR     Color scheme          cs=zenburn
 \fBfc\fR     Files counter         fc=0
 \fBhf\fR     Hidden files          hf=0
 \fBlm\fR     Light mode            lm=1
 \fBlv\fR     Long/detail view      lv=0
 \fBmf\fR     Max files             mf=100
 \fBmn\fR     Max file name length  mn=20
 \fBod\fR     Only directories      od=1
 \fBpg\fR     Pager                 pg=0
 \fBst\fR     Sort method           st=5
 \fBsr\fR     Reverse sort          sr=1
.sp
A few example lines:
.sp
 \fB1.\fR Run in light mode and disable the files counter for the \fIremotes\fR directory:\fB(1)\fR
    autocmd /media/remotes/** lm=1,fc=0

 \fB2.\fR Just a friendly reminder:
    autcomd ~/important !printf "Important: keep your fingers outta here!\\n" && read \-n1

 \fB3.\fR This directory has thousands of files. Show only the first hundred and enable the pager:
    autocmd /usr/bin mf=100,pg=1

 \fB4.\fR Lots of media files (with large file names). Trim file names to 20 chars max and  run the files previewer:\fB(2)\fR
    autocmd ~/Downloads mn=20,!~/.config/clifm/plugins/fzfnav.sh

 \fB5.\fR I want the second workspace, no matter what the current directory is, to list files in long/detail view:
    autocmd @ws2 lv=1

 \fB6.\fR Mmm, just because I can. Be creative!
    autocmd /home/user hf=0,cs=nord,lv=1
    autocmd / lv=1,fc=0,cs=solarized,st=5
.sp
\fB(1)\fR This is the recommended configuration for remote file systems
.sp 0
\fB(2)\fR As seen here, plugins could be used as well: in this case, we want to run \fIfzfnav\fR (to make use of the files preview capability) whenever we enter into the \fIDownloads\fR directory, usually containing videos, music, and images.
\fBNOTE\fR: If you decide to use a plugin, bear in mind that it won\'t be able to communicate with \fBclifm\fR, because the \fIautocommand\fR function always executes commands as external applications using the system shell.
.sp
Bear in mind that \fIautocmd\fR directives are evaluated from top to bottom, so that only the first matching target will be executed. This can be used to exclude some target from a subsequent directive. For instance, if you want all subdirectories in \fI~/Downloads\fR, except \fImydir\fR, to be listed in light mode, write the following directives:
.sp
    autocmd ~/Downloads/mydir/** lm=0
    autocmd ~/Downloads/** lm=1
.sp
Since the first directive is evaluated before the second one, this latter will apply to everything under \fIDownloads\fR, exception made of \fImydir\fR (and subdirectories).
.sp
\fBAutocommand files: \fI.cfm.in\fB and \fI.cfm.out\fR
.sp
To use this feature, you must first set \fIReadAutocmdFiles\fR to \fItrue\fR in the main configuration file. However, bear in mind that autocommand files won't ever be read if running on an untrusted environment (i.e. if running with \fI\-\-secure\-cmds\fR, \fI\-\-secure\-env\fR, or \fI\-\-secure\-env\-full\fR).
.sp
Two files are specifically checked by the autocommands function: \fI.cfm.in\fR and \fI.cfm.out\fR (they must be non-empty regular files of at most \fBPATH_MAX\fR (usually 4096) bytes, and no NUL byte must be contained in them).
.sp
The content of these files is a single instruction, either a shell command or, if you need more elaborated stuff, a script (or custom binary). Note that codes to modify \fBclifm\fR's settings (as described above) are not available here.
.sp
If a directory contains a file named \fI.cfm.in\fR, \fBclifm\fR will execute (via the system shell) its content when \fBentering\fR this directory (before listing files). If the file is named rather \fI.cfm.out\fR, its content will be executed immediately after \fBleaving\fR this directory (and before listing the new directory's content).
.sp
For example, if you want a simple notification whenever you enter or leave your home directory, create both \fI.cfm.in\fR and \fI.cfm.out\fR files in the home directory with the following content:
.sp
For \fI.cfm.in\fR:
   printf "Entering %s ..." "$PWD" && read \-n1 && clear
.sp
For \fI.cfm.out\fR:
   printf "Leaving %s ..." "$OLDPWD" && read \-n1

.SH 15. FILE TAGS
.sp
\fIEtiqueta\fR is \fBclifm\fR's built\-in files tagging system
.sp
\fB1. How does Etiqueta work?\fR
.sp
File tags are created via symlinks using a specific directory under the user's profile: \fI${XDG_CONFIG_DIR:\-/home/USER/.config}/clifm/profiles/USER/tags\fR
.sp
Every time a new tag is created, a new directory named as the tag itself is created in the tags directory. Tagged files are just symbolic links to the actual files created in the appropriate directory. For example, if you tag \fI~/myfile.txt\fR as \fIwork\fR, a symbolic link to \fI~/myfile.txt\fR, named \fImyfile.txt\fR will be created in \fItags/work\fR.
.sp
\fB2. Handling file tags\fR
.sp
\fItag\fR is the main \fBEtiqueta\fR command and is used to handle file tags. Its syntax is as follows:

 tag [add, del, list, list\-full, new, merge, rename, untag] [FILE]... [[:]TAG]

NOTE: The \fI:TAG\fR notation is used for commands taking both file and tag names: 'tag add FILES(s) :TAG ...', to tag files, and 'tag untag :TAG file1 file2', to untag files. Otherwise, \fITAG\fR is used (without the leading colon). For example: '\fItag new docs\fR', to create a new tag named \fIdocs\fR, or 'tag del png', to delete the tag named \fIpng\fR.
.sp
Both short and long command format can be used:

.sp
.TS
allbox;
lb lb lb
l l l.
Short format	Long format	Description
T{
ta
T}	tag add	Tag files
T{
td
T}	tag del	Delete tag(s)
T{
tl
T}	tag list	List tags or tagged files
T{
tm
T}	tag rename	Rename tags
T{
tn
T}	tag new	Create new tag(s)
T{
tu
T}	tag untag	Untag file(s)
T{
ty
T}	tag merge	Merge two tags
.TE

.sp
\fB3. Usage examples\fR

.sp
.TS
allbox;
lb lb lb
l l l.
Short format	Long format	Description
T{
tl
T}	tag list	List available tags
T{
\-
T}	tag list\-full	List available tags and all tagged files
T{
tl work
T}	tag list work	List all files tagged as \fIwork\fR
T{
tl file.txt
T}	tag list file.txt	List tags applied to the file \fIfile.txt\fR
T{
tn dogs cats
T}	tag new dogs cats	Create two empty tags: \fIdogs\fR and \fIcats\fR
T{
ta *.png :images :png
T}	tag add *.png :images :png	Tag PNG files as both \fIimages\fR and \fIpng\fR \fB(1) (2)\fR
T{
ta sel :special
T}	tag add sel :special	Tag all selected files as \fIspecial\fR
T{
tr documents docs
T}	tag rename documents docs	Rename the tag \fIdocuments\fR as \fIdocs\fR
T{
ty png images
T}	tag merge png images	Merge the tag \fIpng\fR into \fIimages\fR \fB(3)\fR
T{
td images
T}	tag del images	Remove the tag \fIimages\fR \fB(4)\fR
T{
tu :work file1 dir2
T}	tag untag :work file1 dir2	Untag a few files from \fIwork\fR \fB(5)\fR
.TE

.sp
\fB(1)\fR Tags are created if they do not exist
.sp 0
\fB(2)\fR Since \fIadd\fR is the default action, it can be omitted: \fItag *.png :images :png\fR.
.sp 0
\fB(3)\fR All files tagged as \fIpng\fR will be now tagged as \fIimage\fRs, and the \fIpng\fR tag will be removed.
.sp 0
\fB(4)\fR Untag all files tagged as \fIimages\fR and remove the tag itself
.sp 0
\fB(5)\fR TAB completion is available to complete tagged files. If using the FZF mode, multiple files can be selected using the the TAB key.
.sp
\fB4. Operating on tagged files\fR
.sp
The \fIt:TAG\fR construct (or tag expression) is used to operate on tagged files via any command, be it internal or external. A few examples:

.sp
.TS
allbox;
lb lb
l l.
Command	Description
T{
p t:docs
T}	Print properties of files tagged as \fIdocs\fR
T{
r t:images
T}	Remove all files tagged as \fIimages\fR
T{
stat t:docs t:work
T}	Run stat(1) over all files tagged as \fIdocs\fR and all files tagged as \fIwork\fR
.TE

.sp
\fB4.1 Operating on \fIspecific\fB tagged files\fR
.sp
\fBNOTE\fR: This feature, as always when multi\-selection is involved, is only available when TAB completion mode is set to FZF. See the \fBTAB completion\fR subsection of the \fBBUILT\-IN\-EXPANSIONS\fR section above.
.sp
You might not want to operate on \fBall\fR files tagged as some specific tag, say \fIwork\fR, but rather on \fBsome\fR files tagged as \fIwork\fR. TAB completion is used to achieve this aim.
.sp
Let's suppose you have a tag named \fIwork\fR which contains ten tagged files, but you need to operate (say, print the file properties) only on two of them, say, \fIwork1.odt\fR and \fIwork2.odt\fR:
.sp
 \fBp t:work<TAB>\fR

The list of files tagged as \fIwork\fR will be displayed via FZF. Now mark the two files you need using \fBTAB\fR, press \fBEnter\fR or \fBRight\fR, and the full path to both files will be inserted into the command line. So, '\fBp t:work\fR' will be replaced by '\fBp /path/to/work1.odt /path/to/work2.odt\fR'.

.SH 16. VIRTUAL DIRECTORIES
CliFM is able to read and list files from the standard input stream (STDIN). Each file in the list should be an absolute path, terminated with a new line character (\\n) and stripped from extra characters not belonging to the path itself. The size of the input stream buffer is 262MiB (65536 paths, provided each path takes PATH_MAX bytes (4096 by default)).
.sp
Each file passed via standard input is stored as a symbolic link pointing to the original file in a temporary directory (called here virtual directory) with read\-only (0500) permissions. This directory, and all its contents, will be deleted at program exit. Use the \fI\-\-virtual\-dir\fR command line flag to specify a custom directory (it if does not exist, it will be created) instead of the default one, created in the system temporary directory (usually \fI/tmp/clifm/USER/vdir.XXXXXX\fR, where XXXXXX is a random six digits string).
.sp
The user can operate on these files as if they were any other regular file, since \fBall operations performed on these symbolic links\fR (provided the current working directory is the virtual directory where all these files are stored) \fBare performed on the target files and NOT on the symbolic links themselves\fR.
.sp
Once in the virtual directory, files are listed by default using only the base name of the target file. For example, if the target file is \fI/home/user/Downloads/myfile.tar.gz\fR, this file will be listed as \fImyfile.tar.gz\fR. If this file already exists in the virtual directory (because there is another target file with the same base name, say, \fI/home/user/Documents/tars/myfile.tar.gz\fR), a random six digits suffix will be appended to the file (for instance, \fImyfile.tar.gz.12Rgj6\fR).
.sp
Since this listing mode does not allow the user to get a clear idea of the actual location of each listed file, a keybinding (by default \fIAlt\-w\fR) is available to toggle short (base names only) and long file names: in this latter case, file names are listed using the full path to the target file, replacing slashes by colons (:). For example, if the target file is \fI/home/user/Downloads/myfile.tar.gz\fR, it will be listed in the virtual directory as \fIhome:user:Downloads:myfile.tar.gz\fR.
.sp
If you prefer the long names approach, you can use the \fI\-\-virtual\-dir\-full\-paths\fR command line flag.
.sp
\fBNote\fR: Bear in mind that the restore last path function is disabled when listing in this way.
.sp
CliFM provides to ways of using virtual directories:
.sp
\fB1\fR. Reading files from the standard input
.sp
\fB2\fR. Listing sets of files via the \fIvirtualize.sh\fR plugin (which is in fact a special use case of point 1)
.sp
\fB1. Standard input\fR
.sp
Examples:

\fBls \-Ad /var/* | clifm\fR

This command will pass all files in the directory \fI/var\fR to CliFM
.sp
If you need to perform more specific queries, you can use \fBfind\fR(1) as follows:

\fBfind \-maxdepth 1 \-size +500k \-print0 | tr \'\\0\' \'\\n\' | sed \'s/\.\///g\' | clifm\fR

The above command will pass all files in the current directory bigger than 500KiB to CliFM.
.sp
You can also use stream redirection:

\fBls \-Ad $PWD/* > list.txt
 clifm < list.txt\fR
.sp
\fB2. The virtualization plugin\fR
.sp
The \fIvirtualize.sh\fR plugin, bound by default to the \fIvt\fR action name, is intended to provide an easy way of listing sets or collections of files, such as selected, tagged, or bookmarked files. For example, to send all selected files to a virtual directory, you can issue this command:

\fBvt sel\fR
.sp
and, if you want rather files tagged as PDF:

\fBvt t:PDF\fR
.sp
Of course, individual files can also be used:

\fBvt file1 file2 file3\fR
.sp
Once executed, the vt plugin will launch a new instance of CliFM (on a new terminal emulator window) where you can operate on the specified files as if they were just normal files. Once done, quit this new instance (via the \fIq\fR command) to return to the primary instance of CliFM.
.sp
\fBNote\fR: By default, the terminal emulator used is \fBxterm\fR(1), but it can be changed by editing the plugin script (\fIvirtualize.sh\fR).
.sp
If navigating the file system, you can quickly go back to the virtual directory using the \fI\-d\fR option: \fIvt \-d\fR. The navigation keys (see the \fBKEYBOARD SHORTCUTS\fR section above) and the \fBCLIFM_VIRTUAL_DIR\fR environment variable are also available (\fIShift\-Left\fR/\fIShift\-Right\fR or \fRcd $CLIFM_VIRTUAL_DIR\fR).
.sp
\fBTip\fR: Write an alias to make this even easier:
.sp
\fBalias vtd=\'cd $CLIFM_VIRTUAL_DIR\'\fR

.SH 17. NOTE ON SPEED
\fBclifm\fR is by itself quite fast by default, but if speed is still an issue, it is possible to get some extra performance.
.sp
The two most time consuming features are:

 \fB1)\fR The files counter, used to print the amount of files contained by listed directories. Disabling this option produces a nice performance boost.

 \fB2)\fR In normal mode, \fBfstatat\fR(3) is used to gather information about listed files. Since this function, especially when executed hundreds (and even thousands) of times, is quite time consuming, the \fIlight mode\fR was implemented as an alternative listing process omitting all calls to it.
.sp
When running in light mode, however, a few features are lost:
.sp
 1. Only basic file classification is performed, namely, that provided by the \fId_type\fR field of a dirent struct (see \fBreaddir\fR(3)). Bear in mind, nonetheless, that whenever _DIRENT_HAVE_D_TYPE was not set at compile time, or in case of a DT_UNKNOWN value for a given entry (we might be facing a file system not returning the \fId_type\fR value, for example, loop devices), \fBclifm\fR will fall back to \fBstat\fR(3) to get basic files classification.
.sp
 2. Color per file extension is disabled for performance reasons.
.sp
 3. The marker for selected files (*) is lost as well: to keep track of selected files and thus recognize them in the current list of files, we make use of files device and inode number, which is provided by \fBfstatat(3)\fR.
.sp
Besides these two features, a few more things can be disabled to get some extra speed (though perhaps unnoticeable): icons (if enabled), columns, colors, and, if already running without colors, file type indicators. Because listing lots of files could be expensive and time consuming, you can also try to limit the amount of files printed for each visited directory (see the \fImf\fR command above).
.sp
Despite the above, however, it is important to bear in mind that listing speed does not only depend on the program\'s code and enabled features, but also on the terminal emulator used. Old, basic terminal emulators like Xterm, Aterm, and the kernel built\-in console are really slow compared to more modern ones like Urxvt, Lxterminal, ST, and Terminator, to name just a few.
.sp
If using Xterm, a nice speed boost is provided by the fast scroll option: set \fIfastScroll\fR to true in your \fI~/.Xresources\fR file. See \fBxterm\fR(1).

.SH 18. KANGAROO FRECENCY ALGORITHM
The directory jumper function is designed to learn the navigation habits of the user. The information is stored in a database (see the \fBFILES\fR section below) used to get the best match for a given string provided by the user. In this sense, Kangaroo is like a quick, smart, and evolved cd function.
.sp
The information stored in the database, always per directory, is:
 a) Permanent entry ('+'): this directory won't be removed from the database, no matter its rank
 b) Number of visits
 c) Date of first visit (seconds since the Unix epoch)
 d) Date of the last visit (seconds since Unix epoch)
 e) The full path to each visited directory
.sp
With this information it is possible to build a ranking of directories to offer the user the most accurate matches for each query string. The matching algorithm takes into account mainly two factors: frequency and recency (which is why this kind of algorithm is often called a \fBfrecency\fR algorithm).
.sp
After getting an initial list of matches based on the query string(s) entered by the user, the frequency algorithm is applied on each entry in the list. The algorithm is quite simple: \fB(visits * VISIT\-CREDIT) / days\-since\-first\-visit\fR. As a result, we get the average of visits per day since the day of the first visit (what we call \fIthe directory rank\fR).
.sp
NOTE: VISIT\-CREDIT is a hardcoded value: 200.
.sp
There are however some further steps in the ranking process: \fBBonus points\fR.
.sp
Extra credits or penalties are assigned based on the directories \fBlast access time\fR according to the following simple algorithms:
 Within last hour:	rank * 4
 Within last day:	rank * 2
 Within last week:	rank / 2
 More than a week:	rank / 4
.sp
If the last query string matches the \fBbasename\fR of a directory, the entry for this directory has 300 extra credits. This is done simply because users normally use directory basenames as query strings: they are easier to remember.
.sp
In the same way, \fBpinned\fR directories get 1000 extra credits, \fBbookmarked directories\fR 500 credits, directories active in a \fBworkspace\fR 300 credits, and directories marked as \fBpermanent\fR 300 credits.
.sp
For example: if the query string is "test", \fI/media/data/test\fR will be matched. Now, if this directory was accessed within the last hour, and its rank was 200, it becomes 800. But, because the search string matches its basename, it gets 300 extra credits, and, if this directory is in addition bookmarked, pinned, and marked as permanent, it gets 1800 extra credits. In this way the total rank of this directory in the matching process is 2900. In doing so, we have more chances of matching what the user actually wanted to match.
.sp
Once all entries in the initial list of matches have been filtered via the above procedure and ranked, we can return the best ranked entry. The higher rank a directory has, the more priority it has over the remaining entries in the initial list of matches.
.sp
Automatic maintenance is done on the database applying a few simple procedures:

 a) If \fIPurgeJumpDB\fR is set to \fItrue\fR (see the main configuration file), each entry in the database is checked at startup to remove non\-existent directories. This option is set to \fIfalse\fR by default to avoid removing paths pointing to unmounted file systems (like removable devices or remote locations) which you still might want to keep. Non\-existent directories, however, will be removed soon or later anyway due to their low rank value (see below).

 b) Once the rank of a directory falls below \fIMinJumpRank\fR (by default 10), it is forgotten and deleted from the database. The \fIMinJumpRank\fR value can be customized in the configuration file. To make non\-frequently visited directories disappear quicker from the database, increase this value. If set to 0, by contrast, directories will never be removed from the database.

 c) Once the sum total of ranks reaches \fIMaxJumpTotalRank\fR (by default 100000), each individual rank is divided by a dynamic factor so that the total rank becomes less than or equal to \fIMaxJumpTotalRank\fR. If some rank falls in the process below \fIMinJumpRank\fR (and provided this latter is not 0), it is removed from the database. \fIMaxJumpTotalRank\fR can be modified in the configuration file. The higher the value of \fIMaxJumpTotalRank\fR, the more time directories will be kept in the database.

NOTE: Directories visited in the last 24 hours, just as pinned, bookmarked directories, and directories currently used in some workspace, will not be removed from the database, no matter what their rank is. In other words, if you want to indefinitely keep a given directory in the jump database, bookmark it, or mark it as permanent (edit the database, via \fIje\fR or \fIj --edit\fR, and prepend a plus sign (+) to the corresponding entry).
.sp
The idea of 'frecency' was, as far as I know, first devised and designed by Mozilla. See \fIhttps://wiki.mozilla.org/User:Mconnor/Past/PlacesFrecency\fR. However, it is also implemented, though using different algorithms, by different projects like \fBautojump\fR, \fBz.lua\fR, and \fBzoxide\fR.

.SH 19. ENVIRONMENT
The following variables are read at initialization time:
.TP
.B NO_COLOR
If set to any value, \fBclifm\fR will run colorless
.TP
.B CLIFM_NO_COLOR
Same as \fBNO_COLOR\fR (or \fBCLICOLOR=0\fR), but specific to \fBclifm\fR
.TP
.B COLORTERM
If set to either \fItruecolor\fR or \fI24bit\fR, \fBclifm\fR assumes the terminal emulator to be capable of displaying true colors (and thereby also 256 colors), despite what the \fBterminfo\fR(5) database informs.
.TP
.B CLIFM_FILE_COLORS
A colon separated list of file type color codes in the same form specified above in the \fBCOLOR CODES\fR section
.TP
.B CLIFM_EXT_COLORS
Same as above, but for file extensions
.TP
.B CLIFM_IFACE_COLORS
Same as above, but for different elements of \fBclifm\fR's interface
.TP
.B CLIFM_DATE_SHADES
A comma separated list of colors used to print timetamps based on age
.TP
.B CLIFM_SIZE_SHADES
Same as \fBCLIFM_DATE_SHADES\fR, but for file sizes
.TP
.B CLIFM_FORCE_COLOR
Force the use of colors, even if the terminal informs that it does not support colors
.TP
.B CLIFM_HISTFILE
A custom commands history file
.TP
.B CLIFM_FILTER
Define a file filter. If set, this variable overrides the \fIFilter\fR option in the configuration file
.TP
.B CLIFM_SUDO_CMD
Name of the authenticator program. Used by the \fIX\fR command (to launch a new instance of CliFM as root), the \fIAlt\-v\fR keybinding (to prepend the authenticator program name to the current command line), and for some operations on archives (ISO files). Defaults to \fIsudo\fR (or \fIdoas\fR if compiled on OpenBSD). Example: \fICLIFM_SUDO_CMD=doas clifm\fI.
.TP
.B SHELL
An absolute path to the shell to be used by \fBclifm\fR to run external commands. Only values found in \fI/etc/shells\fR are allowed.
.TP
.B CLIFM_SHELL
Same as \fBSHELL\fR, but specific to \fBclifm\fR (takes precedence over \fBSHELL\fR).
.TP
.B TMPDIR
Path to a directory where temporary files will be created
.TP
.B CLIFM_TMPDIR
Same as \fBTMPDIR\fR, but specific to \fBclifm\fR (takes precendece over \fBTMPDIR\fR)
.TP
.B TERM
Terminal type for which output is to be prepared
.TP
.B FZF_DEFAULT_OPTS
A quoted list of options to be passed to FZF (if used for TAB completion)
.TP
.B TIME_STYLE
If set from neither \fI\-\-time\-style\fR nor \fITimeStyle\fR (in the configuration file), use this time style for the long view mode
.TP
.B CLIFM_TIME_STYLE
Same as \fBTIME_STYLE\fR, but specific to \fBclifm\fR (takes precedence over \fBTIME_STYLE\fR)
.TP
.B PTIME_STYLE
If set from neither \fI\-\-ptime\-style\fR nor \fIPTimeStyle\fR (in the configuration file), use this time style for the \fIp/pp\fR command and the \fI\-\-stat\fR/\fI\-\-stat\-full\fR command line switches
.TP
.TP
Except when running in stealth mode, \fBclifm\fR sets the following environment variables:
.TP
.B CLIFM
This variable is set to the path to the configuration directory. By inspecting this variable other programs can find out if they were spawned by \fBclifm\fR. It can also be used to quickly jump into the configuration directory: \fIcd $CLIFM\fR or just \fI$CLIFM\fR
.TP
.B CLIFM_PID
Set to the PID number of \fBclifm\fR's running instance
.TP
.B CLIFM_VERSION
Set to the version number of \fBclifm\fR's running instance
.TP
.B CLIFM_PLUGINS_HELPER
Set to the full path to the plugins\-helper script used by many plugins.
.TP
.B CLIFM_PROFILE
This variable is set to the current profile of \fBclifm\fR (if using two or more instances of \fBclifm\fR under different profiles, the last one will be used). Specially useful to develop \fBclifm\fR plugins on a per profile basis.
.TP
.B CLIFM_SELFILE
The path to the current selection file.
.TP
.B CLIFM_COLORLESS
Set to 1 if running colorless (via the \fBNO_COLOR\fR or \fBCLIFM_NO_COLOR\fR environment variables, or the \fI\-\-no\-color\fR command line option).
.TP
.B CLIFM_BUS
This variable contains the path to a pipe by means of which plugins can talk to \fBclifm\fR. See the \fBPLUGINS\fR section for more information..TP
.B CLIFM_VIRTUAL_DIR
This variable is set to the path to the currently used virtual directory only if (and while) the virtual directory function is exectued. See the \fBVIRTUAL DIRECTORIES\fR section above.
.TP
.B CLIFM_LINE
When running a plugin via a keybinding, this variable holds the content of the current line buffer. For a usage example see the \fIxclip.sh\fR plugin.
.TP
.B SHLVL
Incremented by one each time a new shell is started.
.TP
.B CLIFMLVL
Same as \fBSHLVL\fR, but specific to \fBclifm\fR.
.TP
If \fINotifications\fR is set to \fIfalse\fR for the current prompt, the following variables are exported to the environment to be used, if needed, by your custom prompt:
.TP
.B CLIFM_STAT_SEL
Current amount of selected files
.TP
.B CLIFM_STAT_TRASH
Current amount of trashed files
.TP
.B CLIFM_STAT_ERROR_MSGS
Current amount of error messages
.TP
.B CLIFM_STAT_WARNING_MSGS
Current amount of warning messages
.TP
.B CLIFM_STAT_NOTICE_MSGS
Current amount of notice messages
.TP
.B CLIFM_STAT_WS
Current workspace number
.TP
.B CLIFM_STAT_EXIT
Exit code of the last executed command
.TP
.B CLIFM_STAT_ROOT
1 if user is root (UID = 0), 0 otherwise
.TP
.B CLIFM_STAT_STEALTH
1 if running in stealth mode, 0 otherwise

.SH 20. SECURITY
Since \fBclifm\fR executes OS commands, it needs to provide a way to securely run these commands, specially when it comes to untrusted environments. Two features are provided to achieve this aim: \fBsecure environment\fR and \fBsecure commands\fR.
.TP
Both features are aimed at protecting the program and the system as such from malicious input, either coming from environment variables or from indirect input, that is to say, input coming not from the command line (in which is assumed that it is the user herself who is executing the given command), but from files: this is the case of default associated applications (the \fImime\fR command), autocommands, (un)mount commands (via the \fInet\fR command), just as profile and prompt commands.
.TP
In an untrusted environment, an attacker could cause unexpected and insecure behavior (even command injection) using environment variables, or inject malicious commands via indirect input, commands which will be later executed by \fBclifm\fR without the user's consent (i.e. automatically). This is why we provide a mechanism to minimize this danger: if running in an untrusted environment, the secure environment and secure commands features are there to prevent (at least as far as possible) this kind of attacks.
.TP
\fBA) Secure environment\fR
.TP
Programs inherit the environment from the parent process. However, if this inherited environment is not trusted, not secure, it is always a good idea to sanitize it using only sane values, preventing thus undesired and uncontrolled input that might endanger the program and the system itself.
.TP
The \fIsecure\-environment\fR function forces \fBclifm\fR to run on a such a sanitized environment.
.TP
There are two secure\-environment modes, the \fIregular\fR, and the \fIfull\fR one. To enable the regular mode, run \fBclifm\fR with the \fI\-\-secure\-env\fR command line option. Otherwise, enable the full mode using \fI\-\-secure\-env\-full\fR.
.TP
\fBa)\fR \fIRegular\fR: in this mode, the inherited environment is cleared, though a few variables are preserved to keep \fBclifm\fR running as stable as possible. These preserved variables are: \fBTERM\fR, \fBDISPLAY\fR, \fBLANG\fR, \fBTZ\fR, and, if FZF TAB completion mode is enabled, \fBFZF_DEFAULT_OPTS\fR.
.TP
The following variables are set in an environment agnostic way (that is, securely):
  \- \fBHOME\fR, \fBSHELL\fR, and \fBUSER\fR are retrieved using \fBgetpwuid\fR(3)
  \- \fBPATH\fR is set consulting \fB_PATH_STDPATH\fR (or \fB_CS_PATH\fR if the former is not available)
  \- \fBIFS\fR is set to a sane, hard\-coded value: " \\n\\t" (space, new line char, and horizontal TAB)
.TP
As a plus, \fB1)\fR core dumps are disabled, \fB2)\fR the umask value is set to \fI0077\fR at startup and the creation mode (when using the \fInew\fR command) is forced to \fI0700\fR for directories and \fI0600\fR for files, \fB3)\fR non\-standard file descriptors (>2) are closed, \fB4)\fR SUID/SGID privileges, if any, are dropped, and \fB5)\fR autocommand files aren't read at all (even if \fIReadAutocmdFiles\fR is set to true).
.TP
\fBb)\fR \fIFull\fR: this mode is just like the regular mode, except that \fInothing\fR is imported from the environment at all and only \fBPATH\fR and \fBIFS\fR are set (as described above). Everything else remains unset, and is the user's responsibility to set environment variables (via the export function), as needed. In this case, you might want to set, at least, \fBTERM\fR, and, if running in a graphical environment, \fBDISPLAY\fR.
.TP
Be aware that enabling secure\-environment might break some functions, depending on the system configuration.
.TP
\fBB) Secure commands\fR
.TP
Some commands are automatically executed by \fBclifm\fR: (un)mount commands (via the \fInet\fR command), opening applications (via \fILira\fR), just as prompt, profile, and autocommands. These commands are read from a configuration file and then executed. Now, if an attacker has access to any of these files, she might force \fBclifm\fR to run any arbitrary command, and thereby possibly exposing the whole system.
.TP
Every time a command is thus automatically executed via the system shell (i.e. without the user's direct consent), the secure commands function performs three different, though intrinsically related tasks intended to mitigate command injection and/or unexpected behavior:
.TP
\fBa)\fR Only command base names are allowed: \fInano\fR, for instance, is allowed, while \fI/usr/bin/nano\fR is not. In this way we can guarantee that only commands found in a sanitized \fBPATH\fR (see the point \fBc\fR below) will be executed. This is done in order to prevent the execution of custom binaries/scripts, for example: \fI/tmp/exec_file\fR.
.TP
\fBb)\fR Commands are validated using a \fBwhitelist\fR of safe characters (mostly to prevent stream redirection, conditional execution, and so on, for example, 'your_command;some_injected_command'). This set of safe characters slightly vary depending on the command being executed (because they use different syntaxes):
.sp
 Net command:                   a\-zA\-Z \-_.,/=
 Prompt, profile, autocommands: a\-zA\-Z \-_.,/"'
 Mime command:                  a\-zA\-Z \-_.,%&
.TP
Commands containing \fIat least one\fR unsafe character will be rejected. Of course, we cannot (and should not) prevent what looks like legitimate, benign commands from being executed. But we can stop commands that, in an untrusted environment, look suspicious. This is specially the case of stream redirection (>), pipes (|), sequential (;) and conditional execution (&&, ||), command substitution ($(cmd)), and environment variables ($VAR).
.TP
\fBc)\fR A secure environment is set (\fI\-\-secure\-env\fR is implied; to run on a fully sanitized environment run as follows: \fI\-\-secure\-cmds \-\-secure\-env\-full\fR.

.SH 21. MISCELLANEOUS NOTES
.sp
\fBSequential and conditional execution of commands\fR:

For each of the internal commands (see the \fBCOMMANDS\fR section above) you can use the semicolon to execute them sequentially and/or the double ampersand to execute them conditionally. Example: \fIcmd1;\ cmd2\ &&\ cmd3\fR.
.sp
Though you can use here external commands as well, bear in mind that, whenever at least one internal command is involved in a chained list of commands, \fBclifm\fR will take care of executing this list (simply because the system shell isn't able to understand any of these commands), so that no shell inter\-process function (like pipes), nor any stream redirection or shell expression (like IF blocks or FOR loops) will be available. However, the shell is still used to run single external commands found in the chained list, but in isolation from the remaining commands in this list.
.sp
As a rule of thumb, when using chained commands make sure to always expand ELN's to avoid undesired consequences. If, for instance, you issue this command: \fItouch\ aaa\ &&\ r\ 3\fR, you will end up deleting a file you were not intended to delete, simple because after the successful execution of the first command, the ELN 3 corresponds now to a different file.
.sp

\fBExternal commands\fR:

\fBclifm\fR is not limited to its own set of internal commands, like open, sel, trash, etc. It can run any external command as well, provided external commands are allowed (see the \fI\-x\fR option, the \fIext\fR command, or the configuration file).
.sp
External commands are executed using an actual shell (say, \fI/bin/bash\fR), which is specified by \fBclifm\fR as follows:
  1. If the \fBCLIFM_SHELL\fR environment variable is set, this value is used.
  2. If the \fBSHELL\fR environment variable is set, this value is used.
  3. If none of the above, the value will be taken from the \fIpasswd\fR database (via \fBgetpwuid\fR(3)).
.sp
By beginning the external command by a colon or a semicolon (':', ';') you tell \fBclifm\fR not to parse the input string, but instead letting this task to the system shell.
.sp
Bear in mind that \fBclifm\fR is not intended to be used as a shell, but as the file manager it is.
.sp

\fBTerminal emulators and non\-ASCII characters\fR:

It depends on the terminal emulator you use to correctly display non\-ASCII characters and characters from the extended ASCII charset. If, for example, you create a file named "ñandú" (the Spanish word for \'rhea\'), it will be correctly displayed by the Linux console, Lxterminal, and Urxvt, but not thus by more basic terminal emulators like Aterm.
.sp

\fBSpaces and file names\fR:

When dealing with file names containing spaces, you can use both single and double quotes (e.g.: "this file" or 'this file') plus the backslash character (e.g.: this\\ file).
.sp

\fBStarting path\fR:

By default, \fBclifm\fR starts in the current working directory. However, you can always specify a different path by passing it as positional parameter. E.g.: \fIclifm /home/user/misc\fR. You can also permanently set up the starting path in the \fBclifm\fR configuration file. If the \fIRestoreLastPath\fR option is set to \fItrue\fR, \fBclifm\fR will start instead in the last visited directory (and in the last used workspace), unless the starting path (and optionally the workspace number) is specified using the appropriate command line options.
.sp

\fBDefault profile\fR:

\fBclifm\fR's default profile is \fIdefault\fR. To create alternative profiles use the \fI\-P\fR command line option or the \fIpf add\fR command (see above).

.SH 22. FILES
.TP
.B CONFIGURATION FILE
The main configuration file is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/clifmrc\fR. It will be copied from \fIDATADIR/clifm\fR (usually \fI/usr/local/share/clifm\fR), and if not found, it will be created anew with default values. Here you can permanently set up \fBclifm\fR options, define aliases, prompt commands, and autocommands. You can access the configuration file either via the \fIconfig\fR command or pressing F10.
.sp
A description for each option in the configuration file can be found in the configuration file itself.
.TP
.B PROFILE FILE
The profile file is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/profile.clifm\fR.
In this file you can add those commands you want to be executed at startup. You can also permanently set here some custom variables, e.g.: 'dir="/path/to/dir"'. This variable may be used as a shortcut to that directory, for instance: \fIcd $dir\fR. Custom variables could also be temporarily defined via the command prompt: E.g.: user@hostname ~ $ var="This is a test". Temporary variables will be removed at program exit. Internal variables are disabled by default; enable them via the \fI\-\-int\-vars\fR command line switch.
.TP
.B PROMPTS FILE
This file contains prompts definitions and is located in \fIDATADIR/clifm/prompts.clifm\fR. It will be copied automatically into \fI$XDG_CONFIG_HOME/clifm/prompts.clifm\fR if it doesn't exist. The \fIPrompt\fR line in the color scheme file should point to one of the prompt names defined in this file. See the \fBPROMPT\fR section for more information.
.TP
.B KEYBINDINGS FILE
The keybindings file is \fI$XDG_CONFIG_HOME/clifm/keybindings,cfm\fR. It will be copied from \fIDATADIR/clifm\fR (usually \fI/usr/share/clifm\fR), and if not found, it will be created anew with default values. This file is used to specify the keyboard shortcuts used for some ClifM's functions. The format for each keybinding is always "keyseq:function", where 'keyseq' is an escape sequence in GNU emacs style. A more detailed explanation can be found in the keybindings file itself.
.TP
.B PLUGINS DIRECTORY
The directory used to store programs or scripts pointed to by actions (in other words, plugins) is \fIDATADIR/clifm/plugins\fR (usually \fI/usr/share/clifm/plugins\fR). To edit these plugins copy them to \fI$XDG_CONFIG_HOME/clifm/plugins\fR and edit them to your liking. Plugins in this local directory take precedence over those in the system one.
.TP
.B COLORS DIRECTORY
This directory, \fI$DATADIR/clifm/colors\fR, contains available color schemes (or just themes) as files with a \fI.clifm\fR extension. You can copy these themes to the local colors directory (\fI$XDG_CONFIG_HOME/clifm/colors\fR) and edit them to your liking (or create new themes from the ground up). Themes in the local colors directory take precedence over those in the system directory. You can create as many themes as you want by dropping them into the local colors directory. The default color scheme file (\fIdefault.clifm\fR) can be used as a guide.
.TP
.B ACTIONS FILE
The file used to define custom actions is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/actions.clifm\fR. It will be copied from \fIDATADIR/clifm\fR (usually \fI/usr/share/clifm\fR), and if not found, it will be created anew with default values.
.TP
.B MIMELIST FILE
The mimelist file is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/mimelist.clifm\fR. It is a list of file types and name/extensions and their associated applications used by \fIlira\fR. It will be copied from \fIDATADIR/clifm\fR (usually \fI/usr/share/clifm\fR).
.TP
.B PREVIEW FILE
The preview file is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/preview.clifm\fR and is shotgun's configuration file. It makes use of the same syntax used by the mimelist file. It will be copied from \fIDATADIR/clifm\fR (usually \fI/usr/share/clifm\fR).
.TP
.B BOOKMARKS FILE
The bookmarks file is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/bookmarks.clifm\fR
Just the list of the user's bookmarks used by the bookmarks function.
.TP
.SH HISTORY FILE
The history file is \fI~/.config/clifm/profiles/PROFILE/history.clifm\fR.
A list of commands entered by the user and used by the history function.
.TP
.B COMMANDS LOG FILE
The commands log file is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/cmdlogs.clifm\fR. Command logs keep track of commands entered in the command line. These logs have this form: "[date] current_working_directory:command".
.TP
.B MESSAGES LOG FILE
The messages log file is \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/msglogs.clifm\fR. Message logs are a record of errors and warnings and have the following form: "[date] message".
.TP
.B KANGAROO DATABASE
The directory jumper database is stored in \fI$XDG_CONFIG_HOME/clifm/profiles/PROFILE/jump.clifm\fR.
.TP
\fBNOTE\fR: If \fI$XDG_CONFIG_HOME\fR is not set, \fI$HOME/.config/\fR is used instead.

.SH 23. EXAMPLES
\fBNOTE\fR: Always try TAB. TAB completion is available for many things

\fBNOTE 2\fR: Suggestions for possible completions are printed next to the text typed so far. To accept the given suggestion press \fIRight\fR (or \fIAlt\-f\fR to accept only the first/next suggested word). Otherwise, the suggestion is just ignored

Get help:
\fBF1\fR: manpage
\fBF2\fR: keybindings
\fBF3\fR: commands

\fB1. NAVIGATION\fR

.TS
allbox;
lb lb
l l.
Command	Description
T{
/etc
T}	Change directory to \fI/etc\fR \fB(1)\fR
T{
5
T}	Change to the directory whose ELN is 5 \fB(2)\fR
T{
j <TAB> (also dh <TAB>)
T}	Navigate through visited directories
T{
j xproj
T}	Jump to \fI~/media/data/docs/work/mike/xproject\fR \fB(3)\fR
T{
b (Shift\-Left, Alt\-j)
T}	Go back in the directory history list
T{
f (Shift\-Right, Alt\-k)
T}	Go forth in the directory history list
T{
\fR.. (Shift\-Up, Alt\-u)
T}	Change to the parent directory
T{
\fR...
T}	Change to the parent directory of the current parent directory \fB(4)\fR
T{
bd w
T}	Change to the parent directory matching "w" \fB(5)\fR
T{
ws2 (Alt\-2)
T}	Swtich to the second workspace \fB(6)\fR
T{
/*.pdf<TAB>
T}	List PDF files (current dir)
T{
=x<TAB>
T}	List executable files (current dir) \fB(7)\fR
T{
@gzip<TAB>
T}	List files (current dir) whose MIME type includes "gzip"
T{
pin mydir
T}	Pin the directory named \fImydir\fR
T{
,
T}	Change to pinned directory
T{
view (Alt+\-)
T}	Preview files (current dir) \fB(8)\fR
T{
pg (Alt+0)
T}	Run MAS, the files pager, on the current directory\fR
.TE

.sp
 \fB(1)\fR \fIcd /etc\fR also works
.sp 0
 \fB(2)\fR Press TAB to make sure 5 is the file you want, or just pay attention to the suggestion. Press Right to accept the given suggestion
.sp 0
 \fB(3)\fR This depends on the database ranking. For more accuracy: \fIj mike xproj\fR. TAB completion is available: \fIj xproj<TAB>\fR
.sp 0
 \fB(4)\fR This is the \fIfastback\fR function: each susequent dot after the two first dots is understood as an extra "/.."
.sp 0
 \fB(5)\fR Type \fIbd <TAB>\fR to list all parent directories
.sp 0
 \fB(6)\fR \fIAlt\-[1\-4]\fR is available for workspaces 1\-4
.sp 0
 \fB(7)\fR Type \fI=<TAB>\fR to get the list of available file type characters. Consult the \fBFILE FILTERS\fR section above for more information
.sp 0
 \fB(8)\fR This feature depends on \fBfzf\fR(1)

\fB2. FILE OPERATIONS\fR

.TS
allbox;
lb lb
l l.
Command	Description
T{
myfile.txt
T}	Open \fImyfile.txt\fR (with the default associated application)
T{
myfile.txt vi
T}	Open \fImyfile.txt\fR using vi \fB(1)\fR
T{
24&
T}	Open the file whose ELN is 24 in the background
T{
n myfile mydir/
T}	Create a new file named \fImyfile\fR and a new directory named \fImydir\fR \fB(2)\fR\fB(3)\fR
T{
p4
T}	Print the properties of the file whose ELN is 4
T{
pc myfile.txt
T}	Edit the permission set of the file \fImyfile.txt\fR (use \fIoc\fR to edit ownership)
T{
s *.c
T}	Select all c files in the current directory
T{
s /media/*<TAB>
T}	Interactively select files in the directory \fI/media\fR \fB(4)\fR
T{
s 1\-4 8 19\-26
T}	Select multiple files in the current directory by ELN
T{
sb (sel<TAB> or s:<TAB>)
T}	List selected files \fB(5)\fR
T{
ds (ds <TAB>)
T}	Selectively deselect files using a menu
T{
bm add mydir/ mybm
T}	Bookmark the directory \fImydir/\fR as "mybm"\fR
T{
bm mybm (b:mybm)
T}	Access the bookmark named \fImybm\fR \fB(6)\fR
T{
bm del mybm
T}	Remove the bookmark named \fImybm\fR
T{
bm (Alt\-b or b:<TAB>)
T}	Open the bookmarks manager
T{
t 1\-3 *.old
T}	Trash a few files
T{
u (u <TAB>)
T}	Selectively undelete/restore trashed files using a menu
T{
t del (t del <TAB>)
T}	Selectively remove files from the trash can using a menu
T{
t empty
T}	Empty the trash can
T{
ta *.pdf :mypdfs
T}	Tag all PDF files in the current directory as \fImypdfs\fR
T{
p t:mypdfs
T}	Print the file properties of all files tagged as \fImypdfs\fR
T{
/*.pdf
T}	Search for all PDF files in the current directory
T{
c sel
T}	Copy selected files into the current directory
T{
c *.txt 2
T}	Copy all txt file into the directory whose ELN is 2
T{
r sel
T}	Remove all selected files \fB(7)\fR
T{
m4
T}	Rename the file whose ELN is 4 \fB(8)\fR
.TE

.sp
 \fB(1)\fR Use the \fIow\fR command to select the opening application from a menu: \fIow myfile.txt\fR or \fIow myfile.txt <TAB>\fR
.sp 0
 \fB(2)\fR Note the ending slash in the directory name
.sp 0
 \fB(3)\fR Since \fBclifm\fR is integrated to the system shell, you can also use any of the shell commands you usually use to create new files. E.g.: \fItouch myfile\fR or \fInano myfile\fR
.sp 0
 \fB(4)\fR Only for non\-standard TAB completion: fzf, fnf, smenu
.sp 0
 \fB(5)\fR You can also TAB expand the \fIsel\fR keyword: \fIp sel<TAB>\fR to list selected files (and optionally mark multiple selected files to operate on)
.sp 0
 \fB(6)\fR Type \fIbm <TAB>\fR to get the list of available bookmark names
.sp 0
 \fB(7)\fR To remove files in bulk use the \fIrr\fR command
.sp 0
 \fB(8)\fR To rename files in bulk use the \fIbr\fR command

\fB3. MISC\fR

.TS
allbox;
lb lb
l l.
Command	Description
T{
hh (Alt\-.)
T}	Toggle hidden files
T{
ll (Alt\-l)
T}	Toggle detail/long view mode
T{
rf (Enter \-on empty line\- or Ctrl\-l)
T}	Clear/refresh the screen
T{
Alt\-,
T}	Toggle list-directories-only
T{
Alt\-TAB, Ctrl\-Alt\-i
T}	Toggle disk usage analyzer mode
T{
!<TAB>
T}	Navigate through the command history
T{
config (F10)
T}	View/edit the main configuration file
T{
pf set test
T}	Change to profile \fItest\fR
T{
actions
T}	List available actions/plugins
T{
icons on
T}	Want icons?
T{
cs (cs <TAB>)
T}	List available color schemes
T{
prompt (prompt <TAB>)
T}	List available prompts
T{
q
T}	I\'m tired, quit
.TE

.TP
There is a lot more you can do, but this should be enough to get you started.

.SH EXIT STATUS
\fBclifm\fR returns the exit status of the last executed command

.SH CONFORMING TO
\fBclifm\fR is C99 compliant, and, if compiled with the _BE_POSIX flag, it is POSIX.1\-2008 compliant as well. If not, just a single non\-POSIX function is used: \fBstatx\fR(2) (Linux specific), to get files birth time.

.SH BUG AND FEATURE REQUESTS
Report at <https://github.com/leo\\-arch/clifm/issues>

.SH AUTHOR
L. M. Abramovich <leo.clifm@outlook.com>

For additional contributors, use \fIgit shortlog \-s\fR on the clifm.git repository.
