CLIFM(1)

๐Ÿ“ฆ
version 1.28 ยท 4 versions
, in alpine 3.24, epel 10, epel 9, fedora 44, ubuntu stonking

CLIFM(1) โ€” the Clifm Manual, bestie edition ๐Ÿ’–

okay so you opened the manual for clifm, and honestly? you're about to have a great time. this is the full Clifm Manual, section by section, no skips, no "etc." cop-outs. let's go ๐Ÿฆ‹


โœจ NAME โœจ

clifm โ€” The Command-Line File Manager ๐Ÿ‘‘


๐ŸŒธ SYNOPSIS ๐ŸŒธ

clifm [OPTION]... [DIR]...

๐ŸŽ€ INDEX ๐ŸŽ€

like a table of contents but make it cute:

  1. Getting help
  2. Description
  3. Parameters
    • Positional parameters
    • Options
  4. Commands
  5. File Filters (by filename, file type, and MIME type)
  6. Keyboard shortcuts
  7. Theming
  8. Built-in expansions
  9. Tab completion
  10. File opener (third-party openers are supported)
  11. Shotgun, the file previewer
  12. Auto-suggestions (including a warning prompt for invalid command names)
  13. Shell functions
  14. Plugins
  15. Autocommands
  16. File tags
  17. Virtual directories
  18. Note on speed
  19. Kangaroo frecency algorithm
  20. Environment
  21. Security
  22. Miscellaneous notes
  23. Files
  24. Examples

1. ๐Ÿ’… GETTING HELP ๐Ÿ’…

so there are, like, several ways to get help in clifm and we love options. once you're inside the program, type ? or help for some basic usage examples, or hit F1 to open this very manpage, F2 to jump straight to the COMMANDS section of this manpage, or F3 to yeet yourself to the KEYBOARD SHORTCUTS section. shortcuts = iconic behavior fr fr.

want help on one specific thing? type help <TAB> and boom, you get a list of available help topics. pick the one you want and press Enter. that's it. that's the whole vibe.

for a list of available commands with brief descriptions, type cmd<TAB>. yes bestie, just type it.

you can also get help for internal commands with the -h/--help flag. for example, to get help about the selection function, enter s -h or s --help. easy.

a super convenient way to get comprehensive info about clifm commands is through the ih action, which is bound by default to the interactive help plugin (ihelp.sh). enter ih to run the plugin (heads up: it requires fzf(1)) and then select the command you wanna learn more about. chef's kiss ๐Ÿซถ

for a quick intro, go look at the EXAMPLES section at the end of this document. we'll get there, don't worry.


2. ๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

Clifm is a Command-Line-Interface File Manager. its whole main feature and strength is that all input and interaction happen through commands typed directly into a prompt. in other words, clifm runs as a Read-Eval-Print Loop (REPL), following this basic structure:

  • Read โ€” user input via the command line
  • Evaluate/Execute the command
  • Print the results
  • Loop โ€” repeat the process

unlike most terminal file managers out there, clifm literally replaces the traditional Text User Interface (TUI) โ€” the thing people usually call a curses or text-menu based interface โ€” with a straightforward command-line interface (REPL). and because of that design, it doesn't just work as a file manager, it also works as a shell extension. so you can search for files, copy them, rename them, remove them, and also do system tasks like updating or upgrading your system, adding cron jobs, stopping services, and launching text editors like nano, vi, or emacs. multitasking queen behavior ๐Ÿ‘‘

in summary: clifm keeps the command line visible and accessible, and then enhances it with functionalities specifically tailored for file management. periodt.


3. ๐Ÿฆ‹ PARAMETERS ๐Ÿฆ‹

๐Ÿ’œ POSITIONAL PARAMETERS ๐Ÿ’œ

if you specify a directory as the first non-option parameter, clifm will start in that directory. and the subsequent directory names? they're used to initialize subsequent workspaces. for example, the command clifm /etc ~/Downloads tells clifm to start in the /etc directory (in the first workspace) and to set the second workspace to ~/Downloads. up to 8 positional parameters are supported (any further parameters are just ignored, sorry bestie).

if no workspace is specified, clifm will use the first workspace. to start in a specific workspace, use the -w option followed by the workspace number. for instance, clifm -w4 /etc ~/Downloads will start clifm in the /etc directory within workspace 4, setting workspace 5 to ~/Downloads.

if no positional parameter is provided and the -w option is not used, clifm will start in the last visited directory (and in the last active workspace). you can disable this behavior with the --no-restore-last-path command-line switch (or by setting the RestoreLastPath option to false in the configuration file) โ€” in which case the current directory gets used as the starting path and all workspaces will be unset.

and if you want to always start in one specific directory, disregarding the current directory entirely, use the StartingPath option in the configuration file. set it and forget it ๐Ÿ’…

โญ OPTIONS โญ

Note: if compiled in POSIX mode, the following list of options does not apply. in that case, run clifm -h to get the actual list of options. (to make sure, run clifm -v: if compiled in POSIX mode the version number is followed by -POSIX.) so double-check before you come for me ๐Ÿ˜ญ
  • -a, --show-hidden[=VAL] โ€” show hidden files (filenames starting with .). supported values are: first, last, true, and false. if no value is specified, it defaults to true.
  • -A, --no-hidden โ€” do not show hidden files.
  • -b, --bookmarks-file=FILE โ€” set an alternative bookmarks file.
  • -c, --config-file=FILE โ€” set an alternative configuration file.
  • -D, --config-dir=DIR โ€” set an alternative configuration directory (if configuration files do not already exist, they will be created in DIR).
  • -e, --no-eln โ€” do not display Entry List Numbers (ELNs) to the left of filenames (note that while ELNs are not printed, they remain accessible and can still be used as usual). sneaky but valid.
  • -E, --eln-use-workspace-color โ€” color ELNs using the current workspace color. aesthetic โœจ
  • -f, --dirs-first โ€” list directories first.
  • -F, --no-dirs-first โ€” do not list directories first.
  • -g, --pager โ€” enable Mas, the built-in pager for file listing.
  • -G, --no-pager โ€” disable the file pager.
  • -h, --help โ€” print this help and exit.
  • -H, --horizontal-list โ€” list files horizontally (instead of vertically).
  • -i, --no-case-sensitive โ€” ignore case distinctions when listing files.
  • -I, --case-sensitive โ€” do not ignore case distinctions when listing files.
  • -k, --keybindings-file=FILE โ€” set an alternative keybindings file.
  • -l, --long-view โ€” print file extended metadata next to filenames (long view). the displayed fields can be customized using --prop-fields (or the PropFields option in the configuration file). set a custom time/date format with --time-style (or the TimeStyle option in the configuration file).
  • -L, --no-follow-symlinks โ€” do not follow symbolic links when listing files (overrides --colorize-symlinks-as-target).
  • -m, --dirhist-map โ€” enable the directory history map to keep in view previous, current, and next entries in the directory history list.
  • -o, --autols โ€” automatically list files when changing the current directory with the cd command.
  • -O, --no-autols โ€” do not automatically list files when changing the current directory with the cd command.
  • -P, --profile=PROFILE โ€” use PROFILE as profile. if PROFILE does not exist, it will be created. the default profile is default.
  • -r, --no-refresh-on-empty-line โ€” do not refresh the current list of files when pressing Enter on an empty line.
  • -s, --splash โ€” display the splash screen at startup.
  • -S, --stealth-mode โ€” in stealth mode (also known as incognito or private mode), no trace is left on the host system. no files are read or created, and all settings revert to their default values. however, most settings can still be controlled via command-line options and dedicated environment variables (see the ENVIRONMENT section below). additionally, refer to the history command and the --no-history command-line switch for more options. ghost mode activated ๐Ÿ’€
  • -t, --disk-usage-analyzer โ€” run in disk usage analyzer mode. this is equivalent to using --sort=size --long-view --full-dir-size --no-dirs-first. the recursive size of the current directory will be displayed after the list of files. you can toggle this mode in place by pressing Alt+Tab (or Ctrl+Alt+i).
  • -T, --trash-dir=DIR โ€” set an alternative trash directory.
  • -v, --version โ€” print version details and exit.
  • -w, --workspace=NUM โ€” start in workspace NUM. by default, clifm will recover the last visited directory for each workspace. you can override this behavior using positional parameters to start in workspace NUM and in the specified directory (e.g., clifm -w4 /etc). consult the POSITIONAL PARAMETERS section above for more information.
  • -x, --no-ext-cmds โ€” disallow the use of external (shell) commands.
  • -y, --light-mode โ€” enable the light mode to speed up clifm (see the NOTE ON SPEED section below).
  • -z, --sort=METHOD โ€” 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, 13 = links, or 14 = type. both numbers and names are accepted. for example, you can use --sort=9 or --sort=inode.
  • --bell=TYPE โ€” set the terminal bell type, where TYPE is one of: 0 = none, 1 = audible, 2 = visible (requires readline >= 8.1), and 3 = flash. defaults to 2 (visible), and, if not available, 0 (none). only numbers are allowed.
  • --case-sens-dirjump โ€” do not ignore case when consulting the jump database (via the j command).
  • --case-sens-path-comp โ€” enable case sensitive path completion.
  • --cd-on-quit โ€” write the last visited directory to $XDG_CONFIG_HOME/clifm/.last for later access by the corresponding shell function at program exit. consult the SHELL FUNCTIONS section below for more information.
  • --color-scheme=NAME โ€” use the color scheme specified by NAME.
  • --colorize-symlinks-as-target โ€” colorize symbolic links using the color of the target file (an @ character is prepended to the filename to mark it as a symbolic link).
  • --data-dir=DIR โ€” load data files, such as plugins, color schemes, and default configuration files, from DIR (this is by default the installation directory, usually /usr/share/clifm).
  • --desktop-notifications[=STYLE] โ€” enable desktop notifications. the notification style can be optionally specified: kitty (requires the Kitty terminal or a terminal supporting the Kitty Notifications Protocol), system, or false. if STYLE is omitted, it defaults to system. enter help desktop-notifications in clifm for more information.

okay bestie that's the first chunk ๐Ÿ’– more parts coming, don't go anywhere โœจ

  • --disk-usage โ€” shows you the disk usage of the filesystem where your current directory lives, formatted like FREE % (FREE/TOTAL) TYPE DEVICE. receipts for your storage, bestie ๐Ÿ’พ
  • --full-dir-size โ€” displays recursive directory sizes. Heads up: this only works in long view, no cap.
  • --fuzzy-algo=VER โ€” picks your fuzzy matching algorithm, where VER is either 1 (faster, but not Unicode aware) or 2 (slower, Unicode aware). But bestie, plot twist: the second algorithm (which is the default) will fall back to the first one (because it's faster) whenever your query string has only ASCII characters in it โ€” all to keep the performance penalty as tiny as possible. she's efficient ๐Ÿ’…
  • --fuzzy-matching โ€” turns on fuzzy matching for filename/path completions and suggestions. vibe-based searching, slay โœจ
  • --fzfpreview-hidden โ€” enables file previews for tab completion (fzf mode only) but with the preview window hidden. Toggle it by pressing Alt+p. it's giving peekaboo ๐Ÿซฃ
  • --icons โ€” enables icons. that's it, that's the whole thing ๐ŸŽ€
  • --icons-use-file-color โ€” instead of using some specific color, your icons take on the color of the corresponding filename. Super useful when you're building custom color schemes. This option implies --icons, and it only works when compiled with support for icons-in-terminal or Nerdfonts (the default). Note: when compiled with emoji-icons support, this option is just ignored, because Unicode icons have their own built-in colors. they don't need your help, they're booked and busy ๐Ÿ’…
  • --int-vars โ€” allows the use of internal variables (e.g., VAR=/bin; cd $VAR). variables in the wild, iconic
  • --list-and-quit โ€” lists files and then bounces. Super handy with positional parameters (e.g., clifm --list-and-quit /etc). If you don't provide a positional parameter, it just uses the current directory instead. in and out, no small talk ๐Ÿ’จ
  • --ls โ€” short for --list-and-quit. same energy, less typing ๐Ÿฆ‹
  • --lscolors โ€” reads your file colors from the LS_COLORS environment variable (the FreeBSD LSCOLORS format is supported too). Note that clifm-specific colors (like empty directories or inaccessible files) get disabled. Also note that colors for specific filenames, as defined in LS_COLORS, are not supported. Want more info on LS_COLORS? Consult dircolors(1), or check the ls(1) FreeBSD manpage for LSCOLORS. doing it the old-school way, respect
  • --max-dirhist โ€” the maximum number of visited directories to remember. memory lane, but with a limit
  • --max-files=NUM โ€” lists only up to NUM files. Use -1 or leave it unset to remove this limit (that's the default). See the mf command for a more detailed description.
  • --mimelist-file=FILE โ€” sets FILE as Lira's configuration file (peep the FILE OPENER section below for more on that). ๐Ÿ—‚๏ธ
  • --mnt-udisks2 โ€” uses udisks2(1) instead of udevil(1) (the default) for the media command. swapping out the machinery
  • --no-bold โ€” disables bold colors. This applies to all color schemes, no exceptions. ๐Ÿ™ˆ
  • --no-cd-auto โ€” by default, clifm changes directories when you just type a directory's filename. This option forces you to actually use the cd command. no shortcuts, bestie
  • --no-classify โ€” by default, clifm appends a file type indicator character to filenames when running without colors (see --no-color below), and a directory indicator (plus a file counter) when running with colors. The classification characters are as follows:
 /n: directory (n = file counter)
 @:  symbolic link
 !:  broken symbolic link
 |:  FIFO/pipe
 =:  socket
 *:  executable file
 +:  block device
 -:  character device
 ?:  unknown file type

Use this option to disable file type classification. Note that this also disables the file counter.

  • --no-clear-screen โ€” does not clear the screen before listing files. your scrollback is safe ๐Ÿซถ
  • --no-color โ€” disables colors. monochrome era
  • --no-columns โ€” disables the columned file listing, so you get a single column instead. one at a time, like a queen
  • --no-file-cap โ€” skips checking file capabilities when listing files. This is only meaningful for performance reasons, ngl.
  • --no-file-ext โ€” skips checking file extensions when listing files (extensions are mostly used to colorize specific filenames). ๐ŸŽจ
  • --no-file-counter โ€” disables the file counter for directories, which speeds up the listing process: counting files in directories is particularly expensive. ๐Ÿ’€
  • --no-fzfpreview โ€” disables file previews for tab completion (fzf mode only). closing the curtains
  • --no-highlight โ€” disables syntax highlighting. Want to customize your highlighting colors? See the COLOR CODES section below. ๐ŸŒˆ
  • --no-history โ€” doesn't write commands to the history file. Also peep the HistIgnore option in the configuration file. what happens in the shell stays in the shell
  • --no-open-auto โ€” by default, clifm opens files (using the default associated application) when you just type their filenames. Use this option to force the use of the open command instead. Consult the mime command and the FILE OPENER section for more info about default associated applications.
  • --no-refresh-on-resize โ€” doesn't attempt to refresh the list of files when you resize the window. resize away, she's unbothered
  • --no-restore-last-path โ€” by default, clifm saves the last visited directory for each workspace so it can restore it next session. Use this option to disable that behavior. fresh start energy
  • --no-suggestions โ€” disables the auto-suggestions system. no hints, we're rawdogging the command line โœจ
  • --no-tips โ€” doesn't display startup tips. we know everything already
  • --no-truncate-names โ€” doesn't truncate filenames (see the MaxFilenameLen option in the configuration file). full names, full drama
  • --no-unicode โ€” doesn't use Unicode decorations. plain and simple ๐ŸŽ€
  • --no-warning-prompt โ€” disables the warning prompt, which is the thing that highlights invalid command names. typo protection, off the table
  • --no-welcome-message โ€” disables the welcome message. no greeting, straight to business
  • --only-dirs โ€” lists directories only. ๐Ÿ—‚๏ธโœจ
  • --open=FILE โ€” runs clifm as a standalone file opener: opens FILE and exits. FILE can be a regular file or a directory, and you can use either standard notation (/dir/file), the file URI scheme (file:///dir/file), or a URL (www.domain or https://domain). one job, done flawlessly ๐Ÿ‘‘
  • --opener=APPLICATION โ€” uses APPLICATION (e.g., rifle or xdg-open) as your file opener/launcher, instead of Lira, clifm's default opener. ๐Ÿซถ
  • --pager-view=MODE โ€” lists files in the pager according to MODE. Supported values are: auto (uses the current listing mode โ€” this is the default), long (lists files in long view), and short (lists files in short view).
  • --physical-size โ€” displays physical file sizes (device usage) instead of logical sizes (apparent size). what it really takes up vs. what it claims
  • --preview=FILE โ€” displays a preview of FILE (via Shotgun) and exits. Use --shotgun-file to set an alternative configuration file. Consult the SHOTGUN section below for more. ๐Ÿ”
  • --print-sel โ€” prints the list of selected files after the file list. You can cap the maximum number of selected files printed with the MaxPrintSelfiles option in the configuration file. By default that option is set to 0 (auto), which means it will never exceed half the terminal height. ๐Ÿ’…
  • --prop-fields=FORMAT โ€” sets the fields to be displayed in long view. For info on how to construct this format string, consult the PropFields option in the configuration file. ๐ŸŽ€
  • --ptime-style=STYLE โ€” the time/date style used by the p/pp command and the --stat/--stat-full command-line switches. Available styles: default, iso, long-iso, full-iso, full-iso-nano, and +FORMAT (FORMAT is interpreted like in strftime(3)). Nano-second precision is available via the %N modifier, like in date(1). timestamps, but make it couture
  • --readonly โ€” runs in read-only mode, meaning internal commands that can modify the filesystem are disabled. The 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/untrash, and vv, plus the shell commands cp, rm, mv, ln, mkdir, rmdir, link, and unlink. look, don't touch, bestie ๐Ÿšซ
  • --report-cwd โ€” reports the current directory to the underlying terminal using the OSC-7 escape sequence. Note: not supported by all terminals. ๐Ÿ–ฅ๏ธ
  • --rl-vi-mode โ€” sets readline to vi editing mode (it defaults to emacs editing mode). vi girlies rise
  • --secure-cmds โ€” sanitizes commands passed to the OS to mitigate command injection attacks (--secure-env is implied). Consult the SECURITY section below for more. ๐Ÿ”’
  • --secure-env โ€” runs clifm in a secure environment (regular mode). Consult the SECURITY section below. ๐Ÿ›ก๏ธ
  • --secure-env-full โ€” runs clifm in a secure environment (full mode). Consult the SECURITY section below. maximum protection, main character security detail
  • --sel-file=FILE โ€” sets FILE as the selections file. ๐Ÿ“‹
  • --share-selbox โ€” by default, each user profile has a private Selection Box. Use this option to make the Selection Box common to all user profiles. sharing is caring ๐Ÿ’–
  • --shotgun-file=FILE โ€” sets FILE as the shotgun configuration file. See the SHOTGUN section below for more. ๐Ÿ”ซโœจ
  • --si โ€” displays file sizes in SI units (powers of 1000) instead of IEC units (powers of 1024). metric girlies, this one's for you
  • --sort-reverse โ€” sorts files in reverse order (e.g., z-a instead of a-z). backwards, but make it intentional
  • --stat FILE... โ€” runs the p command on FILE(s) and exits. This must be the last option on the command line. Use --ptime-style to set a custom date/time format. ๐Ÿ“Š
  • --stat-full FILE... โ€” same as --stat, but it runs the pp command (instead of p) on FILE(s). the deluxe version
  • --tabmode=MODE โ€” sets the tab completion mode. Available modes: fzf, fnf, smenu, and standard. ๐ŸŽ€
  • --time-style=STYLE โ€” the time/date style used in long view. Available styles: default, relative, iso, long-iso, full-iso, +FORMAT (FORMAT is interpreted like in strftime(3)). โฐ
  • --trash-as-rm โ€” makes the r command move files to the trash instead of removing them. safety net, slay ๐Ÿ—‘๏ธ
  • --unicode โ€” by default, Unicode decorations are used if Unicode support is detected for the running terminal. If no support is detected, you can use this option to force the use of Unicode decorations. forcing the aesthetic, respectfully โœจ
  • --virtual-dir=PATH โ€” uses PATH as clifm's virtual directory. ๐ŸŒธ
  • --virtual-dir-full-paths โ€” prints filenames in virtual directories as absolute paths instead of just basenames. full addresses only
  • --vt100 โ€” runs in VT100 compatibility mode. Use this option if you're running on a really ancient terminal emulator. grandma terminal, we love her ๐Ÿ‘ต๐Ÿ’œ

Options precedence order: 1) command-line flags; 2) configuration file; 3) default values. flags win, always ๐Ÿ‘‘

โœจ 4. COMMANDS โœจ

Okay bestie, this is the big one. Every command listed down here has its own lil help page, and you get to it with the -h/--help options. Like, literally just do p --help and boom, you get the whole rundown on the properties function. ๐Ÿ’…

Note 1: ELN = Entry List Number. So when you see a line like 12 chocolatebox (that's what it looks like when you're listing files), the 12 is the ELN, and it belongs to the file named chocolatebox. And that slash-plus-a-number thing (/xx) that shows up after directories and symlinks-to-directories? That's the file counter โ€” it tells you how many files are chillin' inside that directory, and nope, it doesn't count self and parent ("." and ".." respectively). ๐ŸŽ€
Note 2: When an ELN and a filename are beefing (aka ELN-filename conflict), you can use the backslash to stop ELN expansion. Example time: if there are at least two files and one of them is literally named 2, clifm cannot possibly know in advance whether your command means the ELN 2 or the filename 2. To say "I mean the ELN", just write the ELN number, like s 2. To say "I mean the filename", escape it with the backslash character: s \2. ๐Ÿฆ‹
Note 3: Clifm supports fused parameters for internal commands that take an ELN or a range of ELNs as parameters. Think of it like short options for command-line programs โ€” you can ditch the space between the internal command and the ELN argument. So instead of CMD ELN you can just write CMDELN. That means o12 works instead of o 12, and s1-5 works instead of s 1-5. BUT โ€” heads up โ€” omitting that space character turns OFF tab completion and suggestions for ELNs. And if there happens to be a file named o12 (or more generally, CMDELN) and you actually want that file instead of the clifm command, escape the filename so it doesn't get split: \o12. ๐Ÿงš

๐Ÿ“‚ FILE/DIR

If the autocd and/or auto-open functions are enabled (they are by default, bestie), this opens FILE or changes directory to DIR. In other words: FILE is giving open FILE (or o FILE), and DIR is giving cd DIR. ELNs are obviously allowed here too. For example: 12. โœจ

๐Ÿ” /PATTERN [-FILETYPE] [-x] [DIR]

This right here is the quick search function. Type / followed by a glob or an (extended) regular expression, and clifm will list every single match in the current directory. So both /*.pdf and /.pdf$ will list all the PDF files in the current directory โ€” the first one using wildcards, and the second one being a regular expression. ๐ŸŒธ

You can also pull up previously used search patterns with the TAB key: /*<TAB>.

Note 1: By default, the search function tries to resolve a pattern as a glob first, and then, if nothing matches, as a regular expression. You can customize this behavior in the configuration file using the SearchStrategy option.
Note 2: If you don't provide any further parameter and it's just a glob pattern (wildcards), you can expand that pattern into the actual matches by hitting the TAB key. Example: to list every C file in the current directory, do /*.c<TAB>.
Note 3: Expressions with no pattern metacharacter get automatically transformed into a glob/regular expression (which one depends on the value of the SearchStrategy option). Like, /test becomes *test* or /.*test.*. ๐Ÿฆ‹

1. Case sensitivity

Regular expressions are case insensitive by default (glob expressions, on the other hand, are always case sensitive, no cap). But you can turn on case sensitive search by setting the CaseSensitiveSearch option to true in the configuration file. ๐Ÿ‘‘

2. Destination directory

Wanna search somewhere other than the current directory? Just pass the directory name as a further parameter (DIR). For example, enter /^A 7 to search for all files starting with ยดAยด in the directory corresponding to ELN 7. ๐Ÿ’–

3. File type filter

You can filter those search results even more by specifying a filter type: -b, -c, -d, -f, -l, -p, -s, -O, and -P โ€” which are block device, character device, directory, regular file, symbolic link, FIFO/pipe, socket, door (Solaris), and port (Solaris) respectively. For example, /[.-].*d$ -d Documents/ lists all directories containing a dot or a dash and ending with ยดdยด in the directory named Documents. ๐Ÿ”ฅ

4. Invert matching

Slap an exclamation mark (!) at the front to invert what a search pattern means. For example: !.*s$ -d /etc matches all directories in /etc that don't end with ยดsยด, and !D* matches all files in the current directory that don't start with ยดDยด. ๐Ÿ™ˆ

For a recursive search, use the -x parameter, plus optionally a search path (DIR) โ€” and note that a file type filter is not allowed here. The search runs using find(1) like this: find DIR MODE PATTERN. If you don't give a search path, the search starts in the current directory. Otherwise, it starts in DIR. And MODE is one of these:

  • -name: if SearchStrategy is not regex-only and CaseSensitiveSearch is set to true
  • -iname: if SearchStrategy is not regex-only and CaseSensitiveSearch is set to false
  • -regex: if SearchStrategy is regex-only and CaseSensitiveSearch is set to true
  • -iregex: if SearchStrategy is regex-only and CaseSensitiveSearch is set to false

๐Ÿš ;[CMD], :[CMD]

If CMD isn't specified, this runs the system shell in the current directory. If CMD is specified, clifm skips all its expansions (peep the BUILT-IN EXPANSIONS section below) and runs the input string (CMD) as-is via the default system shell โ€” and if you wanna know the deets on how shell commands get executed, check the MISCELLANEOUS NOTES section. ๐Ÿ’…

๐Ÿ—œ๏ธ ac, ad FILE...

Archive/compress and dearchive/decompress one or multiple files and/or directories. โœจ

The archiver function has two modes: ac, to generate archives or compressed files, and ad, to decompress or dearchive files โ€” whether that's just listing, extracting, recompressing, or mounting their content. In that last case, the mountpoint used automatically is $HOME/.config/clifm/PROFILE/mounts/ARCHIVE_NAME.

Example: ac sel, ac 4-25 myfile, or ad *.tar.gz.

So here's the tea: with ZIP-based files like .odt, .docx, .apk, and so on, clifm will attempt to dearchive them using either unzip(1) or 7z (in that order). If neither one is found, the operation gets skipped entirely. Files are extracted into a directory named like the archive plus the -extracted suffix, in the current directory. For example, the contents of the file named document.odt get extracted into the directory document.odt-extracted. ๐ŸŽ€

Multiple archive/compression formats are supported, Zstandard included. Note that when it comes to ISO 9660 files, only a single file is supported.

The archive mount function for non-ISO files depends on archivemount, while the remaining functions depend on atool and other third-party utilities for archive formats support โ€” for example, p7zip. p7zip is also used to manage most decompressing options for ISO 9660 files, except for mount, in which case mount(8) is used. Creation of ISO files is done via genisoimage(1). Want more info? Consult atool(1), archivemount(1), zstd(1), and 7z(1). ๐Ÿฆ‹

๐Ÿ”„ acd, autocd [on | off | status]

Toggle the autocd function. If set to on, then DIR amounts to cd DIR. Simple as that, bestie. ๐Ÿ’–

๐ŸŽฎ actions [list | edit [APP]]

To list available actions (or plugins), use the list subcommand. And since list is the default action, you can totally just omit it. ๐Ÿ‘‘

Use the edit subcommand to add, remove or modify custom actions โ€” using APP if you specify one, or the default associated application for text files otherwise.

The whole point of this function is to let you easily add custom commands and functions to clifm. In other words: the actions function is a plugins capability. Periodt.

Here's the general procedure: a) edit the actions file (by running actions edit) and bind a custom action name to an executable file โ€” written in whatever language you want, be it a shell or Python script, a C program, or whatever you're feeling. For example, "myaction=myscript.sh". b) Drop the corresponding script (in our example, myscript.sh) into the plugins directory, usually ~/.config/clifm/plugins (see the FILES section below). 3) Call the script using the custom action name you defined before, as if it were any other command: run myaction, and myscript.sh will be executed. ๐ŸŒˆ

Note that all arguments passed to the action command (myaction) get passed along to the script or program as well (myscript.sh), which is executed via the system shell (consult the MISCELLANEOUS NOTES section for info on how shell commands are executed). ๐Ÿ”ฅ

To help you out when writing plugins, clifm's state information is exported via environment variables while running plugins. For example, CLIFM_LONG_VIEW is set to 1 if you're currently running in long view (see the ENVIRONMENT section for the complete list of exported values). ๐Ÿซถ

The plugins bundled with clifm (take a look at the plugins directory) can be used as a starting point to create new plugins. ๐Ÿ’œ

๐Ÿท๏ธ alias [import FILE | ls, list | NAME]

With no argument (or with the ls,list parameters), it prints the list of available aliases. To get the description of a specific alias, enter alias followed by the alias name. To write a new alias, simply enter edit (or press F10) to open the configuration file and add a line like this: "alias name=ยดcommand args...ยด" or "alias name=ยดdirectoryยด". โœจ

To import aliases from a file โ€” provided it contains aliases in the specified form (i.e. the POSIX syntax for the alias shell command) โ€” use the import parameter. Heads up though: aliases that conflict with some of the internal commands will not be imported. ๐Ÿ’€

Okay so the actual galaxy-brain way to use aliases isn't even binding short keys to commands โ€” it's binding them to files and directories you visit all the time ๐ŸŽ€. Like, you can bind as many files or directories as you want, no matter how deep they're buried in the filesystem, to super short strings โ€” even single characters. Example: alias w=ยด/some/file/deep/in/the/filesystemยด. Now, wherever you are, you just type w and โ€” provided autocd and/or the auto-open function is enabled โ€” boom, you're at the file or directory you wanted. Theoretically you can keep doing this until the system memory is exhausted ๐Ÿ’€.

Wanna create multiple aliases for files all at once? This is the recommended procedure, bestie:

  1. Select all the files you want to alias with the sel command: s file1 file2 file3 ...
  2. Export the selected files into a temporary file by running exp sel
  3. Edit this file so it contains 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 โ€” which is performed automatically by the alias import command โ€” you can edit the aliases file manually (F10).
  1. Finally, import this file with the alias command: alias import tmp_file. Now you can access any of these files by entering just a few characters: a1, b1, and c1 โœจ.

๐ŸŒˆ auto [list | none | unset | OPTION=VALUE...]

Sets a temporary autocommand for the current directory ๐Ÿฆ‹.

Unlike permanent autocommands โ€” those are defined in the configuration file via the autocmd keyword (see the AUTOCOMMANDS section below) โ€” options set via the auto command are temporary, meaning they're valid only for the current directory and the current session.

Options set via this command take precedence over both permanent autocommands and regular options (whether those were set via the command line or the configuration file). Precedence queen ๐Ÿ‘‘.

Examples

List available autocommands

auto list

List files in the current directory in long view

auto lv=1

List only PDF files, set the color scheme to nord, and sort files by size

auto ft=.*.pdf$,cs=nord,st=size

The same list of options can be specified sequentially (i.e., previous options are preserved)

auto ft=.*.pdf$
auto cs=nord
auto st=size

Unset the files filter and the color scheme, and change sort to blocks

auto ft=,cs=,st=blocks

Unset all temporary autocommands previously set for the current directory

auto unset

Reload the current directory ignoring all autocommands (including permanent autocommands)

auto none

For the list of available option codes, consult the AUTOCOMMANDS section or enter help autocommands ๐Ÿ’œ.


๐ŸŽ€ ao, auto-open [on | off | status]

Toggles the auto-open function โœจ. If it's set to on, then FILE basically amounts to open FILE.


๐Ÿ’… b, back [h, hist | clear | !ELN]

Unlike cd .., which changes to the parent directory of the current directory, this command (with no argument) changes to the previously visited directory ๐Ÿฆ‹. You can also use Alt+j or Shift-Left.

Clifm keeps a record of all visited directories (and to stop a directory from being added to the directory history list, use the DirhistIgnore option in the main configuration file). You can see this list by typing b hist or b h, and you can access any element in this list by simply passing the corresponding ELN in this list โ€” preceded by an exclamation mark โ€” to the back command. Example:

:) > ~ $ bh
1 /home/user
2 /etc
3 /proc
:) > ~ $ b !3
:) > /proc $
Note: the highlighted line (by default printed in bold cyan) indicates the current position of the back function in the directory history list.

And you can also clear this history list by entering b clear ๐Ÿงš.

The best way of navigating the directory history list, though? That's the directory jumper function (invoked by the j command) ๐Ÿ’–. You can also take a look at the dh command.

Use the f (or forth) command to move forward, instead of backward, in the directory history list.


๐ŸŒธ bb, bleach FILE...

Bleach is a built-in filenames sanitizer (based on detox, https://github.com/dharple/detox), and its whole goal is renaming filenames using only ASCII characters ๐Ÿ’….

Bleach sanitizes filenames either by removing extended-ASCII/Unicode characters that don't have an ASCII alternative/similar character, or by translating those characters into an alternative ASCII character based on familiarity/similarity.

These following simple rules are used to compose sanitized filenames:

  • NUL (\0) and slash (/) characters are completely disallowed
  • Only characters from the POSIX Portable Filename Character Set (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 (see the cleaner_table.h in the source code).
  • Filenames never start with a dash (-)
  • Files named . and .. are not allowed
  • Append .bleach to single character filenames
  • Do not let a replacement filename start with a dot (hidden) if the original does not
  • Max filename length is NAME_MAX (usually 255)

Modified filenames will be listed on the screen asking the user for confirmation, and besides that it lets you edit (by pressing 'e') the list of modified filenames via a text editor โœจ.

If the replacement filename already exists, a dash and a number (starting from 1) will be appended: e.g., file-3.


๐Ÿ’œ bd [NAME]

bd is the backdir function: it takes you back to the parent directory matching NAME ๐Ÿฆ‹.

With no arguments, bd lists all parent directories relative to the current directory, letting the user 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 this directory; if multiple matches are found, the list of matches is presented to the user in a selection menu. And if NAME is a directory name, bd just changes to this directory โ€” whether it's a parent of the current directory or not ๐Ÿ’….

Tab completion and suggestions are available for this function โœจ.

Example:

Provided the current directory is /home/user/git/repositories/lambda, entering bd git will take you immediately to /home/user/git.

Note that there's no need to type the entire directory name; if the query is unambiguous, only a few characters โ€” even just one โ€” suffices to match the appropriate directory ๐Ÿ‘‘. In our example, bd g is enough to take you to /home/user/git, just as bd h will take you to /home.

The query string can match any part of a directory name: bd er, for instance, will take you to /home/user, since it is an unambiguous query ๐ŸŒˆ.


๐ŸŽ€ bl FILE...

Creates symbolic links (in the current directory) for each specified file ๐Ÿ”ฅ. For example, to create symbolic links in the directory dir for all PNG files in the current directory, issue these commands: s *.png, cd dir, and then bl sel.


๐Ÿ’– bm, bookmarks [a, add FILENAME NAME [SHORTCUT] | d, del NAME | e, edit [APP] | NAME, SHORTCUT]

Bookmarks can be managed either from the bookmark manager screen or from the command line ๐Ÿฆ‹.

1. The bookmark manager screen

To access the bookmark manager screen, enter bm. Here you can cd to the desired bookmark by entering either ELN or filename (regular files can be bookmarked as well โœจ). In this screen you can also add, remove, or edit your bookmarks by entering 'e' to edit the bookmarks file (which is simply a list of lines with this format: NAME:PATH. E.g., "docs:/home/user/documents"). Make your changes, save, and exit ๐Ÿ’….

2. The command line ๐Ÿ’ฌ

okay so here's the group chat of bookmark commands, all in one place:

  • bm add /media/mount mnt โ€” bookmark the /media/mount directory as "mnt"
  • bm mnt โ€” change to / open the bookmark named "mnt"
  • bm del mnt โ€” delete the bookmark named "mnt"
  • bm edit โ€” edit your bookmarks

A handy use for the bookmarks function is to create bookmarks using short names, which will be later easily accessible via tab completion. โœจ like, name them cute and short and future-you will be so grateful.

The b: prefix ๐Ÿ‘‘

The b: prefix is used as a way to quickly access/operate on bookmarks. A few examples:

  • b:<TAB> โ€” list available bookmarks
  • b:net โ€” change to the bookmark named "net" (1)
  • p b:bm1 b:bm2 โ€” print file properties of the bookmarks named "bm1" and "bm2"
  • s b: โ€” select all bookmarks at once

(1) If you're not sure about where a bookmark points to, type b:NAME<TAB>. iykyk ๐Ÿ’…


br, bulk FILE... [:EDITOR]

Bulk rename FILE(s). ๐ŸŽ€

Each filename will be copied to 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 modified names are printed on the screen and the user is asked for confirmation.

This built-in bulk rename function will not deal with deletions, replacements, filename conflicts and the like. For a smarter alternative use qmv(1).

ngl, it's the "vibes only" version of bulk renaming. For the real thing, qmv(1) ate. ๐Ÿ’€

c, m, md, r

Short for the following shell commands respectively: cp -iRp, mv -i, mkdir -p, and rm (for files) or rm -r (for directories).

By default, the c, m, and r commands ask for confirmation before operations. Since this might sometimes be quite intrusive (specially when operating on large number of files), it is possible to turn interactivity off in two different ways:

  • a) For the current command only: via the -f/--force switch. For example: c -f sel, m -f sel, or r -f *.
  • b) Permanently. Use the cpCmd, mvCmd, and rmForce options in the configuration file to permanently set any of these commands to non-interactive mode.

To use these commands without any of these options, or with any other option you want, use the appropriate shell command, for instance, cp instead of c. Of course, you can also create aliases to use your preferred commands, for example, "c=ยดcp -adpยด". Consult the alias command above for more information.

The l command allows the use of the e, edit option to modify the destination of a symbolic link. For example: l edit 12 (or le 12) to relink the symbolic link corresponding to the file whose ELN is 12.

When using the sel keyword and no destination is provided, c and m will copy/move selected files to the current directory.

When renaming a file with the m command, filename validation is performed for the new filename. See the new command below for more information.

Whenever sel is not used, but just a source filename (and no destination is provided), the m command behaves much like the imv(1) shell command (from the ยดrenameutilsยด package), providing an interactive renaming function: it prompts the user to enter a new name using the source filename as base, so that it does not need to be typed twice. For this alternative prompt, only tab completion for filenames is available.

Clifm supports advcp(1), wcp, and rsync(1) to copy files (they include a progress bar ๐ŸŒˆ). To use them instead of cp(1) set the corresponding option (cpCmd) in the configuration file. If advcp is selected, the command used is advcp -giRp (or advcp -gRp, for non-interactive mode). If rsync, the command is rsync -avP. wcp takes no argument.

advmv(1) is also supported to move files (to add a progress bar to the move command). Use the mvCmd option in the configuration file to choose this alternative implementation of mv. In this case, the command used is advmv -gi (or advmv -g for non-interactive mode).

cd [DIR]

Change the current working directory. ๐Ÿฆ‹

Directory check order:

  1. If no argument is provided, change to the home directory ($HOME, or, if not set, the sixth field of the entry corresponding to the current user in /etc/passwd)
  2. If the argument is an absolute path (begins with a slash character), or the first component is dot (.) or dot-dot (..), convert to canonical form (via realpath(3)) and, if a valid directory, change to this directory.
  3. Check the CDPATH environment variable and append /DIR to each of the paths specified here. If the result of the concatenation is a valid directory, change to it.
  4. Check directories in the current working directory. If a matching directory is found, change to it.

You can use either ELNs or a string to indicate the directory you want. E.g., cd 12 or cd ~/media. If autocd is enabled (default), cd 12 and cd ~/media can be written as 12 and ~/media respectively as well. the way that you can just type the directory and it goes there?? main character energy fr. ๐Ÿ’…

Unlike the shell cd command, clifm's built-in cd command not only changes the current directory, but also lists its content (provided the option AutoLs is enabled, which is the default) according to a comprehensive list of color codes. By default, the output of cd is much like this shell command:

cd DIR && ls --color=auto --group-directories-first

Automatic file listing can be disabled by either setting AutoLs to false in the configuration file or running clifm with the -O/--no-autols option.

cl, columns [on | off]

Toggle columned file listing. ๐ŸŽ€

cmd, commands

Show this list of commands.

An alternative way of getting information about clifm commands is via the interactive help plugin (depends on fzf), by default bound to the ih action name.

colors

Preview the current color scheme (same as cs preview). ๐ŸŒˆ

config [edit [APP] | reset | reload | dump]

Manage the main configuration file. ๐Ÿ‘‘

To edit the configuration file use the edit subcommand. If an application is specified (config edit APP), APP will be used to open the file (otherwise, the default associated program will be used). Edit settings to your liking, save, and quit the editor (changes are automatically applied). Note that, since edit is the default action, it can be omitted. Enter just config to open the configuration file, or config APP to open it using APP.

Use the reload subcommand to reload the main configuration file and update settings accordingly.

Use the reset subcommand to generate a fresh configuration file and create a backup copy of the old one (named clifmrc.YYYYMMDD@HH:MM:SS).

The dump 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.

cs, colorschemes [edit [APP] | n, name | p, preview | check-ext | NAME]

With no arguments, list available color schemes (use cs name to print the current color scheme name). ๐Ÿ’–

To get a peek at the current color scheme, use the preview subcommand: cs preview. โœจ

Use the check-ext subcommand to check for file extension conflicts: cs check-ext. ๐Ÿ•ต๏ธ

Use the edit subcommand to open/edit the configuration file of the current color scheme (it opens with APP if you specify one, or with the default associated application otherwise).

To switch color schemes, just say the name: cs NAME. (Hit the TAB key to list all the available ones: cs <TAB>). ๐Ÿ’…


๐ŸŽ€ d, dup FILE...

Duplicate the files you pass as parameters โ€” directories or regular files, both are fine. The user gets asked for a destination directory. Duplicated filenames are generated by appending ".copy" to the basename of each source file. So for example, d /my/file copies /my/file into the directory the user selected as file.copy. And if file.copy already exists, an extra suffix gets added like this: file.copy-N, where N is a positive integer (starting at 1). ๐Ÿซถ

If rsync(1) is found, it'll be used like this: rsync -aczvAXHS --progress. Otherwise, cp(1) steps in: cp -a.


๐Ÿ’– dh [STRING] [PATH] [!ELN]

With no parameters at all, it prints the directory history list. Want to filter that list? Just pass a query string, and only the entries matching it get displayed. Tab completion is available in both cases, btw. For example: dh down<TAB> lists only the entries matching down (fuzzily, if fuzzy-matching is enabled). ๐ŸŒธ

To access one specific entry, pass the entry number preceded by an exclamation mark. Like, if you want entry number 12, enter dh !12 and it changes to the corresponding directory.

Finally, if an absolute path is passed as the first parameter, dh works just like the cd command.

Note: take a look at the j command as well, bestie. Both commands deal with the list of visited directories, just in slightly different ways: while dh deals with the list of the last MaxDirhist entries (see the configuration file), the j command deals with the ranked list of visited directories.

๐Ÿฆ‹ ds, desel [*, a, all | FILE]...

Deselect one or more files.

If no parameter is passed, the user is prompted to either mark the selected files to be deselected, or to edit the selections file (entering e) via a text editor to manually deselect files.

Use *, a or all to deselect all selected entries at once. E.g., ds *.

You can also pass the filename(s) (or ELNs) to be deselected as a parameter. For example: ds myfile 24.

Tab completion is available for this command: ds <TAB> lists all currently selected files.


โœจ exp [FILE]...

With no argument, export the list of files in the current directory to a temporary file. Otherwise, export only the ones specified as further arguments: they can be directories, filenames, ELNs, or some search expression like "*.c".


๐ŸŽ€ ext [on | off | status]

Toggle the ability to execute external commands.


๐Ÿ’ซ f, forth [h, hist | clear | !ELN]

This command works just like the back command, except it goes forward instead of backward in the history record.

Run f to change to the next visited directory (you can also just press Alt+k or Shift+Right).

And of course you can use f hist, f h, and f !ELN (go consult the back command for the details).


๐ŸŒˆ fc [on | off | status]

By default, clifm prints the number of files contained by listed directories right next to the directory names. But since this is an expensive feature, it might be desirable to turn it off (for example, when you're listing files on a remote machine). Use the off subcommand to disable it. To permanently disable it, use the FileCounter option in the configuration file.


โญ ff, dirs-first [on | off | status]

Toggle list directories first.


๐Ÿงš ft, filter [unset] [[!]REGEX,=FILE-TYPE-CHAR]

Filter the current list of files, either by filename (via a regular expression) or by file type (via a file type character).

With no argument, ft prints the current filter. To remove the current filter use the unset option. To set a new filter, enter ft followed by a filter expression (use the exclamation mark to reverse the meaning of a filter). Examples, bestie:

Exclude hidden files:

ft !^.

List only files ending with .pdf:

ft .*\.pdf$

List only symbolic links:

ft =l

Exclude socket files:

ft !=s

The list of file type characters is included in the FILE FILTERS section below.

Heads up: the filter will be lost at program exit. To permanently set a filter use the Filter option (in the configuration file) or the CLIFM_FILTER environment variable (consult the ENVIRONMENT and the FILE FILTERS sections below).

๐Ÿ“ fz [on | off]

Toggle recursive directory sizes (long view only).


๐Ÿ’œ hf, hh, hidden [on | off | first | last | status]

Turn hidden files on/off (use first/last to sort hidden files before/after non-hidden files respectively).


๐Ÿ”ฅ history [edit [APP] | clear | -N | on | off | status | show-time]

With no arguments, it prints the commands history list (use show-time to print timestamps as well). If clear is passed as argument, it deletes all entries in the history file. Use edit to open the history file and modify it however you need (the file opens with APP, if specified, or with the default associated application otherwise). -N tells the history command to list only the last 'N' commands in the history list. And finally, you can disable history (subsequent entries will not be written into the history file) via history off โ€” you can also use the HistIgnore option in the configuration file to prevent specific command lines from being added to the history list. ๐Ÿ‘‘

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: !STRING<TAB>.

๐ŸŽ€ icons [on | off]

Toggle icons.

Note: depending on how the terminal renders icons, the apparent space between icons and filenames may not be the most appropriate. This space can be adjusted using the IconsGap option in the configuration file (valid values: 0, 1, 2).

๐Ÿฆ˜ j [--purge [NUM] | --edit], jc, jl, jp [STR]..., je

j is the fastest way of using Kangaroo, a directory jumper function used to quickly navigate through the jump database (i.e. a database of visited directories). ๐Ÿซถ

With no argument, j just lists the entries in the jump database (1)(2), printing: a) order number of the corresponding entry, b) total sum of visits, c) days since the first visit, d) hours since the last visit, e) the rank value, and f) the directory name itself. An asterisk next to the rank value means the corresponding directory will not be removed from the database, despite its rank โ€” either because it has been visited in the last 24 hours, or because it is bookmarked, pinned, or currently active in some workspace.

  1. To prevent a directory from being added to the jump database use the DirhistIgnore option in the main configuration file.
  2. To prevent a directory from being removed from the jump database, edit the database (j edit) and prepend a plus sign (+) to the corresponding line.

Otherwise, if a query string is provided as parameter, it searches for this string in the database and cds to the best ranked matching entry. Example: j Down will probably take you to /home/user/Downloads, provided this directory has already been visited and is the best ranked match in the database. For a more detailed description of the matching algorithm see the KANGAROO FRECENCY ALGORITHM section below.

Multiple query strings can be passed to the function. For example, j et mo 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 already been visited and is the best ranked match) to /etc/modprobe.d. Bear in mind that if STR is an actual directory, jump will just cd to it without performing any query. ๐Ÿ˜Œ

The backslash (\) and the slash (/) can be used to instruct Kangaroo 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 src in the database: /media/src/images and /home/user/Downloads/clifm/src. If the first entry is better ranked than the second, j src will match this first entry. However, if what we really want is the second entry, appending a slash to the query string instructs Kangaroo to only match entries having src in the last path segment, here /home/user/Downloads/clifm/src. ๐ŸŽฏ

Since it is not always obvious or easy to know where exactly a query string will take you, clifm (if the suggestions system is enabled) will print, at the right of the cursor, the path matched by Kangaroo. 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: j - c<TAB> to list all entries in the directory history list containing a dash (-) and a c. ๐Ÿ’…

The j command takes four modifiers: e, p, c, and l โ€” bestie, they stand for "edit", "parent", "child", and "list" respectively. So:

  • je (or j --edit) โ€” opens the jump database so you can edit it however you need โœ๏ธ
  • jc โ€” searches for files by querying only child directories relative to the current working directory
  • jp โ€” same energy, but for parent directories
  • jl โ€” just prints the matches for the given query string(s), no cd-ing, no drama ๐Ÿ’…

Examples, because examples are the moment:

  • jp foo โ€” Change to the best ranked parent directory containing the string "foo".
  • jc bar test โ€” Change to the best ranked child directory containing the string "bar" and "test"
  • jl foo โ€” Print all entries in the database containing the word "foo"

Use the --purge option to shrink the database ๐Ÿซถ Without any further parameters, --purge removes all non-existent (un-statยดable) directories from the database. But if you pass a numeric parameter instead? Then every entry ranked below that number gets yeeted from the database. Like, j --purge 100 will remove all entries ranked below 100. Periodt.

You can also manually edit the database file with the je (or j --edit) command: edit whatever needs editing, save your changes, close the editor. Genuinely useful for, say, removing one specific entry/directory from the database โ€” however, bear in mind that if the directory is in the directory history, it will not be removed from the jump database. No cap, that one sneaks up on people.

Wanna mark an entry as permanent (aka prevent it from being removed from the database)? Any of these procedures works:

  1. Bookmark it. ๐Ÿ”–
  2. Edit the jump database (je or j --edit) and prepend a plus sign (+) to the corresponding entry.

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 fzf to enable fuzzy searches. Enter ++ to perform a fuzzy search over the jump database. Obsessed with this one, ngl ๐ŸŒธ

Take a look at the dh command as well. iykyk.


๐Ÿ’ซ k

Toggle follow-simbolic-links (Alt+Plus is also available). See the -L/--no-follow-symlinks command-line switch.

๐Ÿฆ‹ kk

Toggle max-filename-len (Ctrl+Alt+l is also available)

๐ŸŽ€ kb, keybinds

kb, keybinds [list | bind FUNCTION | edit [APP] | conflict | reset | readline]

With no argument (or if the argument is list), it prints the current keybindings and their associated functions. Your whole keyboard lore, right there ๐Ÿ‘‘

To change a keybinding, use the bind subcommand.

Type kb bind <TAB> to get the list of bindable functions.

Enter kb bind FUNCTION to set a new keybinding for FUNCTION. For example, to bind the function previous-dir to a new key, enter kb bind previous-dir. You'll see a little prompt: press the key combination you want to associate to the specified function and then press Enter. (While in this prompt, press Ctrl+d to abort or Ctrl+c to clear the current line. Escape hatches, we love them ๐Ÿ™ˆ)

To manually edit your keybindings use the edit option โ€” the keybindings 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 for keybinding conflicts with the conflict option, or use the reset option to create a fresh keybindings file with the default values. Clean slate, main character energy.

To unbind a function, run kb edit and comment out the corresponding entry. Note that some functions may have several entries, associating them to multiple keybindings: comment them out all if required. Yes, all of them. Every last one.

To list readline keybindings (defined in ~/.config/clifm/readline.clifm), use the readline option. The syntax is the same as the one used by readline's .inputrc file (consult http://tiswww.case.edu/php/chet/readline/readline.html#SEC9 for more information.)

๐Ÿ“ l, le

Create (l) or edit (le) symbolic links.

The syntax for the l command is: l TARGET [LINK_NAME]. Note that if LINK_NAME is omitted, the symbolic link is created as TARGET_BASENAME.link in the current directory.

By default, the link target is created relative to the link location. The link creation mode can be set using the LinkCreationMode option in the configuration file. Available modes are: absolute, and relative (like ln -rs), and literal (like ln -s).

To edit the target of a symbolic link use the le command followed by the desired link name. The user will be prompted to enter a new link target, using the current target as template. So helpful of it ๐Ÿ’…

๐ŸŒˆ ll, lv

ll, lv [on | off]

Toggle the long view.

โญ lm

lm [on | off]

Toggle the light mode. This option, aimed at making file listing faster than the default mode, is especially useful for really old hardware or when working on remote machines (for more information see the NOTE ON SPEED section below). Old laptop girlies, this one's for you ๐Ÿซถ

๐Ÿงš log

log [cmd | msg] [list | on | off | status | clear]

Enable, disable, clear, list or check the status of the program logs, either message (errors and warnings) or command logs. Example: log cmd on, to enable command logs, or log msg clear, to clear/remove message logs.

Consult the FILES section below for information about how logs are written to the logs file.

๐Ÿ’œ media

Note: This command is Linux-specific

List available storage devices and mount/unmount the selected one using either udevil or udisks2 (at least one of these must be installed. udevil will be preferred over udisks2). If the device is unmounted, it will be automatically mounted, and if mounted, it will be automatically unmounted. Flip-flop icon behavior, honestly โœจ

Though mountpoints are determined by the mounting application itself (udevil or udisks2), clifm will automatically cd to the corresponding mountpoint whenever the mount operation was successful. Slay.

When unmounting, and if the current directory is inside the mountpoint, clifm will attempt to cd to the previous visited directory, and, if none, to the home directory, before unmounting the device. It's got your back ๐Ÿ’–

To get information about a device, enter iELN, for example, i12, provided ยด12ยด is the ELN of the device you want.

๐Ÿ”ฅ mf

mf [NUM | unset]

List only up to NUM files (valid range: >= 0). Use unset 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: /* -l. The list is a lie, the files are all there ๐ŸŒธ

๐Ÿ‘‘ mm, mime

mm, mime [open FILE | info FILE | edit [APP] | import]

This is Lira, clifm's file opener.

Use the open subcommand to open a file with the default associated application. Note that, since open is the default action, it can be omitted. For example: mm file.pdf. The same can be achieved more easily using the open command: open file.pdf (or using the short command, o file.pdf). Or, even shorter, just file.pdf. Iconic laziness, we stan ๐Ÿ’…

The info subcommand displays metadata and application matches for the file FILE: its name and MIME type, the application chosen to open it, and the preview application. Each application line includes a "(match: ...)" tag showing whether the selection was made by the file name or by its MIME type. The output is intended to help users understand why a particular app was selected and to make it easy to verify or troubleshoot association rules. Detective mode: activated ๐Ÿ”

The edit subcommand allows the user to edit and customize the MIME list file. For example, if a file has no default associated application, first get its MIME info or its file extension (running mm info FILE), and then add a value for it to the MIME list file using the edit option (mm edit or F6). Check the FILE OPENER section below for information about the mimelist file syntax.

Finally, with the import subcommand clifm will try to import MIME associations from the system looking for mimeapps.list files in those paths specified by the Freedesktop specification (see https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html). If at least one MIME association is successfully imported, it will be stored as mimelist.clifm.XXXXXX (where XXXXXX is a random six digits alphanumerical string). You can add these new associations to your mimelist file using the mime edit command. Free associations, no strings attached ๐ŸŽ€

mp</p>, mountpoints</p> ๐Ÿ’…

Lists all the mountpoints you've got going on, and then โ€” plot twist โ€” it changes your current working directory to whichever mountpoint you picked. Like, it's a cd but make it discovery. โœจ


msg, messages [clear] ๐Ÿ’ฌ

With zero arguments, it prints out the list of messages from the current session. Bestie, it's your receipts. ๐Ÿงพ

If you pass the clear option, clifm empties the messages list. Gone. Poof. ๐Ÿซง


n, new [FILE[@TEMPLATE]]... [DIR/]... ๐ŸŽ€

Creates new regular files and/or directories. Baby's first filesystem, but make it iconic. ๐Ÿ‘‘

Here's the tea on how it decides what you're making:

  • If a filename ends with a slash (/), it's taken as a directory name.
  • Otherwise, it's created as a regular file.

So like, n myfile mydir/ creates a file named myfile and a directory named mydir. Two for one, slay. โœจ

If you provide no filename at all, the user gets prompted to enter one. No silent failures here, we communicate. ๐Ÿ’–

Automatic templates ๐Ÿช„

New regular files will be created from a template file if:

  1. The file to be created has a filename extension (e.g., file.html).
  2. A file named like this extension โ€” here, html โ€” exists in the templates directory (1).

If both conditions are met, running n file.html will create a new file named file.html which is a copy of the html file sitting in the templates directory. Copy-paste but it's โœจinheritanceโœจ.

Note that template names are not limited to actual file extensions: you can name your templates whatever you like (with any content you want) provided new files are created using the template name as extension. E.g., n file.my_super_cool_template. ๐Ÿ’…

Explicit templates ๐ŸŒธ

If a filename is followed by the expression @TEMPLATE, where TEMPLATE is any regular file found in the templates directory (1), the file will be created as a copy of the corresponding file template. E.g., n file.sh@my_script.sh. Chef's kiss. ๐Ÿ˜˜

Tab completion is available for explicit templates too:

n file@<TAB>

(1) The templates directory is $CLIFM_TEMPLATES_DIR, $XDG_TEMPLATES_DIR, or ~/Templates, in this precedence order. First one wins, no cap. ๐Ÿ†

Filename validation ๐Ÿšจ

Filename validation is performed on new filenames before creation/modification, using a set of different checks. If a name fails any check, the user is warned and asked to confirm. It's giving concerned friend energy. ๐Ÿซถ

Available checks:

  1. Starts with a dash (-): command option flags collision.
  2. Is a reserved keyword/expression (internal use): fastback (...), ELN/range (12, 1-45), and MIME/file type expansion (@query, =x).
  3. Contains leading or trailing whitespace.
  4. Contains leading tilde.
  5. Contains embedded control characters (0x00-0x1f in the ASCII table).
  6. Contains invalid UTF-8 bytes (0xc0, 0xc1, and 0xf5-0xff).
  7. It is too long (longer than NAME_MAX, usually 255 bytes).
  8. Contains embedded shell metacharacters (*?[]<>|(){}&=`!\;$).
  9. Contains characters outside the POSIX Portable Filename Character Set (a-zA-Z0-9._-).

The set of checks to be performed is controlled by the SafeFilenames option in the configuration file. This option supports the following values:

  • false: No check is performed. YOLO mode, be careful bestie. ๐Ÿ’€
  • basic: Only basic checks (1-7 above) are performed (this is the default).
  • strict: Basic + disallow shell metacharacters (check 8).
  • posix: Basic + allow only characters in the POSIX Portable Filename Character Set (check 9).

For more information about safe filenames consult https://dwheeler.com/essays/fixing-unix-linux-filenames.html. ๐Ÿ“š


net [NAME | list | edit | m, mount NAME | u, unmount NAME] ๐ŸŒ

1. The configuration file ๐Ÿ“

The net command manages connections to remote systems via a simple samba-like configuration file ($HOME/.config/clifm/profiles/PROFILE/nets.clifm). Here you can specify multiple remotes and options for each of these remotes.

Syntax example for this file:

 [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)
Note: %m can be used as a placeholder for Mountpoint. %m will be replaced by the value of Mountpoint. It's a little variable doing big things. ๐Ÿฆ‹

1.a. Mounting remote filesystems ๐Ÿ›ฐ๏ธ

A Samba share:

 [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

A SSH filesystem (sshfs):

 [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

1.b. Mounting local filesystems ๐Ÿ’พ

Though originally intended to manage remote filesystems, net can also manage local filesystems. Just provide the appropriate mount and unmount commands. Since the device name assigned by the kernel might change across 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. Main character move: be stable. ๐Ÿ‘‘

For example:

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

Here's an example of how to set up net to mount USB devices, one with a FAT filesystem, and another with an ISO9660 filesystem:

 [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
Note: The gid, fmask, and dmask options are used to allow the user to access the mountpoint without elevated privileges. Basically: access without the sudo drama. ๐Ÿ™ˆ

If the device data is unknown, as it often happens when it comes to removable devices, you should use the media command instead. Different tool, different vibe. โœจ

2. Command syntax โŒจ๏ธ

Without arguments (or via the list subcommand), net lists the configuration for each remote available in the configuration file.

Use the edit option to edit the remotes configuration file. If no further argument is specified, the file will be opened with the current file opener. However, you can pass an application as second parameter to open the configuration file. For example: net edit nano.

If not already mounted, the m, mount option mounts the specified remote using the mount command and the mountpoint specified in the configuration file, and automatically cds to the corresponding mountpoint. For example: net mount smb_work. And since mount is the default action, it can be omitted: net smb_work. Efficiency, we love her. ๐Ÿ’…

The u, unmount option unmounts the specified remote using the unmount command specified in the configuration file. For example: net unmount smb_work. Tab completion is also available for this function. ๐ŸŽ€

Note: 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 cr action. Set up your remotes (cr --edit) and then send the file you want (cr FILE). So convenient fr fr. ๐Ÿซถ

o, open FILE [APPLICATION] ๐Ÿ“‚

Opens FILE, which can be either:

  • a directory (in which case it works just like the cd command),
  • a regular file,
  • or a symbolic link to either of the two.

For example: o 12, o filename, o /path/to/filename. Versatile icon. ๐ŸŒˆ

By default, the open command will open files with the default application associated to them via Lira, the built-in file opener (see the mime command above). However, if you want to open a file with a different application, add the application name as second argument: e.g., o 12 leafpad or o12 leafpad. You're the boss. ๐Ÿ‘‘

If you want to run the program in the background, simply add the ampersand character, as usual: o 12 &, o 12&, o12& or (if auto-open is enabled) just 12&. Background baddie behavior. ๐Ÿ’…

If the file to be opened is an archive/compressed file, the archive function (see the ad command above) will be executed instead. Surprise feature! โœจ


oc FILE... ๐Ÿ”‘

Interactively change file ownership.

A new prompt is displayed using the user and primary group common to all files passed as parameters as ownership template. Teamwork, but for permissions. ๐Ÿซถ

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. And bear in mind: recursion is not supported โ€” use chown(1) (with the -R option) instead.

โš ๏ธ Not recursive, bestie. Don't assume it'll go digging through your whole tree, because it will not. ๐ŸŒณ๐Ÿšซ

Both names and ID numbers are allowed (Tab completion for names is available). โœจ

If only a name/number is entered, it is taken as the user who owns the file(s).

Use the pc command to edit file permissions. (Sibling command, different job. ๐Ÿ’–)


opener [default | APPLICATION] ๐ŸŽ

With no argument, prints the currently used file opener (by default, Lira, clifm's built-in opener). Otherwise, set APPLICATION (say rifle or xdg-open) as opener or, if default is passed instead, use Lira. Pick your fighter. ๐Ÿ’…


ow FILE [APPLICATION] ๐Ÿฆ‹

If APPLICATION is specified, open FILE with APPLICATION. In case you need to add parameters to APPLICATION, it is recommended to quote the expression: ow FILE "APP ARG...".

If APPLICATION is not specified, the list of available applications associated to 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. A whole menu of options, and you get to pick. Menu-era energy. ๐Ÿ“

This command supports tab completion. Type ow FILE <TAB> and the list of applications able to open FILE will be displayed. ๐ŸŽ€

Okay bestie, we're back and we're doing file inspection now. Buckle up ๐Ÿ’–


p, pp, prop FILE... โ€” prints the properties of FILE. The output is lowkey giving "ls -l and stat had a baby" โ€” it's like the combined output of those two shell commands.

By default, directory sizes are not shown. Use pp instead of plain p if you want directory sizes too (heads up: it could take longer, depending on how much stuff is in that directory). But flip side, and unlike p, pp gives you info about the dereferenced symlinks โ€” meaning the symlink target โ€” instead of the symlink itself. That said, plot twist for symbolic links to directories: p will give you info about the link target if the filename you passed ends with a slash. Otherwise you get info about the link itself. ๐Ÿ™ˆ

The time format used for all the time info is customizable via the PTimeStyle option in the configuration file. It defaults to "%Y-%m-%d %H:%M:%S.%N %z", where %N stands for nanosecond precision. Yeah. Nanoseconds. She's precise. ๐Ÿ’…

If you need to list properties of all the files in the current directory, try the long view (ll or Alt+l). The fields shown in that mode can be customized with the PropFields option in the configuration file. And for custom timestamp formats, use the TimeStyle option.

Want more tea about file details? Consult the file-details help topic: help file-details. ๐Ÿซถ


pc FILE... โ€” interactively change file permissions. (Only traditional Unix permissions are supported, no cap.)

A new prompt pops up using the actual permissions of the file you're editing โ€” in symbolic notation โ€” as the template. If you're editing multiple files with different sets of permissions, only the shared permission bits get set in the permissions template. Sharing is caring โœจ

Bear in mind that if you edit multiple files at once โ€” say pc sel or pc *.c โ€” the new permissions set gets applied to all of them. All of them. Every single one. No takebacks.

Both symbolic and octal notation are allowed for the new permissions set. Slay.

Recursively setting file permissions is not supported. Use chmod(1) with the -R flag instead. That's the whole vibe.

If all you need is to toggle the executable permission bit on a file, you can use the te command. And use the oc command to edit file ownership.


pf, profile [ls, list | set, add, del PROFILE | rename PROFILE NEW_NAME] โ€” with no arguments, this prints the name of the currently used profile. Use the ls or list option to see what profiles are available. Wanna switch, add, delete, or rename a profile? That's set, add, del, and rename respectively. Simple as.


pg, pager [on | off | once | status | NUM] โ€” run or set Mas, clifm's built-in file pager. ๐Ÿ‘‘

With no parameter, it just runs the pager (Alt+0 is also available, iykyk).

  • Set it to on and the pager runs whenever the list of files doesn't fit on the screen.
  • Set it to any positive integer greater than 1 to run the pager whenever the number of files in the current directory is greater than or equal to that value โ€” say 1000. (0 amounts to off, and 1 amounts to on.)
  • Set it to once to run the pager only a single time (this overwrites whatever its previous value was).

While you're paging, here's your key arsenal:

  • ?, h: Help
  • Down arrow, Enter, Space: Advance one line
  • Page down: Advance one page
  • q: Stop paging (without printing remaining files)
  • c: Stop paging (printing remaining files)
Note: to scroll lines up, use whatever your terminal emulator has to offer (like mouse scrolling or some keybinding). Not our department, bestie.

By default the pager lists files using the current listing mode (long or short). Use PagerView in the configuration file (or --pager-view on the command line) to force a specific mode. Possible values:

  • auto: use the current listing mode (this is the default)
  • long: list files in long view
  • short: list files in short view

pin [FILE/DIR] โ€” pin a file or directory so you can grab it later via the comma (,) keyword. For example, run pin mydir and then access mydir like this: cd , โ€” the comma automatically expands to the pinned file, which in this case is mydir. And the comma keyword works with any command, internal or external, e.g. ls ,. Versatile queen. ๐ŸŽ€

With no arguments, pin prints the current pinned file, if there is one. If you give it an argument, that's taken as the filename to pin. Run it again and it frees the previous pinned file and sets a new one. In other words: only one pin at a time. Monogamous pinning.

An easy alternative if you want as many pins or shortcuts as you want, however you want them, is to use the alias function. Bookmarks could also get you a very similar result.

At program exit, the pinned file gets written to a file in the configuration directory (as .pin) so it can be loaded in the next session. She remembers. ๐Ÿ’œ


prompt [set NAME | list | edit [APP] | unset | reload] โ€” manage clifm's prompts. Use the set subcommand to temporarily change the current prompt to the prompt named NAME (and use unset to unset the current prompt and go back to the default one). The available prompts โ€” which you can list with prompt list or prompt set <TAB> โ€” are defined in the prompts file ($HOME/.config/clifm/prompts.clifm). To set a prompt permanently, edit your color scheme file (via the cs edit command) and set Prompt to either a prompt code or a prompt name (as defined in the prompts file).


q, quit, exit โ€” quit clifm. Bye bestie ๐Ÿ‘‹


rf, refresh โ€” refresh the screen, meaning it reprints the files in the current directory and updates the prompt. And if the current directory isn't accessible for any reason, rf will go up and up until it finds one that is accessible, and then it changes to that directory. Self-preservation icon. โœจ


rl, reload โ€” reload all settings from the configuration file, except those that were passed as command-line arguments. Those stay. Periodt.


rr [DIR] [EDITOR] โ€” remove files and/or directories in bulk using a text editor. Chaotic but efficient, honestly iconic.

rr writes all the filenames in DIR (or in the current directory if DIR is omitted) to a temporary file and opens it using EDITOR โ€” or the default associated application for the text/plain MIME type, if EDITOR is omitted.

Once you're in the editor, delete the lines corresponding to the files you want to delete. Save your changes and close the editor. The removed files will be listed and you'll be asked for confirmation. Safety first, always. ๐Ÿซถ


s, sel [--invert] FILE... [(!)PATTERN] [-(d|f|l|s|p|b|c)] [:PATH] โ€” mark one or more files (regular files or directories) as selected (a.k.a. send them to the Selection Box). sel accepts individual elements, ranges of elements โ€” say 1-6 โ€” filenames and paths, plus wildcards (globbing) and regular expressions. For example: s 1 4-10 ^r file* filename /path/to/filename.

If you're not in light mode, once a file is selected โ€” and if that file is in the current directory โ€” the corresponding filename gets highlighted with a mark at the left of the filename (and at the right of its ELN). The mark is colored according to the value of li in the color scheme file (by default, bold green). ๐Ÿ’š

Just like in the search function, you can further filter the list of matches by indicating the file type you want. For instance, s ^ -d will select all directories in the current directory. For the available file type filters, see the search function above.

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: s .*\.conf$ -f :/etc, or using wildcards: s *.conf -f :/etc. And of course, you can also just do s -f /etc/*.conf.

Just as with the search function, inverse matching is supported for patterns โ€” 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: s !^. -f :Documents. Or, to select all directories in /etc except those ending with .d: s !*.d -d :/etc.

Glob and regular expressions can be used together. For example: s ^[r|R].*d$ /etc/*.conf will select all files starting with either r or R and ending with d in the current directory, plus all .conf files in the /etc 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. ๐Ÿ˜ญ

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 a regular expression, should match all files. But 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 Alt+a is also available to perform the same operation.

The Selection Box is accessible from different instances of the program, provided they use the same profile (see the profile command below). By default, indeed, each profile keeps a private Selection Box, and it's therefore not accessible to other profiles. You can nonetheless modify this behavior via the ShareSelbox option in the configuration file. If ShareSelbox is enabled, selected files are stored in /tmp/clifm/username/.selbox.clifm. Otherwise, /tmp/clifm/username/.selbox_profilename.clifm is used (and this is the default).

To invert selected files in the current directory, use the --invert option (or press Shift+Tab). Note that selected files that don't fall under the current directory are not affected.


๐ŸŽ€ Operating on selected files ๐ŸŽ€

okay bestie, so like โ€” if you wanna operate on one or more selected files, that's what the sel keyword is for (s: works too, same energy). Wanna print the file properties of literally every selected file? Just hit p sel (or p s:). And if you wanna see what's selected, s:<TAB> lists them for you โ€” and yes, multi-selection is available if you're running in fzf mode. ๐Ÿ’…

โœจ Listing selected files โœจ

To list selected files use the sb command (standing for Selection Box). You can also type s:<TAB> and get the same little treat. ๐ŸŽ€

โœจ Deselecting files โœจ

To deselect files use the ds command (see above, bestie). You can also press Alt+d to deselect all the files at once โ€” one tap, clean slate. ๐Ÿฆ‹

Note: If there is a file named sel in the current directory, use ./sel to distinguish it from the sel keyword. For example, enter p ./sel to tell clifm that you want to get the properties of the file named sel rather than the properties of the currently selected files. (the ambiguity is real, don't let it catch you slippin')

For more information consult the BUILT-IN EXPANSIONS section below. ๐Ÿ‘‘


sb, selbox

Print the elements currently contained in the Selection Box. That's it, that's the whole job, and it does it flawlessly. โœจ

st, sort [METHOD] [rev]

With no argument, print the current sort 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, 13=links, or 14=type (e.g., st atime or st 3). Methods 10 and 11 sort by owner and group ID names if using ID names in long view (see the PropFields option in the configuration file). Else, ID numbers are used. The default order is version. ๐Ÿ“Š

By default, files are sorted from less to more (e.g., from ยดaยด to ยดzยด if sorting by name). Use the rev subcommand to invert this order. E.g., st rev or st inode rev. Switch back to the previous state by running st rev again. ๐Ÿ”

Take a look at the configuration file for extra sort options (ListDirsFirst, PrioritySortChar, ShowHiddenFiles).

stats

Print file statistics for files in the current directory (not available in light mode, sorry bestie ๐Ÿ˜ญ).

t, trash [FILE... | ls, list | clear, empty | del [FILE]...]

Move specified files to the trash can (e.g., t file1 file2). ๐Ÿ—‘๏ธโœจ

With no argument (or by passing the ls option), it prints the list of currently trashed files. The clear (or empty) subcommand removes all files from the trash can, while the del subcommand lists trashed files allowing the user to permanently remove one or more trashed files. If using del, tab completion to list/select currently trashed files is available. ๐Ÿซถ

The trash directory is $XDG_DATA_HOME/Trash, falling back to $HOME/.local/share/Trash. To set an alternative trash directory use the -T/--trash-dir command-line option.

Since this trash system follows the Freedesktop specification, it is able to handle files trashed by different Trash implementations. interoperability, we love to see it ๐Ÿ’š

To restore trashed files (to their original location) see the untrash command below.

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

tag is the main Etiqueta command, clifm's built-in file-tagging system. See the FILE TAGS section for a complete description of this command. ๐Ÿท๏ธ

te FILE...

Toggle the executable bit (on user, group, and others) on FILE(s). It is equivalent to the -x and +x options for the chmod(1) command. ๐Ÿ”ฅ

tips

Print the list of clifm tips. Little gift, every time. ๐ŸŽ

u, untrash [*, a, all | FILE]...

If filenames are passed as parameters, 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 *, a or all parameters to restore all trashed files at once. Tab completion to list/select currently trashed files is available. ๐Ÿ’–

unpin

This command takes no argument. It just frees the current pin and, if it exists, deletes the .pin file generated by the pin command. ๐Ÿ“Œโžก๏ธ๐Ÿšซ

vv FILE... DIR

Copy FILE(s) to DIR and bulk rename them at once. bulk rename! at once! โœจ

ver, version

Show clifm version details. ๐Ÿ‘‘

view [edit [APP] | purge]

Preview files in the current directory (full screen). Requires fzf(1). Alt+- is also available. ๐Ÿ‘€

By pressing Enter or Right, the currently highlighted file will be selected and view closed. To select multiple files, mark them with the TAB key and then press Enter or Right to confirm. To quit view press Escape or the Left arrow key.

Run view purge to purge the thumbnails directory ($XDG_CACHE_HOME/clifm/thumbnails) of dangling thumbnails. ๐Ÿงน

To edit the previewer configuration file enter view edit, or view edit vi to open it with a specific application, in this case, vi(1).

For image previews consult the Wiki (https://github.com/leo-arch/clifm/tree/master/misc/tools/imgprev) or enter help image-previews. ๐Ÿ–ผ๏ธ

For further information consult the SHOTGUN section below.

ws [NUM/NAME | unset | + | -]

Clifm offers up to eight workspaces, each with its own independent path. ๐Ÿ—‚๏ธโœจ

With no argument, the ws command prints the list of workspaces and its corresponding paths, highlighting the current workspace.

Use NUM to switch to the workspace number NUM, NAME 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.

To unset a workspace use the unset subcommand preceded by the workspace (either number or name) to be unset. For example: ws 2 unset.

Four keyboard shortcuts are available to easily switch workspaces: Alt+[1-8].

Every time an empty workspace is created, it starts in the current working directory.

Though by default workspaces are unnamed, you can name them however you like using the WorkspaceNames option in the configuration file. ๐Ÿท๏ธ

Use autocommands to persistently set options per workspace, for example, to always list files in the third workspace in long view. See the AUTOCOMMANDS section below for more information.

Make local settings private to the current workspace by setting the PrivateWorkspaceSettings option to true 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. ๐Ÿ”’

To directly operate on a workspace (namely, the path it points to) you can use the w: prefix followed by a workspace number or name. For example, to copy all .png files in the current directory to the third workspace, enter c *.png w:3. Press TAB immediately after w: to get the list of available workspaces. ๐ŸŽ€

x, X [DIR]

Open DIR, or the current working directory if DIR is not specified, in a new instance of clifm (as root if X, as the current unprivileged user if x) using the value of TerminalCmd (from the configuration file) as terminal emulator. If this value is not set, xterm will be used as fallback terminal emulator. This function is only available for graphical environments. ๐Ÿ–ฅ๏ธ


โœจ Shell built-in implementations โœจ

These are the lil shell built-ins clifm has got baked in, no cap. ๐Ÿง

pwd [-LP]

Print the current working directory. ๐Ÿ“

export NAME=VALUE...

Export variables to the environment. ๐ŸŒ

umask [VALUE]

Print/set the current umask value. ๐ŸŽญ

unset NAME

Remove a variable from the environment. ๐Ÿ’จ

๐Ÿ” 5. FILE FILTERS ๐Ÿ”

okay bestie, clifm hands you multiple ways to filter the current list of files, and honestly the flexibility is giving main character energy ๐Ÿ‘‘

  • a) Hidden files โ€” you do this via the -A and -a command-line flags, the hh command, and the Alt+. keybinding. โœจ

Files listed in a file named .hidden in the current directory will be hidden as well whenever hidden files are not shown (wildcards are supported).

  • b) Directories โ€” via the --only-dirs command-line switch and the Alt+, keybinding. ๐Ÿ“
  • c) Filenames and file types โ€” either via a regular expression or a file type character (see below) using the ft command (the Filter option in the configuration file and the CLIFM_FILTER environment variable are also available). For example, to exclude backup files (ending with a tilde):
CLIFM_FILTER=ยด!.*~$ยด clifm

or (in the configuration file):

Filter="!.*~$"

or (via the ft command):

ft !.*~$

See the ft command for a few more examples. ๐ŸŽ€

  • d) Filtering files via the TAB key โ€” ๐Ÿฆ‹

You can filter files by name using wildcards. For example: p *.mp3<TAB> (or /*.mp3<TAB>) to get a list of MP3 files in the current directory.

Files can also be filtered by MIME-type using the @ prefix. Type @<TAB> to list all MIME-types found in the current directory, or @query<TAB> to list all files whose MIME-type includes the string "query". For example, @image<TAB> will list all files in the current directory whose MIME type includes the string "image".

Finally, files can be filtered as well by file type using the = prefix followed by a file type character (see below). For example, =l<TAB> to get a list of symbolic links in the current directory.

Note: If using tab completion in fzf mode, multi-selection is allowed (except in the case of @<TAB>). ๐Ÿ˜ญ no group-grab for the MIME-type one, sorry bestie

Available file type characters: ๐Ÿ’…

  • b โ€” Block devices
  • c โ€” Character devices
  • C โ€” Files with capabilities (1)(2)
  • d โ€” Directories
  • D โ€” Empty directories
  • f โ€” Regular files
  • F โ€” Empty regular files
  • g โ€” SGID files (2)
  • h โ€” Multi-hardlink files (directories excluded)
  • l โ€” Symbolic links
  • L โ€” Broken symbolic links
  • o โ€” Other-writable files (2)
  • p โ€” FIFO/pipes (2)
  • s โ€” Sockets (2)
  • O โ€” Doors (Solaris only)
  • P โ€” Event ports (Solaris only)
  • t โ€” Files with the sticky bit set (2)
  • u โ€” SUID files (2)
  • x โ€” Executable files (2)

(1) Only for tab completion (2) Not available in light mode


  • e) Grouping files (via automatic expansion) โ€” ๐Ÿซถ

By means of the above features, you can easily group and operate on groups of files. For example, this command:

vt b: @image =x sel t:work *.txt

opens a virtual directory (see the VIRTUAL DIRECTORIES section below) automatically expanding the above expressions as follows:

  • b: โ€” All your bookmarks (paths)
  • @image โ€” All image files (CWD)
  • =x โ€” All executable files (CWD)
  • sel โ€” All selected files
  • t:work โ€” All files tagged as work
  • *.txt โ€” All .txt files (CWD)
likeโ€ฆ one line and you just summoned six whole groups of files?? ate, no crumbs ๐Ÿ”ฅ

โŒจ๏ธ 6. KEYBOARD SHORTCUTS โŒจ๏ธ

The following is the list of default keyboard shortcuts:

okay bestie, time for the keybindings that make you feel like a hacker in a movie ๐Ÿ’ปโœจ

Key โ€” Description

  • Ctrl+Alt+j โ€” toggles the vi editing mode, so you can edit like it's 1976 ๐Ÿง›
  • Right, Ctrl+f โ€” accepts the current suggestion, like saying "yes queen" to autocomplete ๐Ÿ‘‘
  • Alt+Right, Alt+f โ€” accepts the first suggested word (up to the first slash or space), so you get a lil piece of the suggestion ๐Ÿฐ
  • Alt+c โ€” clears the current command-line buffer, poof, gone ๐Ÿ’จ
  • Alt+q โ€” deletes the last word (up to the last slash or space), backspace but smarter โœจ
  • Alt+i, Alt+. โ€” toggles hidden-files, so you can see the secret stuff ๐Ÿ™ˆ
  • Alt+l โ€” toggles long-view, for when you want all the deets ๐Ÿ“‹
  • Alt++ โ€” toggles follow-symlinks, so you can chase those links ๐Ÿ”—
  • Alt+g โ€” toggles list-directories-first, because directories are the main characters ๐Ÿ‘‘
  • Alt+, โ€” toggles list-only-directories, no files allowed ๐Ÿšซ
  • Ctrl+Alt+l โ€” toggles max-filename-length, so you can decide how much name you can handle ๐Ÿ’…
  • Ctrl+Alt+i, Alt+Tab โ€” toggles disk-usage-analyzer, for when you need to see what's eating your storage ๐Ÿ”
  • Alt+w โ€” toggles full-path-filenames (virtual directories), so you see the whole path, not just the name ๐Ÿ›ฃ๏ธ
  • Ctrl+l โ€” refreshes the screen (reprints the list of files in the current directory), like a lil reset button ๐Ÿ”„
  • Alt+t โ€” clears program messages, so you can start fresh ๐Ÿงผ
  • Alt+m โ€” lists mountpoints, so you can see what's mounted where โ›ฐ๏ธ
  • Alt+b โ€” launches the Bookmark Manager, for all your saved faves ๐Ÿ“š
  • Alt+h โ€” shows the directory history, so you can see where you've been ๐Ÿ•ฐ๏ธ
  • Alt+n โ€” creates a new file or directory, because you're a creator ๐Ÿ’–
  • Alt+s โ€” opens the Selection Box, so you can pick and choose ๐ŸŽ
  • Alt+- โ€” launches the file previewer (the view command), so you can peek before you commit ๐Ÿ‘€
  • Alt+a โ€” selects all files in the current directory, select all the things โœจ
  • Alt+d โ€” deselects all files, because sometimes you need a clean slate ๐Ÿงฝ
  • Alt+0 โ€” runs MAS, the file pager, for when you need to page through files ๐Ÿ“„
  • Alt+p โ€” changes to the pinned directory, your home away from home ๐Ÿ 
  • Alt+[1-8] โ€” switches to workspace 1-8, so you can multitask like a boss ๐Ÿ’ผ

Key โ€” Description

  • Alt+/ โ€” bounce to the root directory
  • Alt+e, Home โ€” bounce to the home directory
  • Alt+u, Shift+Up โ€” bounce to the parent directory
  • Alt+j, Shift+Left โ€” bounce to the directory you were in before this one
  • Alt+k, Shift+Right โ€” bounce to the next directory in your visit history
  • Ctrl+Alt+o โ€” switch to the previous profile
  • Ctrl+Alt+p โ€” switch to the next profile
  • Ctrl+Alt+a โ€” archive the selected files
  • Ctrl+Alt+e โ€” export the selected files
  • Ctrl+Alt+r โ€” rename the selected files
  • Ctrl+Alt+d โ€” remove the selected files
  • Ctrl+Alt+t โ€” trash the selected files
  • Ctrl+Alt+v โ€” copy the selected files into the current directory
  • Alt+y โ€” toggle light-mode
  • Alt+z โ€” switch to the previous sort method
  • Alt+x โ€” switch to the next sort method
  • Alt+r โ€” sort in reverse order
  • Ctrl+Alt+x โ€” launch a brand new instance of clifm
  • Ctrl+y โ€” copy the contents of the line buffer to the clipboard (1)
  • F1 โ€” go to the manpage
  • F2 โ€” list commands
  • F3 โ€” list keybindings
  • F6 โ€” open the MIME list file
  • F7 โ€” open the shotgun configuration file
  • F8 โ€” open the current color scheme file
  • F9 โ€” open the keybindings file
  • F10 โ€” open the main configuration file
  • F11 โ€” open the bookmarks file
  • F12 โ€” quit
(1) bestie this shortcut is bound to the xclip plugin, so it's not just vibing on its own. Peep the PLUGINS section below for the full tea ๐Ÿ’…

Customizing keybindings ๐ŸŽ€

Okay so everything you just read? That's just the default lineup, gorgeous, but fully changeable. Use the kb bind command to remix them however you want โ€” head back up to the kb command description for all the deets.

You can also just open the keybindings configuration file and hand-edit it like a scribe โœ๏ธ โ€” that's the kb edit command. The file itself explains how to do it, so read it, it's literally telling you what to do.


Readline keybindings โœจ

Readline keybindings for command-line editing โ€” like Ctrl+a to yeet the cursor to the start of the line, or Ctrl+e to yeet it to the end โ€” should just work out of the box. No setup, no drama, it's giving plug-and-play ๐Ÿ’–

But of course you can customize them if you want. Edit the ~/.config/clifm/readline.clifm file, following the exact same rules readline itself uses for the ~/.inputrc file. Need more? Consult the readline documentation, aka readline(3). It's all there, iykyk ๐Ÿฆ‹


Keybindings for plugins ๐Ÿงš

So here's the exciting part: clifm hands you sixteen customizable keybindings just for your custom plugins. Sixteen!! Custom slots!! For your own little creations!! ๐Ÿ‘‘

Wanna claim one? Here's the procedure, step by step:

  1. Copy your plugin into the plugins directory (or honestly just use any of the plugins already chillin' in there, they're cute)

๐ŸŒธ to be continued...

  1. Link plugin*x* (where ยด*x*ยด is the plugin number [1-16]) to your plugin using the actions edit command. Like, e.g., "plugin1=myplugin.sh" โ€” that's the whole vibe.
  2. Set a keybinding for plugin*x* using the kb edit command. E.g., "plugin1:\M-7" and boom, you're wired up. ๐Ÿ’…

Kitty keyboard protocol support ๐Ÿฑโœจ

The Kitty Keyboard Protocol is a major glow-up over how terminals usually handle keyboard events. It uses CSI u escape sequences and unlocks extra modifier keys like Super, Meta, and Hyper. It's giving upgrade, fr fr.

To enable the Kitty Keyboard Protocol, do this:

  1. Download the specially crafted keybindings configuration file built to handle CSI u escape sequences (https://github.com/leo-arch/clifm/blob/master/misc/kitty/keybindings.clifm).
  2. Tell clifm to use this new file instead of the default one (~/.config/clifm/keybindings.clifm) by using the -k command-line switch. Or, alternatively, you can just replace the default file with the new one. Either way works, bestie.
  3. If your terminal isn't already set up to send CSI u sequences, use the --kitty-keys command-line switch.

So tl;dr โ€” once you've got the replacement keybindings file in place, run this:

clifm -k /path/to/keybindings/file --kitty-keys
Important ๐Ÿšจ When you're using the Kitty Keyboard Protocol, the Ctrl+d shortcut (the one used to quit secondary prompts) will no longer work. Not me losing a whole keybinding ๐Ÿ˜ญ. To fix this, add the following line to your kitty.conf file: map control+d send_text kitty \x04 This forces the terminal to emit the old value for this specific key binding, which is the workaround for the issue. Slay.

Troubleshooting ๐Ÿ”ง

Some of these default keybindings may not work on your console/terminal emulator, depending on your system. Here are some genuinely useful tips on that front:

  • Haiku terminal: Most of these keybindings will not work on the Haiku terminal, because Alt plays the role Ctrl usually plays on most other systems over there (check the Haiku documentation for the receipts). To fix this, set your custom keybindings.
  • Kernel built-in console: Key sequences involving the Shift key (Shift-Up, Shift-Left, and Shift-Right in our case) will simply not work. Use the alternative key sequences instead: Alt+u, Alt+j, and Alt+k respectively.
  • NetBSD (wsvt25) and OpenBSD (vt220) kernel consoles: Key sequences involving the Alt key will not work out of the box. Here's how to make them 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 encoding. For example: keyboard.encoding=us.metaesc
You may need to reboot the machine for changes to take effect.

On NetBSD:
Add the metaesc flag to your current encoding in /etc/wscons.conf. For example: encoding us.metaesc
You may need to reboot the machine for changes to take effect.
  • 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

If they are already bound, by contrast, you only need to unbind them. Go to "Settings -> Configure keyboard shortcuts", click on the corresponding keybinding, and set it to "Custom (none)".

  • Terminology/Yakuake: Shift+left and Shift+right are already bound to other functions, so you only need to unbind them or rebind the corresponding functions to different key sequences.

Of course, the above two procedures should be similar in case of keybinding issues in other terminal emulators. iykyk. ๐Ÿ’ซ

If 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. No cap.


7. THEMING ๐ŸŽ€๐ŸŒˆ

All customization settings (theming, bestie!) are made from a single configuration file โ€” the color scheme file โ€” installed by default in $XDG_DATA_DIRS/clifm/colors (usually /usr/local/share/clifm/colors or /usr/share/clifm/colors), though color scheme files found in $XDG_CONFIG_HOME/clifm/colors (usually $HOME/.config/clifm/colors) take precedence. Your local ones always win, periodt.

Note: Color scheme files are copied automatically to the local colors directory when running the cs edit command.

Each color scheme may include any (or all) of the below options:

  • FiletypeColors โ€” Colors for different file types, such as directory, regular files, and so on. See the COLORS section below.
  • InterfaceColors โ€” Colors for clifm's interface, such as ELNs, file properties bits, suggestions, syntax highlighting, etc. See the COLORS section below.
  • ExtColors โ€” Colors for files based on filename extensions. See the COLORS section below.
  • DateShades โ€” A comma delimited list of colors used to print timestamps (long view). Consult the default color scheme file for more information.
  • SizeShades โ€” A comma delimited list of colors used to print file sizes (long view). Consult the default color scheme file for more information.
  • DirIconColor โ€” Color for the directory icon (when icons are enabled). See the COLORS section below. Only when using icons-in-terminal or Nerfonts (default). If using rather emoji-icons, this option is ignored.
  • Prompt โ€” Define clifm's prompt. See the THE PROMPT section below.
  • DividingLine โ€” The line dividing the current list of files and the prompt. See the THE DIVIDING LINE below.
  • FzfTabOptions โ€” Options to be passed to fzf when using the fzf mode for tab completion, including colors. See the TAB COMPLETION section below.

The color scheme (or just theme) can be set either via the command line (--color-scheme=NAME), via the ColorScheme option in the main configuration file, or using the cs command, for instance, cs mytheme. Enter just cs to list available color schemes (tab completion is available, obviously ๐Ÿ’…). To edit the current color scheme enter cs edit.


1. COLORS ๐ŸŽจ

If 256 colors support is detected for the current terminal, and not set in any other way (either via the ColorScheme option in the configuration file or the --color-scheme command-line switch), clifm will attempt to load the 256-color version of the default color scheme: default-256. Otherwise, it falls back to the 16 colors version. Fingers crossed for the pretty one ๐Ÿคž.

All color codes are specified in the corresponding color scheme file (by default ~/.config/clifm/colors/default.clifm). You can edit this file pressing F8 or entering cs edit.


a. Color codes ๐Ÿ–๏ธ

Colors are specified using the same format used by dircolors(1) and the LS_COLORS environment variable, namely, a colon separated list of codes with this general format: NAME=VALUE, where NAME refers to an interface element, and VALUE to the color to be used by this element.

This is the list of file type codes (you will find them in the FiletypeColors section of the current color scheme file):

  • di = directory
  • ed = empty directory
  • nd = directory with no read/exec permission (1)
  • fi = regular file
  • ef = empty regular file
  • nf = file with no read permission (1)
  • 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 = inaccessible files (fstatat(3) error)
(1) If unset, the corresponding file type color is used and an exclamation mark is printed before the filename in the file list (provided icons are disabled -otherwise the lock icon is used- and clifm is not running in light mode -in light mode access checks are not performed). The color used for the exclamation mark is xf (see below).

The following codes are used for different interface elements (in the InterfaceColors section of the current color scheme file):

Suggestions ๐Ÿ’ญ

  • sb = shell builtins
  • sc = aliases and shell command names
  • sd = internal commands description
  • sf = ELNs, bookmarks, tag, and filenames
  • sh = commands history entries
  • sx = suggestions for clifm's internal commands and parameters
  • sp = suggestions pointer (e.g., 56 > filename, where > is the suggestion pointer)
  • sz = filenames (fuzzy)

Syntax highlighting โœจ

  • 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)

Prompt elements ๐Ÿ‘‘

  • li = selected files
  • ti = trash indicator
  • ac = autocommand 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)

File properties ๐Ÿ”

  • db = file allocated blocks
  • dd = last access/change/modification time (1)
  • 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 (2)
  • 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 (1)
(1) If unset (default), gradient colors are used (based on file size and file age). (2) If unset (default), a dimmed version of the current timestamp color is used.
Note, bestie: for a better graphical representation of file properties, clifm uses 256 colors if it possibly can. If it can't? It falls back to 16 colors. That's it, that's the tea. ๐Ÿ’…

๐ŸŽ€ Miscellaneous interface elements

okay so these are all the lil interface bits you can paint, and here's what each code means:

  • fc โ€” the file counter
  • df โ€” default color
  • dl โ€” dividing line
  • el โ€” ELN color
  • lc โ€” symbolic link indicator (ColorizeSymlinksAsTarget only)
  • mi โ€” misc indicators (disk usage, sort method, bulk rename, jump database list)
  • ts โ€” matching suffix for possible tab completed entries
  • tt โ€” tilde for truncated filenames
  • wc โ€” welcome message
  • wsN โ€” color for workspace N (1-8)
  • xs โ€” exit code: success
  • xf โ€” exit code: failure

๐ŸŒˆ b. Supported colors ๐ŸŒˆ

4-bit, 8-bit (256-color), and 24-bit (true-color) specs are all supported. periodt.

Colors are defined basically as SGR sequences (excluding the initial escape character and the ending m) โ€” literally the same sequences the LS_COLORS environment variable uses. But listen, there are shortcuts for 8-bit (256-color) and 24-bit (true-color) specs, because typing the long form is giving carpal tunnel. For example:

31            4-bit
38;5;160      8-bit
@160          8-bit  (short)
38;2;255;0;0  24-bit
#ff0000       24-bit (short, HEX) (1)

(1) Both three and six digit hexadecimal colors work (lowercase or uppercase, we don't judge). So like, #f00 amounts to #ff0000. ๐Ÿ’–

A single 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:

  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
Note: some of these attributes may just... not be supported by every terminal emulator out there. Not their fault, not yours. ๐Ÿ™ˆ

So for example, bold red in hex is #ff0000-1, while the 256-color version is @160-1. (want more lore on SGR sequences? go read https://en.wikipedia.org/wiki/ANSI_escape_code, iykyk.)


๐Ÿฆ‹ c. Color names ๐Ÿฆ‹

Xterm-like color names are supported too, bestie. For example: ex=DodgerBlue2.

Here's the whole list of color names (as defined by vifm(1)):

     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

Just like with hex colors, you can stick a single attribute onto a color name too. For example, SteelBlue1-1 gets you the bold version of that color. slay. โœจ


๐Ÿ’œ d. Color variables ๐Ÿ’œ

You can have up to 128 custom color variables, declared with the define keyword, so your theme files are easier to build and actually readable. Example:

define FTYPE_DIR=31
define IFACE_ELN=4;38;2;255;255;0;48;2;0;14;191

FiletpeColors="di=FTPYE_DIR:"
InterfaceColors="el=IFACE_ELN:"

Heads up though: these variables can only be used for FiletypeColors, InterfaceColors, ExtColors, and DirIconColor. The Prompt line (if you're using a prompt code) uses full SGR sequences or prompt-specific color codes instead. No shortcuts there, sorry babe. ๐Ÿ˜ญ


โญ e. Examples โญ

A few examples to put all this together, bestie:

fi=4;31    (regular files are 4-bit underlined red)
di=@33-1   (directories are 8-bit bold light-blue)
ln=#5fd7ff (symbolic links are 24-bit light cyan)
so=Yellow3 (socket files are Yellow3)

More complex combos can be achieved using complete SGR sequences (say, if you wanna add a background color). E.g.,

fi=4;38;2;245;76;48;2;0;0;255

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 that supports true colors, otherwise it's giving ๐Ÿ’€. To test your terminal's color capabilities use the colors.sh script (it lives in the plugins directory).

Note: sometimes โ€” for some reason โ€” you might need to force clifm to use colors despite whatever the TERM variable says. Like, the OpenBSD console sets TERM to vt220 by default, which, according to the terminfo database, doesn't support color. But plot twist: the OpenBSD console does actually support color. In that case, you can set the CLIFM_FORCE_COLOR a specific value even if the value of TERM says otherwise. Supported values are: 8, 16, 256, truecolor (or 24bit).

To see a colored list of the currently used colors, run the cs preview command. ๐Ÿ‘‘


To run without colors use the --no-color command-line option, or set either the CLIFM_NO_COLOR or NO_COLOR environment variables to any value. Wanna read up on the whole no-color initiative? It's at https://no-color.org/ ๐ŸŽ€

And for a full no-color experience, bestie, remember to edit your prompt and strip out all the color codes. Fr fr.


โœจ 2. THE PROMPT โœจ

๐ŸŒธ 2.a. Description ๐ŸŒธ

Clifm's prompt gets pulled from the Prompt line in the color scheme file, and it references a prompt name defined in the prompts file. Like, for example, Prompt="security-scanner".

Every prompt is built using basically the same escape codes and rules the Bash prompt uses, with one exception: it does not accept shell functions (so no conditionals, no loops, sorry babe ๐Ÿ˜ญ). But you can use command substitution (written as $(cmd)), prompt modules (written as ${module}), color codes (written as %{color}), string literals, and escape sequences to build your prompt. Slay.

Go look at the prompts file (just run prompt edit) for the detailed tea and examples on how to build one. ๐Ÿ’…

By default, for instance, clifm's prompt line is this:

"%{reset}\I[\S%{reset}]\l \A \u:\H %{cyan}\w%{reset}\n<\z%{reset}> %{blue}\$%{reset} "

which, once decoded, should look something like this:

[1] 13:45 user:hostname /my/path
<0> $

with the workspace number printed in blue, the path in cyan, the last exit status in green (or red if there was an error), and the dollar sign in blue. Iconic.

Wanna go more "classic" with it? You can generate that like this:

"\u@\U \w> "

or, using command substitution now:

"$(whoami)@$(hostname) $(pwd)> "

๐Ÿ’œ 2.b. Prompt notifications ๐Ÿ’œ

A bold red R hanging out at the left of the prompt is clifm reminding you that the program is running as root. A bold green S means there are elements sitting in the Selection Box. In the same way, a cyan T means there are currently files in the trash can, and a bold blue S means the program is running in stealth mode. ๐Ÿฅท

And finally, clifm uses three kinds of messages: errors (a red E at the left of the prompt), warnings (a yellow W), and simple notices (a green N).

If Notifications is set to false in the prompts file, none of those notifications will be printed by the prompt โ€” but they're still available to you as escape codes (see above) and environment variables (see the ENVIRONMENT section below) so you can build your own custom prompts. ๐Ÿ’–

๐ŸŽ€ 2.c. The Warning Prompt ๐ŸŽ€

The suggestions system comes with a secondary, warning prompt, used to highlight wrong/invalid/non-existent command names. Once you enter an invalid command, the regular prompt switches over to the warning prompt. Not me getting caught slipping ๐Ÿ™ˆ

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)

You can customize the warning prompt using the exact same rules as the regular prompt. To use a custom one, just modify the WarningPrompt line in the prompts file (via the prompt edit command). It defaults to

"%{reset}%{b:red}(!)%{n:dim} > "

and the last line of the regular prompt becomes "(!) > ", with "(!)" printed in bold red. ๐Ÿ”ฅ

To disable this whole feature, use the --no-warning-prompt command-line switch, or set the EnableWarningPrompt option to false in the prompts file.

Note: keep in mind that the warning prompt depends on the suggestions system, so it will not be available if that system is disabled.

๐Ÿฆ‹ 2.d. The Right Prompt ๐Ÿฆ‹

The right prompt is literally just like the regular prompt, except it's printed on the right side of the screen. Main character energy, honestly.

Use the RightPrompt option in the prompts file to set one. For a concrete usage example, peep the info prompt in the prompts file.

A few caveats though, bestie:

  1. Right prompts only work with multiline regular prompts (if your regular prompt is a single line, the right prompt is not printed).
  2. Multiple lines are not supported by right prompts (only the first line will be printed).
  3. If the decoded right prompt exceeds the number of available terminal columns, the prompt is not printed.

๐ŸŒˆ 3. THE DIVIDING LINE ๐ŸŒˆ

That's the line dividing the current list of files and the prompt. You can customize it with the DividingLine option in the color scheme file, so it matches your prompt design and/or color scheme. ๐Ÿ’…

DividingLine accepts one or more ASCII or Unicode characters (in both cases you only need to type/paste the character(s) you picked). If you specify just one character (by default, -), it gets printed over and over to fill the current line all the way up to the right edge of the screen or terminal window. But if you don't want it covering the whole line, specify two or more characters โ€” in that case only those characters (and no more) get used as the dividing line. For example: "------->". ๐Ÿน

Wanna use an empty line? Set DividingLineChar to "0" (that's as a character, not as a number, okay?). And finally, if this value isn't set at all, a special line drawn with box-drawing characters gets used (heads up: box-drawing characters aren't supported by all terminal emulators).

The color of this line is set via the dl color code in the color scheme file. Consult the COLOR CODE section above for more info. โœจ


โญ 4. FZF WINDOW โญ

Refer to the TAB COMPLETION section below. That's it, that's the section. ๐Ÿ’€


๐Ÿ‘‘ 8. BUILT-IN EXPANSIONS ๐Ÿ‘‘

๐Ÿ“ 1. ELNs ๐Ÿ“

A number representing the Entry List Number (ELN) of a listed file is expanded to its corresponding filename. You can type ELN<TAB> to convert the ELN into the filename. ELN ranges are supported too. For example, t 1-3 10 24 will move the files with ELNs 1 through 3, 10 and 24 to the trash. ๐Ÿ—‘๏ธ

Bear in mind that ELNs will only be expanded provided some filename is listed on the screen under the corresponding 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 filenames listed on the screen. And note that the second field of 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). โœจ

Since ranges can be a bit tricky, tab completion is available to make sure the range actually includes the filenames you wanted. ๐Ÿซถ

If this feature somehow conflicts with the command you want to run โ€” say, chmod 644 ... โ€” because the current number of files is equal to or larger than 644 (in which case clifm will expand that number ๐Ÿ˜ญ), then you can simply run the command as external: ;chmod 644 ...

๐Ÿ’– 2. Selected files ๐Ÿ’–

The s: prefix expands to all selected files (as absolute paths). To get the list of selected files, type s:<TAB>. The sel keyword can be used as well, but, unlike s:, it can only be used after the first word, i.e., as a command parameter. For example, m sel (or m s:) will move all selected files to the current directory. To trash or remove selected files, simply run t sel or r sel respectively. Easy. ๐Ÿ’…

๐ŸŽ€ 3. Bookmarks ๐ŸŽ€

The b: prefix expands to all bookmarked files (as absolute paths). Enter b: followed by a bookmark name to expand to the absolute path referred to by that bookmark. To get the list of available bookmarks, type b:<TAB>. For example, p b:work will print the file properties of the bookmark named work. ๐Ÿฆ‹

๐ŸŒธ 4. Tagged files ๐ŸŒธ

The t: prefix is used to access tagged files. Type t:<TAB> to get the list of available tags. Type t:TAG<TAB> to get the list of files tagged as TAG. t:TAG expands to all files tagged as TAG (as absolute paths). For example, s t:old will select all files tagged as "old". Obsessed. ๐Ÿ’œ

๐ŸŒˆ 5. Workspaces ๐ŸŒˆ

The w: prefix expands to a specific workspace (as absolute path). For example, c sel w:3 will copy all selected files to the third workspace. โœจ

โญ 6. File types โญ

The = (equal) prefix is used to filter files according to their type. Type =<TAB> to get the list of available file types in the current directory. Also, type =x<TAB> to get the list of executable files in the current directory. For example, r =D =F =L will remove all empty directories, empty regular files, and broken symbolic links in the current directory. ๐Ÿ’€

๐Ÿงš 7. MIME types ๐Ÿงš

The @ (at sign) prefix is used to filter files according to their MIME type. Type @<TAB> to get the list of MIME types available in the current directory. For example, br @image will bulk rename all files in the current directory whose MIME type includes the word "image". ๐Ÿ”ฅ

๐Ÿ“ 8. Pinned directory ๐Ÿ“

A single comma (,) expands to the currently pinned directory (see the pin command for more information). For example, the command c =o , will copy all other-writable files in the current directory to the pinned directory. ๐Ÿ“Œ

๐Ÿ’œ 9. Parent directories ๐Ÿ’œ

Via the fastback function, you can quickly change to any parent directory using a series of dots. A single dot (.) refers to the current directory, and two dots (..) refer to the parent directory. This pattern continues, so three dots (...) refer to the parent of the parent directory, four dots (....) refer to the parent of the parent of the parent directory, and so on. In general, n dots refer to the nth level of parent directories. โœจ


Needless to say, combinations are possible. ๐Ÿ’… For example, the command c sel b:work @image =L 1-3 , will copy all selected files, the bookmark named work, all images, broken symbolic links in the current directory, and files with ELNs 1 through 3 to the pinned directory. Ate and left no crumbs, honestly. ๐Ÿ‘‘

Note: If using the fzf mode for Tab completion (which is the default), you can operate on some files of any of these groups of files using the TAB key to mark files in the list. For example, you can type CMD sel<TAB> to get the list of selected files, then use the TAB key to mark the desired files. Press Enter or Right to insert the marked files into the current command line. ๐Ÿซถ

9. TAB COMPLETION ๐Ÿ’…

okay bestie, listen, tab completion here comes in four modes and you're gonna be obsessed:

By default, if any of fzf, fnf, or smenu (in this order) is installed (found in $PATH), clifm will attempt to use the corresponding mode to display completions. You can force the use of a specific mode with --tabmode=[fzf|fnf|smenu|standard]. The TabCompletionMode option in the configuration file can be used to permanently set the tab completion mode.

If using the fzf mode, the completions interface can be customized using the FzfTabOptions 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 none to pass no option, to the empty string to load the default values, or to any other custom value. Unless set to none, any option specified here will override FZF_DEFAULT_OPTS.

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

Consult fzf(1) for more information.

If set neither in FzfTabOptions nor in FZF_DEFAULT_OPTS (in this order), the height of the fzf window is set to the default value: 40% of the current terminal number of line/rows.

To use fzf global values (defined in FZF_DEFAULT_OPTS), set FzfTabOptions to none.

File previews are available in fzf mode via shotgun. See the SHOTGUN section above.

Image previews are available via the clifmimg plugin. Run help image-previews for more information.

If using the smenu mode, the interface can be customized using the CLIFM_SMENU_OPTIONS environment variable. For example:

export CLIFM_SMENU_OPTIONS="-a t:2,b b:4 c:r ct:2,r sf:6,r st:5,r mt:5,b"

Consult smenu(1) for more information.

For information about how to customize fnf consult fnf(1).

Clifm can perform fuzzy tab completion (just as suggestions) for filenames and paths (e.g., "dwn" is completed/suggested as "Downloads"). To enable this feature use the --fuzzy-matching command-line switch or set FuzzyMatching to true in the configuration file.


10. FILE OPENER ๐Ÿซถ

As clifmยดs built-in file opener, Lira takes care of opening files when no opening application has been specified in the command line (or when running as a standalone file opener, via the --open command-line switch). It does this by automatically parsing a MIME list file (see the FILES section below): it looks first for a matching pattern (either a MIME type or a filename), then checks the existence of the command associated to this pattern, and finally executes it.

Lira is controlled using the mime command. File associations are stored in the MIME list file and can be edited using the mime edit command.

When running for the first time, or whenever the MIME list file cannot be found, clifm will copy the MIME definitions file from the DATADIR directory (usually /usr/share/clifm/mimelist.clifm) to the local configuration directory.

Lira 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).

Note: In case of directories (whose MIME type is inode/directory), the entry will be used only for the open-with command (ow).

A note about MIME types ๐Ÿงš

File MIME types are determined using libmagic โ€“the same library used by file(1)โ€“, which, although highly reliable, is not bullet-proof. Sometimes it fails, either because the appropriate MIME type is not in its database, or because the database is just wrong. In either case, you can manually map file extensions to MIME types using a specific file: ~/.config/clifm/mime.types or ~/.mime.types.(1)

For example, libmagic knows nothing about ILBM image files, and returns application/zip for OpenRaster images. Create ~/.config/clifm/mime.types with the following content:

image/x-ilbm       iff lbm
image/openraster   ora

Restart clifm and these MIME types will be immediately associated to all files having the specified extensions (to test it, run mm info on any of these files).(2)

If required, edit the mimelist and the preview files (mm edit and view edit, to specify how files are opened and previewed respectively), and add a new line handling the corresponding MIME types (e.g., "image/x-ilbm=APP" and "image/openraster=APP"). See below for more information.

(1) To use a custom location, set $CLIFM_MIMETYPES_FILE to the desired file path: e.g., CLIFM_MIMETYPES_FILE=/etc/mime.types clifm. Note that Shared MIME-info XML files are supported as well: e.g., CLIFM_MIMETYPES_FILE=/usr/share/mime/packages/freedesktop.org.xml clifm. For more information about this file consult https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/.

(2) In case of issues, bear in mind that the mime.types file is read top to bottom, and that, in case of conclicts (mostly duplicate extensions), only the last entry is effective.

Important: Though sometimes convenient, determining file types by means of filename extensions alone is unreliable: a file, no matter its type, can bear any file extension, without restriction. Because of this, you might end up executing a command that was not intended due to wrong file identification. Be extra careful when doing this.

1. Syntax โœจ

In its most basic form, each line in the MIME list file consists of:

a) A left value: this is just a regular expression indicating what we are trying to match (it can be a filename, a file extension, or a MIME type).

b) 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).

For example:

^text/.*=leafpad

which is to be read as follows: Open text files (in this case we are partially matching a MIME type) using leafpad.

As explained below, this basic rule can be modified to get much more control on what we are matching and how we execute the opening application.

The syntax is this:

[!][X:][N:]REGEX=CMD [ARGS] [%[f,x]] [![E,O]] [&]; ...

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 commands and parameters.

2. The left value (REGEX) ๐Ÿ”

2.1. The X prefix

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

instructs lira to open all text files using leafpad, no matter if we are running on a graphical or non-graphical environment.

However, we usually do not want to use leafpad 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

where the first rule (via the X prefix) is intended for use on graphical environments, where we can use leafpad, and the second one (via the !X prefix) for non-graphical environments, where we rather prefer to use nano.

2.2. The N prefix

Sometimes MIME types are not enough to identify a file, or we just want to match a specific filename. In this case, we can use the N prefix to tell Lira that we want to match a filename instead of a MIME type. For example:

X:N:^filename.txt$=leafpad

in which case we want to match exactly the filename filename.txt (no matter its MIME type).

If we want to match file extensions, instead of entire filenames, we can use a regular expression, as follows:

X:N:.*.txt$=leafpad

Here, we are not matching a specific filename, but a specific file extension, so that the rule reads as follows: open all files ending with .txt using leafpad.

3. The right value (CMD) ๐Ÿ’ซ

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

which means: Open .txt files (graphical environments only) using leafpad --sync, or, if not found, geany, mousepad, or nano, in this order. The file to be opened will be appended to the command string, say leafpad --sync FILE.

3.1. The %f placeholder

Use the %f placeholder to specify the position of the file to be opened in the command, for example:

mpv %f --terminal=no

will be translated into: mpv FILE --terminal=no

If the placeholder is not specified, the file to be opened will be appended to the command string. Thus, this: mpv --terminal=no amounts to this: mpv --terminal=no FILE.

3.2. STDERR and STDOUT

Sometimes we might need to silence either standard error (STDERR), standard output (STDOUT), or both. Use !E and !O to silence them respectively. Both can be used together: !EO. Example: leafpad %f !EO, or, to silence only STDERR: leafpad %f !E.

3.3. Run in the background

The ampersand character (&) can be used, as usual, to run the opening application in the background. Example: leafpad %f &.

3.4. The %x flag

The %x flag is a shortcut for "%f !EO &": the command will be executed in the background and both STDOUT and STDERR will be silenced. As a plus, the command is executed in a new session, i.e. detached from the running terminal (via setsid(3)). This flag is recommended to open files via graphical applications. Examples:

For GUI applications:

APP %x

For terminal applications:

TERM -e APP %x

Replace TERM and APP by the appropriate values (say, xterm and vi respectively). The -e option might vary depending on the terminal emulator used.

Note: In case of archives, the built-in ad command can be used as opening application.

3.5. Environment variables ๐ŸŒˆ

Environment variables (e.g., $EDITOR, $VISUAL, $BROWSER, and even $PAGER) are also recognized by Lira. You can even set custom environment variables to be used exclusively by clifm. For example, you can set CLIFM_TERM, CLIFM_EDITOR, and CLIFM_PDF, and then use them to define some associations:

X:text/plain=$CLIFM_TERM -e $CLIFM_EDITOR %f &
X:N:.*\.pdf$=$CLIFM_PDF %f &

3.6. Using shell scripts ๐Ÿ’…

Bestie, real talk: commands get run directly, no shell in between. So none of the shell goodies are available โ€” no pipes, no conditions, no loops, none of it. ๐Ÿ˜ญ

If you need something fancier than a single command (aka you do want shell capabilities), write your own script and drop the path to that script where the command would go. Like:

X:^text/.*:~/scripts/my_cool_script.sh

4. Examples: โœจ

Match a complete filename:

X:N:some_filename=nano;vim;vi;emacs
Note: if the filename contains a dot, quote it like this: some_filename\.ext (so the REGEX parser doesn't go feral and read that dot as a regex dot).

Open video files with mpv in the foreground and silence STDERR:

^video/.*=mpv %f !E

Open video files with gmplayer in the background and silence both STDERR and STDOUT:

^video/.*=gmplayer %f !EO & (or 'gmplayer %x')

Match multiple filenames (starting with "str"):

X:N:^str.*=leafpad %x;mousepad %x;kate %x;gedit %x

Match a single extension:

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

Match multiple extensions:

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

Match a single mimetype:

!X:^audio/mp3$=mpv %f --terminal=no;ffplay -nodisp -autoexit;mpv;mplayer

Match multiple mimetypes:

X:^audio/.*=mplayer;mplayer2;vlc %x;gmplayer %x;smplayer %x;totem %x

And with MIME types you can also write the whole expression with zero regular expressions, no regex energy required:

!X:text/plain=$TERM -e $EDITOR %x

Wanna know more? Go look at the mimelist file itself (hit F6 or run mm edit) ๐Ÿซถ

5. Using a third-party opener

Two ways to do this, bestie, pick your fighter:

a. Set Opener in the configuration file to the name of the opener you want. Say you wanna use Ranger's rifle(1):

Opener=rifle

or, if xdg-open(1) is more your vibe:

Opener=xdg-open

b. Tell Lira to open all files โ€” every MIME type, every filename, no questions asked โ€” via the opener you want. For example:

.*=rifle

6. Using Clifm as a standalone file opener

Okay so even though clifm is a file manager, it can lowkey just be a simple file opener through the --open command-line option. Like:

clifm --open /path/to/my_file.jpg
clifm --open /path/to/my_dir
clifm --open https://some_domain
Note: when opening web resources, clifm queries the mimelist file using text/html as the MIME type. Whatever association it finds for that specific MIME type is what gets used to open the web resource. Periodt. ๐Ÿ‘‘

๐ŸŒธ 11. SHOTGUN ๐ŸŒธ

1. Tab completion with file previews

Shotgun is clifm's built-in file previewer ๐ŸŽ€ And yeah, as we're about to get into, it can be used as a standalone, general purpose file previewer (kinda like pistol(1) in that regard), but its main character job is being used by clifm's tab completion function running in fzf mode: every time tab completion is invoked for files, shotgun gets executed with the currently highlighted file as its argument (exactly like shown below) to generate the preview. Set the FzfPreview option in the configuration file to false (or run with --no-fzfpreview) to disable this feature.

Shotgun is also what the view command uses to show file previews full screen. Iconic. โœจ

2. Running as a standalone files previewer

Run it via the --preview command-line switch and shotgun does file preview for any file you hand it as an argument. For example:

clifm --preview myfile.txt

This command generates a preview of the file myfile.txt and then quits clifm. That's it, that's the whole thing ๐Ÿ’–

3. Customization

Previewing applications (based on either MIME type or filename) are defined in a configuration file $XDG_CONFIG_HOME/clifm/profiles/PROFILE/preview.clifm, using the exact same syntax as Lira (the built-in file opener). Go check the FILE OPENER section above, bestie.

You can set an alternative configuration file with the --shotgun-file command-line switch:

clifm --shotgun-file=/path/to/shotgun/config/file --preview=myfile.txt

To customize how the preview window looks, use the --preview-window option in the FzfTabOptions line of your current color scheme file. So if you want the preview window down the file list instead of off to the right:

--preview-window=down

Default keybindings for the preview window, no cap:

Alt+p: Toggle the preview window
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

You can customize those keybindings using the --bind option in the FzfTabOptions field in the color scheme file. ๐ŸŒˆ

Consult fzf(1) for more info.

4. Image previews

Image previews are available via the clifmimg plugin ๐Ÿ–ผ๏ธ Run help image-previews or go consult the Wiki for more:

https://github.com/leo-arch/clifm/tree/master/misc/tools/imgprev

๐Ÿ’œ 12. AUTO-SUGGESTIONS ๐Ÿ’œ

Gemini is a built-in suggestion system (similar to what the Fish shell does). As you type, Gemini suggests possible completions right after wherever your cursor is. It's giving psychic bestie energy, honestly. ๐Ÿ”ฎ

The following checks are available (and yes, the order can be customized, keep reading):

a. ELNs

b. clifm commands and parameters

c. Entries in the command history list (commands you already used)

d. Filenames in the current working directory and paths (1)

e. Entries in the jump database

f. Aliases names

g. Bookmarks names

h. Program names in PATH

i. Shell builtins (2)

(1) Fuzzy suggestions are supported. For example: dwn > Downloads. Turn this on with the --fuzzy-marching command-line switch, or by setting FuzzyMatching to true in the configuration file.

(2) The shell name is taken from /bin/sh. These shells are supported: bash, dash, fish, ksh, tcsh, and zsh. Command names get checked in this order: clifm internal commands, commands in PATH, and shell builtins.

Note: By default, a brief description for internal commands is suggested. You can turn that off via the SuggestCmdDesc option in the configuration file.

To accept the entire suggestion press Right or Ctrl+f: the cursor moves to the end of the suggested command and the suggestion color switches to the color of the typed text; then you just press Enter to execute the command like normal. If you don't accept the suggestion, no biggie โ€” it's simply ignored and you can keep editing your command line however you want.

To accept only the first suggested word (up to the first slash or space), press Alt+Right or Alt+f instead. Not available for ELNs, aliases and bookmarks names, sadly.

Bear in mind that suggestions for ELNs, aliases, bookmarks names, the jump function (invoked by the j command), and also filenames and paths (if fuzzy-suggestions are enabled) do not work like the other suggestions: they don't suggest possible completions for your current input, they suggest the value that input points to. For example, if you type "12" and the current file list has a filename whose ELN is 12, that filename gets printed next to "12" like this: 12_ > filename (where the underscore is your current cursor position). Press Right or Ctrl+f to accept it, and the text you typed so far gets replaced by the suggestion. ๐Ÿ’…

The order of the suggestion checks can be customized with the SuggestionStrategy option in the configuration file. Each check gets a lowercase character:

a = Aliases names
c = Possible completions
e = ELNs
f = Files in the current directory
h = Entries in the commands history
j = Entries in the jump database

The value of SuggestionStrategy is a string containing one or more of those characters. The order of the characters in that string is the order the suggestion checks get performed in. So like, to do all checks in the same order listed above, the string should be acefhj (no quotes). Or if you'd rather run the history check first: hacefj. And you can skip one or more checks by just omitting the matching character (to skip all checks, set the option value to a single dash (-)). So to ignore the aliases and the ELN checks, set SuggestionStrategy to hcfj. The default value for this option is ehfjac.

Note: The check for program names in PATH always runs last, except when the ExternalCommands option is disabled โ€” in which case suggestions for them just don't show up at all.

Suggestions get printed using one of these color codes (peep the COLOR CODES section above):

  • sf: Used for file and directory names. This includes suggestions for ELNs, bookmarks names, files in the current directory, and possible completions. Default value: 2;4;36 (dimmed underlined cyan)
  • sh: Used for entries in the commands history.
  • sc: Used for aliases and program names in PATH.
  • sx: Used for clifm internal commands and parameters.
  • sp: Greater-than sign (>) used when suggesting ELNs, bookmarks, and aliases names.

You can set SuggestFiletypeColor to true in the configuration file to use the color of the file type of the current filename (as set in the color scheme file) instead of the value of sf. For example, if a suggestion is printed for a file that's a symbolic link, ln or or (if it's a broken link) will be used instead of sf. ๐ŸŒˆ


๐Ÿงš 13. SHELL FUNCTIONS ๐Ÿงš

clifm ships a few shell functions for specific actions (cd-on-quit, and subshell-notice). Go take a look at the corresponding files in /usr/share/clifm/functions and follow the instructions. And needless to say, you can absolutely write your own functions, bestie. ๐Ÿ’…


๐ŸŽ€ 14. PLUGINS ๐ŸŽ€

Plugins are just scripts or programs (written in literally any language) meant to add, extend or improve clifm's functionalities. They're linked to action names defined in a dedicated configuration file: $XDG_CONFIG_HOME/clifm/profiles/PROFILE/actions.clifm. ๐Ÿฆ‹

Note: In stealth mode, since access to configuration files is not allowed, plugins are disabled.

To list available actions and the plugins they're linked to, run actions.

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

To get info about a specific plugin, enter the action name followed by --help.

bestie, here's the tea on writing your own plugins ๐Ÿซถ

So clifm ships a whole bunch of plugins at installation time (they live in the plugins directory, obviously), but that's just the starter pack, okay? You can write your own, in any language you want, for whatever purpose you want. Writing plugins is generally pretty easy โ€” like, genuinely, it's giving beginner-friendly ๐Ÿ’… โ€” but your mileage may vary depending on what you're trying to achieve. The best place to start? Go snoop on the plugins that already ship with it, and read the actions command description. Also hit up the ENVIRONMENT and FILES sections below, they're lowkey essential. ๐Ÿ‘‘


๐Ÿงš The plugins-helper script (iykyk)

There's a convenient little helper script that keeps everything looking consistent across all your plugins โ€” especially the ones running fzf, because nothing ruins a vibe like mismatched output, fr fr.

It lives here:

  • DATADIR/clifm/plugins/plugins-helper

โ€ฆbut it gets overridden by this if it's found:

  • $XDG_CONFIG_HOME/clifm/plugins/plugins-helper

And the way clifm does you a solid: it sets the location of this file itself, in the CLIFM_PLUGINS_HELPER environment variable, so your plugins can just use it. โœจ

So to write a new fzf plugin, you source the file and then use any of the functions and variables it hands you:

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

Slay. That's literally it for the setup. ๐ŸŽ€


๐Ÿ’– Talking to clifm: the CLIFM_BUS pipe

Okay this part is the main character energy of the whole section, pay attention bestie.

Plugins can talk back to clifm through a dedicated pipe that exists for exactly this purpose, and it's exposed via an environment variable: CLIFM_BUS. You write to that pipe, and clifm will hear you and handle the message immediately after the plugin's execution. ๐Ÿฆ‹

Now here's how clifm interprets what you sent:

  • If the message is a path, clifm runs the open function โ€” meaning it changes the current directory to that new path if it's a directory, or opens it with the default associated application if it's a file.
  • Otherwise, if the message is not a path, it just gets taken and executed as a command. ๐Ÿ’€

Examples, because examples >>> everything:

echo "/tmp" > "$CLIFM_BUS"

โ†‘ this one tells clifm to change the current directory to /tmp โœจ

echo "s *.png" > "$CLIFM_BUS"

โ†‘ and this one makes clifm select all the files in the current directory ending with ".png" ๐Ÿ”ฅ

โš ๏ธ Heads up: the pipe (CLIFM_BUS) is deleted immediately after the execution of its content, and then recreated before running any other plugin. So don't go thinking it's just sitting there forever waiting for you โ€” it's a one-shot situation, no cap. ๐Ÿ™ˆ

Okay bestie, here's the roster of plugins that ship ready to go ๐ŸŽ€ โ€” every one of these is an action name you can call, plus what it does and what it needs installed to work:

  • bn โ€” create files in batch. deps: -
  • bcp โ€” copy files in batch. deps: -
  • bmi โ€” import your bookmarks. deps: -
  • clip โ€” talk to the system clipboard, like, actually interact with it. deps: (1)
  • unset โ€” test what colors your terminal can actually do. deps: (2)
  • cr โ€” copy files off to a remote location. deps: fzf, and scp, ffsend, or croc
  • da โ€” disk usage analyzer, the vibe check for your storage. deps: du, fzf
  • dr โ€” drag and drop files. deps: dragon or dragon-drag-and-drop
  • fdups โ€” find (and yeet) duplicate files. deps: (3)
  • + โ€” find files in the current directory. deps: fzf or rofi
  • _ (underscore, yes really) โ€” quickly change directory. deps: fzf
  • h โ€” browse through your commands history. deps: fzf
  • - (yes, just a dash ๐Ÿ’…) โ€” navigate/select/preview files. deps: see the section below
  • * โ€” select files (flat view included, no cap). deps: fzf, find
  • ** โ€” deselect files. deps: fzf
  • unset โ€” show git repo status. deps: git (4)
  • ih โ€” browse clifm's manpage (meta, iconic, obsessed). deps: fzf
  • i โ€” image thumbnails previewer. deps: sxiv, feh or lsix
  • ++ โ€” jump to a directory in the jump database. deps: fzf or rofi
  • kd โ€” decrypt a GnuPG encrypted file. deps: gpg, tar, sed, grep
  • ke โ€” encrypt files/dirs using GnuPG. deps: gpg, tar, sed, fzf, awk, xargs
  • ml โ€” list files by a given MIME type. deps: fzf, file
  • music โ€” create a music playlist ๐ŸŽง. deps: mplayer
  • gg โ€” pipe the files in the CWD through a pager. deps: less, column
  • ptot โ€” preview PDF files as text. deps: pdftotext
  • rrm โ€” recursively remove files (careful, bestie ๐Ÿ˜ญ). deps: find, fzf
  • // โ€” search files by content. deps: fzf, ripgrep
  • unset โ€” update plugins ยท dep: (5)
  • vid โ€” preview video files thumbnails ยท dep: ffmpegthumbnailer
  • vt โ€” virtual directory for sets of files ยท dep: sed
  • wall โ€” set image as wallpaper ยท dep: (6)
  • unset โ€” pick/select files via clifm ยท dep: (7)
  • Ctrl+y โ€” copy the line buffer to the clipboard ยท dep: (8)

okay bestie, now the footnote lore ๐Ÿ’… these little numbers are doing SO much work:

  1. 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)
  2. colors.sh (by default unset)
  3. find, md5sum, sort, uniq, xargs, sed, stat
  4. The git_status.sh plugin is not intended to be used as a normal plugin โ€” like, you don't run it via an action name, periodt. Instead it's meant to be run as a prompt command (so it fires right before every single prompt ๐ŸŒธ). Drop this line into the main configuration file:
promptcmd /usr/share/clifm/plugins/git_status.sh

And yeah, this plugin gives you basic Git integration, but it's genuinely so easy to modify (it's literally just a few lines long) that you can add whatever git function you're craving. ๐Ÿ’…

  1. update.sh (by default unset)
  2. feh, xloadimage, hsetroot, or nitrogen (for X); swww or swaybg (for Wayland)
  3. file_picker.sh (by default unset). Usage example: ls -ld $(file_picker.sh)
  4. Dependencies: cb, wl-copy, xclip, xsel, pbcopy, termux-clipboard-set, clipboard, or clip. Go peek at the plugin file itself (xclip.sh) for more info ๐Ÿซถ

โœจ Dependencies of the previewer plugin (fzfnav.sh) โœจ

  • archives: atool, bsdtar, or tar
  • images: kitty terminal, imagemagick, and ueberzug or viu or catimg or img2txt or pixterm
  • fonts: fontpreview or fontforge
  • docs: libreoffice, catdoc, odt2txt, pandoc
  • PDF: pdftoppm, pdftotext or mutool
  • epub: epub-thumbnailer
  • DjVu: djvulibre or djvutxt
  • postscript: ghostscript
  • videos: ffmpegthumbnailer
  • audio: ffmpeg, mplayer, or mpv
  • web: w3m, links, elinks, or pandoc
  • markdown: glow
  • highlight: bat, highlight, or pygmentize
  • torrent: transmission-cli
  • json: python or pq
  • file info: exiftool, mediainfo, or file

So like, to run the pager.sh plugin for example? You literally just type the matching action name, which in this case is gg ๐ŸŒˆ. And if you ever get lost, every single plugin ships a -h/--help switch that gives you a quick usage rundown. iykyk ๐Ÿ’…

Note: the fzfnav plugin uses fzf(1) to navigate your filesystem and BFG (a script that lives in the plugins directory) to show previews โ€” and btw, to display image previews, BFG needs ueberzug(1) or the Kitty protocol via the Kitty terminal ๐Ÿฑ. There's a config file (BFG.cfg, sitting right there in the plugins directory) so you can customize how the previewer behaves. Obsessed. ๐Ÿ’–
Note 2: there's an alternative file previewing function โ€” built-in, and therefore faster than BFG โ€” provided by shotgun. Peep the SHOTGUN section above for the deets. ๐Ÿ‘‘

On top of the built-in BFG previewer, fzfnav also supports both Rangerยดs scope.sh script and pistol(1) ๐ŸŽ€. Wanna use scope? Edit the BFG configuration file and set USE_SCOPE to 1 and SCOPE_FILE to the correct path to the scope.sh file (normally $HOME/.config/ranger/scope.sh). Wanna use pistol instead? Just set USE_PISTOL to 1. That's it, that's the whole vibe โœจ

Go take a look at the Wiki for more info, bestie: https://github.com/clifm/wiki/Advanced#plugins


15. AUTOCOMMANDS ๐Ÿ’…

Okay bestie, this one is a whole vibe and honestly kinda iconic. Autocommands are heavily inspired by Vifm, and they hand you fine-grained control over clifm's settings. The main reason they exist? Performance on remote filesystems (which are usually slower than local ones, no cap) โ€” you can switch off stuff like the file counter that can wreck performance under some circumstances (like remote connections, obviously). But don't let that fool you: the autocommands function is not restricted to this specific use case. Use it for whatever purpose you find useful. Main character energy only.

Note: what we're describing here are permanent autocommands, which need to be defined in the configuration file. Temporary autocommands (set via the command line, valid only for the current directory and the current session) are also available via the auto command. See above. ๐Ÿ‘€

So how do you do it? Add a line preceded by the autocmd keyword to the main configuration file. The general syntax is:

autocmd TARGET cmd,cmd,cmd

TARGET specifies the object to which subsequent commands will apply. It can match either directory names (paths) or workspaces.

  1. To match directory names use a glob pattern (as specified by glob(7)). 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:
    • ~/Downloads โ€” match exactly the Downloads directory (and only this directory) in your home directory
    • ~/Downloads/* โ€” recursively match all subdirectories in ~/Downloads (excluding the Downloads directory itself)
    • /~/Downloads/** โ€” recursively match all subdirectories in ~/Downloads (including the Downloads directory itself)
    • ~/Downloads/*.d โ€” match all subdirectories in ~/Downloads ending with .d (excluding the Downloads directory itself)
    • !~/Downloads โ€” match everything except the ~/Downloads directory
  2. You can match workspaces using the ampersand character (@) followed by the ws keyword and then the workspace number. For example, to match the third workspace: @ws3, or, to match the first workspace, @ws1. To match instead all workspaces except the second one: !@ws2.

TARGET is followed by a comma separated list of commands:

  • !CMD โ€” the exclamation mark allows you to run shell commands, custom binaries or scripts

The following codes are used to control clifm's file list:

  • cs โ€” Color scheme โ€” cs=zenburn
  • fc โ€” File counter โ€” fc=0
  • ft โ€” Files filter โ€” ft=.*\.pdf$
  • fz โ€” Recursive dir sizes โ€” fz=1
  • hf, hh โ€” Hidden files โ€” hf=0
  • lm โ€” Light mode โ€” lm=1
  • lv, ll โ€” Long view โ€” lv=0
  • mf โ€” Max files โ€” mf=100 (1)
  • mn โ€” Max filename length โ€” mn=20 (1)
  • od โ€” Only directories โ€” od=1
  • pg โ€” Pager โ€” pg=0
  • st โ€” Sort method โ€” st=5
  • sr โ€” Reverse sort โ€” sr=1

To remove a value, set the option to an empty value. For example, to remove the files filter and the color scheme: ft=,cs=

(1) This option supports the unset keyword to remove the corresponding limit. E.g., mf=unset,mn=unset


Examples โœจ

  1. Run in light mode and disable the file counter for the remotes directory:(1)
autocmd /media/remotes/** lm=1,fc=0
  1. Just a friendly reminder:
autcomd ~/important !printf "Important: keep your fingers outta here!\n" && read -n1
  1. This directory has thousands of files. Show only the first hundred and enable the pager:
autocmd /usr/bin mf=100,pg=1
  1. Lots of media files (with large filenames). Truncate filenames to 20 chars max and run the files previewer:(2)
autocmd ~/Downloads mn=20,!~/.config/clifm/plugins/fzfnav.sh
  1. I want the second workspace, no matter what the current directory is, to list files in long view:
autocmd @ws2 lv=1
  1. 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

(1) This is the recommended configuration for remote filesystems.

(2) As seen here, plugins can be used as well: in this case, we want to run fzfnav (to make use of the files preview capability) whenever we enter the Downloads directory, usually containing videos, music, and images.

NOTE: If you decide to use a plugin, bear in mind that it will not be able to communicate with clifm, because the autocommand function always executes commands as external applications using the system shell. ๐Ÿซถ

Bear in mind that autocmd directives are evaluated from top to bottom, so that subsequent matching entries will overwrite options set by previous entries. Order matters, bestie. ๐Ÿ’…

Autocommand notifications ๐Ÿ””

By default, a gray A is printed to the left of the prompt whenever an autocommand is active for the current directory.

The behavior of this indicator can be customized via the InformAutocmd option in the configuration file.

The color code used to colorize this indicator is ac (see the COLORS section above).

Autocommand files: .cfm.in and .cfm.out ๐ŸŽ€

To use this feature, you must first set ReadAutocmdFiles to true in the main configuration file. However, bear in mind that autocommand files will never be read if running on an untrusted environment (i.e. if running with --secure-cmds, --secure-env, or --secure-env-full). Safety first, babes. ๐Ÿ›ก๏ธ

Two files are specifically checked by the autocommands function: .cfm.in and .cfm.out (they must be non-empty regular files of at most PATH_MAX (usually 4096) bytes, and no NUL byte must be contained in them).

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 clifm's settings (as described above) are not available here.

If a directory contains a file named .cfm.in, clifm will execute (via the system shell) its content when entering this directory (before listing files). If the file is named rather .cfm.out, its content will be executed immediately after leaving this directory (and before listing the new directory's content).

For example, if you want a simple notification whenever you enter or leave your home directory, create both .cfm.in and .cfm.out files in the home directory with the following content:

For .cfm.in:

printf "Entering %s ..." "$PWD" && read -n1 && clear

For .cfm.out:

printf "Leaving %s ..." "$OLDPWD" && read -n1

16. FILE TAGS ๐Ÿท๏ธ

Etiqueta is clifm's built-in file-tagging system. Slay.

1. How does Etiqueta work? ๐Ÿฆ‹

File tags are created via symlinks using a specific directory under the user's profile:

${XDG_CONFIG_DIR:-/home/USER/.config}/clifm/profiles/USER/tags

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 ~/myfile.txt as work, a symbolic link to ~/myfile.txt, named myfile.txt will be created in tags/work. It's giving organized, it's giving efficient. ๐Ÿ’…

2. Handling file tags ๐ŸŒธ

tag is the main Etiqueta 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 :TAG 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, TAG is used (without the leading colon). For example: tag new docs, to create a new tag named docs, or tag del png, to delete the tag named png.

Both short and long command format can be used:

  • ta / tag add โ€” Tag files
  • td / tag del โ€” Delete tag(s)
  • tl / tag list โ€” List tags or tagged files
  • tm / tag rename โ€” Rename tags
  • tn / tag new โ€” Create new tag(s)
  • tu / tag untag โ€” Untag file(s)
  • ty / tag merge โ€” Merge two tags

3. Usage examples

  • tl / tag list โ€” list every available tag ๐Ÿ’…
  • - / tag list-full โ€” list all the available tags plus every single tagged file ๐Ÿซถ
  • tl work / tag list work โ€” list every file that's tagged as work
  • tl file.txt / tag list file.txt โ€” list the tags applied to the file file.txt
  • tn dogs cats / tag new dogs cats โ€” create two empty tags: dogs and cats
  • ta *.png :images :png / tag add *.png :images :png โ€” tag PNG files as both images and png (1) (2)
  • ta sel :special / tag add sel :special โ€” tag all selected files as special
  • tr documents docs / tag rename documents docs โ€” rename the tag documents as docs
  • ty png images / tag merge png images โ€” merge the tag png into images (3)
  • td images / tag del images โ€” remove the tag images (4)
  • tu :work file1 dir2 / tag untag :work file1 dir2 โ€” untag a few files from work (5)

okay bestie, the lil' footnotes, don't skip them, they're lowkey the whole plot ๐Ÿ‘€

  1. Tags are created if they do not exist
  2. Since add is the default action, it can be omitted: tag *.png :images :png.
  3. All files tagged as png will be now tagged as images, and the png tag will be removed.
  4. Untag all files tagged as images and remove the tag itself
  5. Tab completion is available to complete tagged files. If using the fzf mode, multiple files can be selected using the the TAB key.

4. Operating on tagged files ๐Ÿ”ฅ

The t:TAG expression is used to operate on tagged files via any command, be it internal or external. A few examples:

  • p t:docs โ€” print properties of files tagged as docs
  • r t:images โ€” remove all files tagged as images
  • stat t:docs t:work โ€” run stat(1) over all files tagged as docs and all files tagged as work

4.1 Operating on specific tagged files ๐ŸŽ€

Note: this feature, as always when multi-selection is involved, is only available when tab completion mode is set to fzf. See the TAB COMPLETION section above. โœจ

So like, maybe you don't wanna operate on all the files tagged as some specific tag โ€” say work โ€” but rather on some files tagged as work. Tab completion is the girl for the job, no cap.

Let's suppose you have a tag named work which contains ten tagged files, but you need to operate (say, print the file properties) only on two of them, say, work1.odt and work2.odt:

 p t:work<TAB>

The list of files tagged as work will be displayed via fzf. Now mark the two files you need using the TAB key, press Enter or Right, and the absolute path to both files will be inserted into the command line. So, p t:work will be replaced by p /path/to/work1.odt /path/to/work2.odt. ๐Ÿฆ‹

๐Ÿฆ‹ 17. VIRTUAL DIRECTORIES ๐Ÿฆ‹

okay bestie, this one is SO cool. Clifm can literally read and list files straight from the standard input stream (STDIN). ๐Ÿ’–

Every file in that list has to be an absolute path, terminated with a new line character (\n), and stripped of any extra characters that don't belong to the path itself. Clean it up, babe. The size of the input stream buffer is 262MiB (65536 paths, assuming each path takes PATH_MAX bytes โ€” usually 4096). Big brain capacity, no cap.

Every file you pass via standard input gets stored as a symbolic link pointing to the original file, inside a temporary directory (we call it the virtual directory) with read-only (0500) permissions. And the way this whole directory plus everything in it gets deleted at program exit? iconic. ๐Ÿ’…

Use the --virtual-dir command-line flag to pick a custom directory instead of the default one (and if it doesn't exist, it will be created โ€” she's accommodating like that). The default lives in the system temporary directory, usually /tmp/clifm/USER/vdir.XXXXXX, where XXXXXX is a random six digits string. ๐ŸŽ€

The user can operate on these files as if they were any other regular file, because all operations performed on these symbolic links (as long as the current working directory is the virtual directory where all these files are stored) are performed on the target files and NOT on the symbolic links themselves. Read that twice, bestie, it matters.

Once you're in the virtual directory, files are listed by default using only the base name of the target file. So like, if the target file is /home/user/Downloads/myfile.tar.gz, it shows up as myfile.tar.gz. But if that file already exists in the virtual directory (because there's another target file with the same base name, say /home/user/Documents/tars/myfile.tar.gz), a random six digits suffix gets appended โ€” for instance, myfile.tar.gz.12Rgj6. Problem solved, slay. โœจ

Now, since this listing mode doesn't let the user get a clear idea of the actual location of each listed file, there's a keybinding available (by default Alt+w) to toggle between short (base names only) and long filenames. In the long case, filenames are listed using the absolute path to the target file, with slashes replaced by colons (:). Example: if the target file is /home/user/Downloads/myfile.tar.gz, it'll be listed in the virtual directory as home:user:Downloads:myfile.tar.gz. Obsessed with the consistency. ๐Ÿซถ

If you prefer the long names approach, you can just use the --virtual-dir-full-paths command-line flag. Done and done.

Note: Bear in mind that the restore last path function is disabled when listing in this way. Just so you know, bestie. ๐Ÿ˜ญ

Clifm provides two ways of using virtual directories:

  1. Reading files from the standard input
  2. Listing sets of files via the virtualize.sh plugin (which is in fact a special use case of point 1)

1. Standard input ๐Ÿ’œ

Examples:

 ls -Ad /var/* | clifm

This command will pass all files in the directory /var to clifm. Simple as that.

If you need to perform more specific queries, you can use find(1) as follows:

 find -maxdepth 1 -size +500k -print0 | tr ยด\0ยด ยด\nยด | sed ยดs/.//gยด |
clifm

The above command will pass all files in the current directory bigger than 500KiB to clifm. Filtering queen behavior. ๐Ÿ‘‘

You can also use stream redirection:

 ls -Ad $PWD/* > list.txt
 clifm < list.txt

2. The virtualization plugin ๐Ÿงš

The virtualize.sh plugin, bound by default to the vt action name, is intended to provide an easy way of listing sets or collections of files โ€” like selected, tagged, or bookmarked files. For example, to send all selected files to a virtual directory, you can issue this command:

 vt sel

and, if you want rather files tagged as PDF:

 vt t:PDF

Of course, individual files can also be used:

 vt file1 file2 file3

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 you're done, quit this new instance (via the q command) to return to the primary instance of clifm. Cute little round trip. ๐ŸŒธ

Note: By default, the terminal emulator used is xterm(1), but it can be changed by editing the plugin script (virtualize.sh).

When navigating the filesystem, you can quickly go back to the virtual directory using the -d option: vt -d. The navigation keys (see the KEYBOARD SHORTCUTS section above) and the CLIFM_VIRTUAL_DIR environment variable are also available (Shift+Left/Shift+Right or cd $CLIFM_VIRTUAL_DIR). ๐Ÿ’ซ

Tip: Write an alias to make this even easier:
 alias vtd=ยดcd $CLIFM_VIRTUAL_DIRยด

๐Ÿ”ฅ 18. NOTE ON SPEED ๐Ÿ”ฅ

Clifm is by itself quite fast by default, but if speed is still an issue, it is possible to get some extra performance. Let's go, bestie, we're optimizing. โšก

The two most time consuming features are:

  1. The file counter, used to print the number of files contained by listed directories. Disabling this option produces a nice performance boost.
  2. In normal mode, fstatat(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 light mode was implemented as an alternative listing process omitting all calls to this function (this does not apply, however, to the long view: since we need to display files information, fstatat(3) is required). No skipping that one, sadly. ๐Ÿ˜ญ

When running in light mode, however, a few features are lost:

  1. Only basic file classification is performed, namely, that provided by the d_type field of a dirent struct (see readdir(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 may be facing a filesystem not returning the d_type value, for example, loop devices), clifm will fall back to stat(3) to get basic files classification. She always has a backup plan. ๐Ÿ’…
  2. Color per file extension is disabled for performance reasons.
  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 fstatat(3). So like, no marker without it. ๐Ÿ’€

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 number of files printed for each visited directory (see the mf command above). ๐ŸŒˆ

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. Upgrade your setup, bestie, your eyes and your CPU will thank you. โœจ

If using Xterm, a nice speed boost is provided by the fast scroll option: set fastScroll to true in your ~/.Xresources file. See xterm(1). ๐ŸŽ€

๐Ÿฆ˜ 19. KANGAROO FRECENCY ALGORITHM ๐Ÿฆ˜

Okay bestie, this is the part where the directory jumper literally learns you. The whole thing is designed to pick up on your navigation habits, and it stores all that tea in a database (peep the FILES section below ๐Ÿ‘€) which it uses to serve you the best match for whatever string you throw at it. So yeah, Kangaroo is basically a quick, smart, evolved cd function โ€” main character energy fr fr.


๐ŸŽ€ What gets stored in the database

Everything is tracked per directory, and here's the full breakdown:

  • a) Permanent entry ('+') โ€” this directory will not 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 absolute path to each visited directory

With all of that, it can build a ranking of directories and hand you the most accurate matches for each query string. The matching algorithm cares about mainly two things: frequency and recency โ€” which is literally why this kind of algorithm is called a frecency algorithm. ๐Ÿ’…


โœจ The ranking math (yes there's math)

Once it gets an initial list of matches from the query string(s) you typed, the frequency algorithm gets applied to every entry in that list. It's pretty simple, no cap:

(visits * VISIT-CREDIT) / days-since-first-visit

That gives you the average number of visits per day since the first visit โ€” what we call the directory rank. ๐ŸŒˆ

Note: VISIT-CREDIT is a hardcoded value: 200.

๐Ÿ”ฅ Bonus points, because of course

There are some further steps in the ranking process: Bonus points. Extra credits or penalties get assigned based on each directory's last access time, according to these simple algorithms:

  • Within last hour: rank * 4
  • Within last day: rank * 2
  • Within last week: rank / 2
  • More than a week: rank / 4

If the last query string matches the basename of a directory, that entry gets 300 extra credits. Why? Because users normally use directory basenames as query strings โ€” they're just easier to remember, bestie. ๐Ÿง โœจ

Same energy for the rest:

  • Pinned directories โ†’ 1000 extra credits
  • Bookmarked directories โ†’ 500 credits
  • Directories active in a workspace โ†’ 300 credits
  • Directories marked as permanent โ†’ 300 credits

๐Ÿ“ The example (this one's iconic)

Say your query string is "test" โ€” then /media/data/test will be matched. Now, if that directory was accessed within the last hour, and its rank was 200, it becomes 800. But because the search string matches its basename, it grabs 300 extra credits, and if this directory is also bookmarked, pinned, and marked as permanent, it gets 1800 extra credits. So the total rank of this directory in the matching process is 2900. ๐Ÿ‘‘

Doing it this way means we have way more chances of matching what the user actually wanted to match.

Once all the entries in that initial list of matches have been filtered through 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. Periodt.


๐Ÿ’œ Automatic maintenance

The database keeps itself cute with a few simple procedures:

  • a) If PurgeJumpDB is set to true (see the main configuration file), each entry in the database is checked at startup to remove non-existent directories. This option is set to false by default, to avoid removing paths pointing to unmounted filesystems (like removable devices or remote locations) which you still might want to keep. Non-existent directories, however, will be removed sooner or later anyway due to their low rank value (see below).
  • b) Once the rank of a directory falls below MinJumpRank (by default 10), it is forgotten and deleted from the database. The MinJumpRank 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 MaxJumpTotalRank (by default 100000), each individual rank is divided by a dynamic factor so that the total rank becomes less than or equal to MaxJumpTotalRank. If some rank falls in the process below MinJumpRank (and provided this latter is not 0), it is removed from the database. MaxJumpTotalRank can be modified in the configuration file. The higher the value of MaxJumpTotalRank, the more time directories will be kept in the database.
Note: Directories visited in the last 24 hours โ€” just like 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 je or j --edit, and prepend a plus sign (+) to the corresponding entry).

๐ŸŒธ Where frecency came from

The idea of 'frecency' was, as far as I know, first devised and designed by Mozilla. See

https://wiki.mozilla.org/User:Mconnor/Past/PlacesFrecency

However, it is also implemented, though using different algorithms, by different projects like autojump, z.lua, and zoxide. Iykyk. ๐Ÿฆ‹

โœจ 20. ENVIRONMENT โœจ

okay bestie, this is the part where clifm reads the vibes of your shell before it even says hi ๐Ÿ’– these are the env vars it peeks at at initialization time:

  • NO_COLOR โ€” set this to literally anything and clifm runs with no colors. bye bye rainbows ๐Ÿ˜ญ
  • CLIFM_NO_COLOR โ€” same energy as NO_COLOR, but it's clifm's own special version.
  • CLICOLOR_FORCE โ€” forces colors to show up even when your terminal swears it can't do color support. gaslighting the terminal, iconic.
  • CLIFM_FORCE_COLOR โ€” same as CLICOLOR_FORCE, except you can also hand it a specific color value: 8, 16, 256, truecolor, or 24bit.
  • CLIFM_FILE_COLORS โ€” a colon separated list of file type color codes, in the exact same form described up in the COLOR CODES section.
  • CLIFM_EXT_COLORS โ€” same as above, but for file extensions.
  • CLIFM_IFACE_COLORS โ€” same as above, but for the different elements of clifm's interface.
  • CLIFM_DATE_SHADES โ€” a comma separated list of colors used to print timestamps based on age. cute little time-based gradient โœจ
  • CLIFM_SIZE_SHADES โ€” same as CLIFM_DATE_SHADES, but for file sizes instead.
  • CLIFM_PREVIEW_MAX_SIZE โ€” if you're running with --preview, or PreviewMaxSize isn't set in the config file, then no preview gets generated for files bigger than this value. The value has to be in KiB: so like, 2048 reads as 2 MiB, bestie. don't get it twisted ๐Ÿ™ˆ
  • CLIFM_TEMPLATES_DIR โ€” your custom file templates directory.
  • CLIFM_HISTFILE โ€” your custom commands history file.
  • CLIFM_FILTER โ€” defines a file filter. If you set it, this variable overrides the Filter option in the config file. she said I'm the boss now ๐Ÿ’…
  • CLIFM_SUDO_CMD โ€” the name of the authenticator program. Used by the X command (to launch a new clifm instance as root), by the Alt+v keybinding (to prepend the authenticator program name to the current command line), and for some operations on archives (ISO files). Defaults to sudo (or doas if compiled on OpenBSD). Example:
CLIFM_SUDO_CMD=doas clifm
  • SHELL โ€” an absolute path to the shell clifm uses to run external commands. Only values found in /etc/shells are allowed. rules are rules ๐Ÿซถ
  • CLIFM_SHELL โ€” same as SHELL, but clifm-specific (and it takes precedence over SHELL).
  • TMPDIR โ€” path to a directory where temporary files get created.
  • CLIFM_TMPDIR โ€” same as TMPDIR, but clifm-specific (takes precedence over TMPDIR).
  • TERM โ€” the terminal type that output is prepared for.
  • FZF_DEFAULT_OPTS โ€” a quoted list of options passed to fzf (if you're using it for tab completion).
  • TIME_STYLE โ€” if it's set from neither --time-style nor TimeStyle (in the config file), use this time style for the long view.
  • CLIFM_TIME_STYLE โ€” same as TIME_STYLE, but clifm-specific (takes precedence over TIME_STYLE).
  • PTIME_STYLE โ€” if it's set from neither --ptime-style nor PTimeStyle (in the config file), use this time style for the p/pp command and the --stat/--stat-full command-line switches.
  • CLIFM_COLUMNS โ€” the number of terminal columns.
  • CLIFM_LINES โ€” the number of terminal lines.
  • CLIFM_MIMETYPES_FILE โ€” set a custom mime.types file (instead of the default, ~/.config/clifm/mime.types or ~/.mime.types). Go check the FILE OPENER section for more info.

Except when running in stealth mode, clifm sets these environment variables for you:

  • CLIFM โ€” path to the configuration directory. Other programs can peek at this variable to figure out whether they were spawned by clifm. You can also use it to yeet yourself straight to the config dir: cd $CLIFM or just $CLIFM. main character shortcut energy ๐Ÿ‘‘
  • CLIFMRC โ€” path to the main configuration file (by default ~/.config/clifm/profiles/default/clifmrc).
  • CLIFM_PID โ€” the PID number of clifm's running instance.
  • CLIFM_VERSION โ€” the version number of clifm's running instance.
  • CLIFM_VIRTUAL_DIR โ€” path to the currently used virtual directory, but only if (and while) the virtual directory function is executed. See the VIRTUAL DIRECTORIES section above.
  • SHLVL โ€” incremented by one every time a new shell is started.
  • CLIFMLVL โ€” same as SHLVL, but clifm-specific.

And if Notifications is set to false for the current prompt, these get exported to the environment so your custom prompt can use them if it wants ๐ŸŽ€:

  • CLIFM_STAT_SEL โ€” current number of selected files.
  • CLIFM_STAT_TRASH โ€” current number of trashed files.
  • CLIFM_STAT_AUTOCMD โ€” set to 1 if there's an autocommand for the current directory. Otherwise it's 0.
  • CLIFM_STAT_ERROR_MSGS โ€” current number of error messages.
  • CLIFM_STAT_WARNING_MSGS โ€” current number of warning messages.
  • CLIFM_STAT_NOTICE_MSGS โ€” current number of notice messages.
  • CLIFM_STAT_WS โ€” current workspace number.
  • CLIFM_STAT_EXIT โ€” exit code of the last executed command.
  • CLIFM_STAT_ROOT โ€” 1 if the user is root (UID = 0), 0 otherwise.
  • CLIFM_STAT_STEALTH โ€” 1 if running in stealth mode, 0 otherwise.

When you run a plugin, these variables get set (and then immediately unset right after the plugin finishes executing, so don't get attached ๐Ÿ’€):

  • CLIFM_BUS โ€” the path to a pipe that plugins can use to talk to clifm. See the PLUGINS section for more.
  • CLIFM_COLOR_SCHEME โ€” set to the name of the current color scheme.
  • CLIFM_COLORLESS โ€” set to 1 if running without colors. Unset otherwise.
  • CLIFM_CUR_WS โ€” set to the current workspace number.
  • CLIFM_DIRS_FIRST โ€” set to 1 if list-dirs-first is enabled. Unset otherwise.
  • CLIFM_FILE_COUNTER โ€” set to 1 if files-counter is enabled. Unset otherwise.
  • CLIFM_FILE_FILTER โ€” set to the file filter string. Unset if no file filter is set.
  • CLIFM_FILTER_REVERSE โ€” set to 1 if filter-reverse is set. Unset otherwise (or if no file filter is set).
  • CLIFM_FOLLOW_LINKS โ€” set to 1 if follow-symbolic-links is enabled. Unset otherwise.
  • CLIFM_LIGHT_MODE โ€” set to 1 if light-mode is enabled. Unset otherwise.
  • CLIFM_LINE โ€” when you run a plugin via a keybinding, this holds the content of the current line buffer. For a usage example, go look at the xclip.sh plugin ๐Ÿ‘€
  • CLIFM_LONG_VIEW โ€” set to 1 if long-view is enabled. Unset otherwise.
  • CLIFM_MAX_FILES โ€” set to MAX_FILES if max-files is set. Unset otherwise.
  • CLIFM_ONLY_DIRS โ€” set to 1 if only-dirs is enabled. Unset otherwise.
  • CLIFM_PLUGINS_HELPER โ€” set to the absolute path to the plugins-helper script used by several plugins.
  • CLIFM_PROFILE โ€” set to the name of the current profile.
  • CLIFM_SEL_FILES โ€” set to the number of currently selected files (unset if there are no selected files).
  • CLIFM_SELFILE โ€” set to the path to the current selection file.
  • CLIFM_SHOW_HIDDEN โ€” set to 1-3 (true, first, and last respectively) if show-hidden is enabled. Unset otherwise.
  • CLIFM_SORT_REVERSE โ€” set to 1 if sort-reverse is enabled. Unset otherwise.
  • CLIFM_SORT_STYLE โ€” set to the current sort method.
  • CLIFM_TRASH_FILES โ€” set to the number of currently trashed files (unset if there are no trashed files).
  • CLIFM_TRUNCATE_NAMES โ€” set to 1 if truncate-names is enabled. Unset otherwise.

๐ŸŽ€ 21. SECURITY ๐ŸŽ€

okay bestie, listen up because this one actually matters ๐Ÿ’… clifm runs OS commands, so it has to have a way to run them securely, especially when you're in an untrusted environment. Two features handle this: secure environment and secure commands. No cap. ๐Ÿ›ก๏ธ

Both of these exist to protect the program and the system itself from malicious input โ€” either from environment variables, or from indirect input, aka input that doesn't come from the command line (where we just assume it's you, the user, typing the command) but from files. Which files, you ask? We're talking default associated applications (the mime command), autocommands, aliases, plugins, (un)mount commands (via the net command), and also profile and prompt commands. yeah. all of those. ๐Ÿซถ

So in an untrusted environment, an attacker could make stuff behave unexpectedly and insecurely (even do command injection) using environment variables, or inject malicious commands through that indirect input โ€” commands that clifm would then run later without your consent (i.e. automatically ๐Ÿ˜ญ). That's exactly why this mechanism exists: if you're running in an untrusted environment, secure environment and secure commands are there to prevent (at least as much as possible) this kind of attack. periodt.


๐Ÿ’– A) Secure environment ๐Ÿ’–

Programs inherit the environment from their parent process. But if that inherited environment is not trusted, not secure, it's always a good idea to sanitize it using only sane values โ€” that way you block undesired, uncontrolled input that might put the program (and the system) in danger. โœจ

The secure-environment function forces clifm to run on exactly that kind of sanitized environment.

There are two secure-environment modes: the regular one and the full one. For regular mode, launch clifm with the --secure-env command-line option. Otherwise, turn on full mode with --secure-env-full.

๐ŸŒธ a) Regular ๐ŸŒธ

In this mode, the inherited environment is cleared, though a few variables are preserved to keep clifm running as stable as possible. The preserved ones are: TERM, DISPLAY, LANG, TZ, and โ€” if fzf tab completion mode is enabled โ€” FZF_DEFAULT_OPTS.

The following variables are set in an environment agnostic way (aka securely, bestie ๐Ÿ”):

  • HOME, SHELL, and USER are retrieved using getpwuid(3)
  • PATH is set consulting _PATH_STDPATH (or _CS_PATH if the former is not available)
  • IFS is set to a sane, hard-coded value: " \n\t" (space, new line char, and horizontal TAB)

And as a lil bonus โœจ:

  1. core dumps are disabled
  2. the umask value is set to 0077 at startup, and the creation mode (when using the new command) is forced to 0700 for directories and 0600 for files
  3. non-standard file descriptors (>2) are closed
  4. SUID/SGID privileges, if any, are dropped
  5. autocommand files are not read at all (even if ReadAutocmdFiles is set to true)

๐Ÿฆ‹ b) Full ๐Ÿฆ‹

Full mode is just like regular mode, except nothing is imported from the environment at all, and only PATH, HOME, USER, SHELL, and IFS are set (as described above ๐Ÿ‘†). Everything else stays unset, and it's your responsibility to set environment variables (via the export function) as needed. In this case you might wanna set at least TERM, and โ€” if you're running in a graphical environment โ€” DISPLAY.

โš ๏ธ heads up: enabling secure-environment might break some functions, depending on your system configuration. ๐Ÿ’€

๐Ÿ‘‘ B) Secure commands ๐Ÿ‘‘

Some commands get executed by clifm automatically: (un)mount commands (via the net command), opening applications (via Lira), aliases, and plugins, plus prompt, profile, and autocommands. These commands are read from a configuration file and then executed. Nowโ€ฆ if an attacker has access to any of those files, she might force clifm to run any arbitrary command, and thereby possibly expose the whole entire system. ๐Ÿ™ˆ

So every time a command is automatically executed via the system shell (i.e. without your direct consent), the secure commands function does four different, though intrinsically related tasks, all aimed at mitigating command injection and/or unexpected behavior:

๐Ÿงš a) Plugins are disabled.

That's it. That's the item. Plugins: off. ๐Ÿ’…

โญ b) Only command base names are allowed

nano, for instance, is allowed โ€” but /usr/bin/nano is not. This way we guarantee that only commands found in a sanitized PATH (see point d below) will be executed. It's done to prevent the execution of custom binaries/scripts, like for example: /tmp/exec_file.

๐ŸŒˆ c) Commands are validated using a whitelist 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 varies slightly depending on the command being executed (because they use different syntaxes):

  • Net command: a-zA-Z -_.,/=
  • Prompt, profile, autocommands: a-zA-Z -_.,/"'
  • Mime command: a-zA-Z -_.,%&

Commands containing at least one 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).

๐Ÿ’œ d) A secure environment is set

--secure-env is implied here. To run on a fully sanitized environment, run it like this: --secure-cmds --secure-env-full.


โœจ 22. MISCELLANEOUS NOTES โœจ

๐Ÿ”ฅ Sequential and conditional execution of commands ๐Ÿ”ฅ

For each of the internal commands (see the COMMANDS section above ๐Ÿ‘€) you can use the semicolon to execute them sequentially and/or the double ampersand to execute them conditionally. For example: cmd1; cmd2 && cmd3.

Though you can use external commands here as well, bear in mind that whenever at least one internal command is involved in a chained list of commands, clifm will take care of executing this list (simply because the system shell is not 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 โ€” just in isolation from the remaining commands in that list.

โš ๏ธ as a rule of thumb: when using chained commands, always expand ELNs to avoid undesired consequences. If, for instance, you issue this command: touch aaa && r 3, you will end up deleting a file you were not intending to delete โ€” simply because after the successful execution of the first command, the ELN 3 now corresponds to a different file. ๐Ÿ˜ญ

๐Ÿ’€ External commands ๐Ÿ’€

clifm is not limited to its own set of internal commands, like open, sel, trash, etc. It can run external commands too โ€” provided external commands are allowed (see the -x option, the ext command, and the ExternalCommands option in the configuration file).

External commands are executed using the system shell (say, /bin/sh), which clifm specifies like this:

  1. If the CLIFM_SHELL environment variable is set, this value is used.
  2. If the SHELL environment variable is set, this value is used.
  3. If none of the above, the value is taken from the passwd database (via getpwuid(3)).

The shell is invoked as follows: SHELL -c 'CMD ARG...', for example, /bin/sh -c 'ls -l'.

By beginning the external command with a colon or a semicolon (':', ';') you tell clifm not to parse the input string, but instead to let the system shell handle that task. ๐Ÿซถ

๐Ÿซง bear in mind that clifm is not intended to be used as a shell, but as the file manager it is. iykyk.

๐ŸŽ€ Terminal emulators and non-ASCII characters ๐ŸŽ€

It depends on the terminal emulator you use whether non-ASCII characters and characters from the extended ASCII charset display correctly. 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.

๐ŸŒธ Spaces and filenames ๐ŸŒธ

When dealing with filenames 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).

๐Ÿฆ‹ Default profile ๐Ÿฆ‹

clifm's default profile is default. To create alternative profiles, use the -P command-line option or the pf add command (see above).

๐Ÿ“ 23. FILES ๐Ÿ’พ


๐Ÿ—‚๏ธ CONFIGURATION FILE

Okay bestie, so the main config file gets hunted down in this exact order, no skipping:

  1. the -c,--config-file switch
  2. the $CLIFMRC variable
  3. the $XDG_CONFIG_HOME/clifm/profiles/PROFILE/clifmrc directory

If $XDG_CONFIG_HOME isn't set, then $HOME/.config gets used instead. And if you're running with secure-environment (so that's either --secure-cmds, --secure-env, or --secure-env-full) then no environment variable is read at all, so the home directory comes from the password database instead (via getpwuid(3)). ๐Ÿ’…

PROFILE is default by default โ€” unless you set it with -P/--profile.

You can reach the config file either with the config command or by pressing F10. โœจ

And every option in the config file has a lil description right there inside the config file itself. Self-documenting queen. ๐Ÿ‘‘


๐Ÿฆ‹ PROFILE FILE

The profile file lives at $XDG_CONFIG_HOME/clifm/profiles/PROFILE/profile.clifm. In here you can drop the commands you want run at startup. You can also permanently set custom variables here, like dir="/path/to/dir". That variable can then act as a shortcut to that directory, for instance: cd $dir. ๐ŸŽ€

Custom variables can also be defined temporarily right at the command prompt: e.g., user@hostname ~ $ var="This is a test". Temporary variables get yeeted at program exit, fr. And heads up: internal variables are disabled by default โ€” turn them on with the --int-vars command-line switch.


๐ŸŒธ PROMPTS FILE

This file holds your prompt definitions and it's chillin' at DATADIR/clifm/prompts.clifm. It gets copied automatically to $XDG_CONFIG_HOME/clifm/prompts.clifm if it doesn't already exist. The Prompt line in the color scheme file should point to one of the prompt names defined in this file. More deets in the PROMPT section. ๐Ÿ’–


โŒจ๏ธ KEYBINDINGS FILE

The keybindings file is $XDG_CONFIG_HOME/clifm/keybindings,cfm. It gets copied from DATADIR/clifm (usually /usr/share/clifm), and if it's not found, it gets created fresh with default values. This file is where you specify the keyboard shortcuts for some of ClifM's functions. The format for each keybinding is always "keyseq:function", where keyseq is an escape sequence in GNU emacs style. There's a more detailed explanation inside the keybindings file itself. ๐Ÿซถ


๐Ÿงฉ PLUGINS DIRECTORY

The directory where programs or scripts pointed to by actions live (in other words, plugins, bestie) is DATADIR/clifm/plugins (usually /usr/share/clifm/plugins). Wanna edit these plugins? Copy them to $XDG_CONFIG_HOME/clifm/plugins and edit away to your heart's content. Plugins in this local directory take precedence over the ones in the system one. ๐Ÿ’…


๐ŸŒˆ COLORS DIRECTORY

This directory, $DATADIR/clifm/colors, is packed with available color schemes (or just themes, we're chill like that) as files with a .clifm extension. You can copy these themes to the local colors directory ($XDG_CONFIG_HOME/clifm/colors) and edit them however you like โ€” or build brand new themes from the ground up, main character energy. โœจ

Themes in the local colors directory take precedence over those in the system directory. And you can make as many themes as you want just by dropping them into the local colors directory. The default color scheme file (default.clifm) works as your guide. ๐ŸŒŸ


โšก ACTIONS FILE

The file used to define custom actions is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/actions.clifm. It gets copied from DATADIR/clifm (usually /usr/share/clifm), and if it's not found, it gets created anew with default values. ๐ŸŽ€


๐Ÿ“‹ MIMELIST FILE

The mimelist file is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/mimelist.clifm. It's a list of file types and name/extensions plus their associated applications, used by lira. It gets copied from DATADIR/clifm (usually /usr/share/clifm). ๐Ÿ’œ


๐Ÿ‘€ PREVIEW FILE

The preview file is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/preview.clifm and it's shotgun's configuration file. It uses the exact same syntax as the mimelist file. It gets copied from DATADIR/clifm (usually /usr/share/clifm). ๐Ÿ”ฅ


๐Ÿ”– BOOKMARKS FILE

The bookmarks file is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/bookmarks.clifm. Just the list of the user's bookmarks, used by the bookmarks function. Simple as that. โญ


๐Ÿ•ฐ๏ธ HISTORY FILE

The history file is ~/.config/clifm/profiles/PROFILE/history.clifm. A list of commands entered by the user, used by the history function. ๐Ÿ˜Œ


๐Ÿ“ COMMANDS LOG FILE

The commands log file is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/cmdlogs.clifm. Command logs keep track of the commands you enter on the command line. These logs look like this: "[date] current_working_directory:command". ๐Ÿ“


๐Ÿ’ฌ MESSAGES LOG FILE

The messages log file is $XDG_CONFIG_HOME/clifm/profiles/PROFILE/msglogs.clifm. Message logs are a record of errors and warnings, and they look like this: "[date] message". ๐Ÿ’€


๐Ÿฆ˜ KANGAROO DATABASE

The directory jumper database is stored in $XDG_CONFIG_HOME/clifm/profiles/PROFILE/jump.clifm. ๐Ÿฆ˜โœจ

Note: If $XDG_CONFIG_HOME is not set, $HOME/.config/ is used instead.

โœจ 24. EXAMPLES โœจ

Note 1: Always try TAB. Tab completion is available for so many things, bestie, use it. ๐Ÿ™ˆ

Note 2: Suggestions for possible completions are printed next to the text you've typed so far. To accept the given suggestion, press Right (or Alt+f to accept only the first/next suggested word). Otherwise, the suggestion is just ignored. ๐ŸŽ€

Get help: F1: manpage F2: keybindings F3: commands


๐Ÿงญ 1. NAVIGATION

the cheat sheet โœจ โ€” type the thing on the left, get the thing on the right, periodt:

  • /etc โ€” change directory to /etc (1)
  • 5 โ€” change to the directory whose ELN is 5 (2)
  • j <TAB> (also dh <TAB>) โ€” navigate through visited directories ๐Ÿฆ‹
  • j xproj โ€” jump to ~/media/data/docs/work/mike/xproject (3)
  • b (Shift+Left, Alt+j) โ€” go back in the directory history list
  • f (Shift+Right, Alt+k) โ€” go forth in the directory history list
  • .. (Shift+Up, Alt+u) โ€” change to the parent directory
  • ... โ€” change to the parent directory of the current parent directory (4)
  • bd w โ€” change to the parent directory matching "w" (5)
  • ws2 (Alt+2) โ€” switch to the second workspace (6)
  • /*.pdf<TAB> โ€” list PDF files (current dir)
  • =x<TAB> โ€” list executable files (current dir) (7)
  • @gzip<TAB> โ€” list files (current dir) whose MIME type includes "gzip"
  • pin mydir โ€” pin the directory named mydir
  • , โ€” change to pinned directory ๐Ÿ“Œ
  • view (Alt+-) โ€” preview files (current dir) (8)
  • pg (Alt+0) โ€” run MAS, the file pager, on the current directory

(1) cd /etc also works, bestie ๐Ÿ’…

(2) press TAB to make sure 5 is the file you actually want, or just pay attention to the suggestion. Press Right to accept the given suggestion.

(3) this depends on the database ranking, so it's giving โœจvibesโœจ. For more accuracy: j mike xproj. Tab completion is available too: j xproj<TAB>

(4) this is the fastback function: each subsequent dot after the two first dots is understood as an extra "/.."

(5) type bd <TAB> to list all parent directories

(6) Alt+[1-4] is available for workspaces 1-4

(7) type =<TAB> to get the list of available file type characters. Consult the FILE FILTERS section above for more information

(8) this feature depends on fzf(1)


๐Ÿ—‚๏ธ 2. FILE OPERATIONS ๐Ÿ—‚๏ธ

  • myfile.txt โ€” open myfile.txt with whatever app it's associated with by default ๐Ÿ’…
  • myfile.txt vi โ€” open myfile.txt using vi(1) โœจ
  • 24& โ€” open the file whose ELN is 24, but in the background (the & is doing the heavy lifting bestie)
  • n myfile mydir/ โ€” create a new file called myfile and a new directory called mydir (2)(3) ๐ŸŽ€
  • p4 โ€” print the properties of the file whose ELN is 4
  • pc myfile.txt โ€” edit the permission set of myfile.txt (and if you wanna mess with ownership instead, that's oc's job) ๐Ÿ”
  • s *.c โ€” select every .c file chillin' in the current directory
  • s /media/*<TAB> โ€” interactively select files inside the directory /media (4) ๐Ÿฆ‹
  • s 1-4 8 19-26 โ€” select a whole bunch of files in the current directory by ELN, ranges and all
  • sb (sel<TAB> or s:<TAB>) โ€” list out the selected files (5) ๐Ÿ‘€
  • ds (ds <TAB>) โ€” selectively deselect files through a menu, no cap
  • bm add mydir/ mybm โ€” bookmark the directory mydir/ under the name mybm ๐Ÿ’–
  • bm mybm (b:mybm) โ€” jump to the bookmark named mybm (6)
  • bm del mybm โ€” yeet the bookmark named mybm out of existence
  • bm (Alt+b or b:<TAB>) โ€” open the bookmark manager, periodt
  • t 1-3 *.old โ€” trash a few files at once ๐Ÿ—‘๏ธ
  • u (u <TAB>) โ€” selectively restore trashed files using a menu, giving them their main character moment back
  • t del (t del <TAB>) โ€” selectively remove files from the trash can using a menu
  • t empty โ€” empty the trash can entirely ๐Ÿ’€
  • ta *.pdf :mypdfs โ€” tag every PDF in the current directory as mypdfs ๐Ÿท๏ธ
  • p t:mypdfs โ€” print the file properties of all the files tagged mypdfs
  • /*.pdf โ€” search for all PDF files in the current directory ๐Ÿ”
  • c sel โ€” copy the selected files into the current directory
  • c *.txt 2 โ€” copy all txt files to the directory whose ELN is 2
  • r sel โ€” remove all the selected files (7) ๐Ÿ˜ญ
  • m4 โ€” rename the file whose ELN is 4 (8) โœ๏ธ

Okay so, the little footnotes from that table, bestie โ€” they matter, don't skip them ๐Ÿ’…

  1. Use the ow command to select the opening application from a menu: ow myfile.txt or ow myfile.txt <TAB>
  2. Note the ending slash in the directory name
  3. Since clifm is integrated to the system shell, you can also use any of the shell commands you usually use to create new files. E.g., touch myfile or nano myfile
  4. Only for non-standard tab completion: fzf, fnf, smenu
  5. You can also TAB expand the sel keyword: p sel<TAB> to list selected files (and optionally mark multiple selected files to operate on)
  6. Type bm <TAB> to get the list of available bookmark names
  7. To remove files in bulk use the rr command
  8. To rename files in bulk use the br command

๐ŸŒˆ 3. MISC ๐ŸŒˆ

  • hh (Alt+.) โ€” toggle hidden files ๐Ÿ™ˆ
  • ll (Alt+l) โ€” toggle long-view
  • rf (Enter -on empty line- or Ctrl+l) โ€” clear/refresh the screen
  • Alt+, โ€” toggle list-directories-only
  • Alt+Tab, Ctrl+Alt+i โ€” toggle disk usage analyzer mode
  • !<TAB> โ€” navigate through the command history
  • config (F10) โ€” view/edit the main configuration file
  • pf set test โ€” change to profile test
  • actions โ€” list available actions/plugins
  • icons on โ€” want icons? ๐ŸŽ€
  • cs (cs <TAB>) โ€” list available color schemes
  • prompt (prompt <TAB>) โ€” list available prompts
  • q โ€” Iยดm tired, quit ๐Ÿ˜ญ

There is a lot more you can do, but this should be enough to get started. no cap, you're literally already a clifm girlie now ๐Ÿ’–


โœจ EXIT STATUS โœจ

Clifm returns the exit status of the last executed command. periodt โ€” that's the whole vibe check.


๐Ÿ’– LICENSE ๐Ÿ’–

This program is distributed under the terms of the GNU GPL version 2 or later <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. like, none, bestie, it's giving "you break it, you bought it" energy ๐Ÿ’€


๐Ÿ› BUG AND FEATURE REQUESTS ๐Ÿ›

Report at <https://github.com/leo-arch/clifm/issues> โ€” the devs genuinely want to hear it, so spill ๐Ÿซถ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

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

For additional contributors, run git shortlog -s on the clifm.git repository. the whole squad, honored โœจ


And that's the whole page, bestie!! ๐ŸŽ‰ clifm 1.28, dated May 28, 2026, living its best life as CLIFM(1). Now go open a terminal and slay ๐Ÿ’…๐Ÿฆ‹๐ŸŒธ

๐Ÿ“ฆ where this page comes from