CFM(1)

NAME
cfm - cactus file manager

SYNOPSIS
cfm [DIR]

DESCRIPTION
cfm is a simple, clean, fast TUI file manager.

OPTIONS

DIR Directory to open cfm in, or the working directory if not specified.

CONFIGURATION
Copy config.def.h to config.h and modify as needed to configure at build-time. By default, cfm will attempt to read the EDITOR, SHELL, and OPENER environment variables. If it is preferable for cfm to use a different value for any of these, it can be specified by prepending CFM_ to any of the variables. cfm will also check for the CFM_TMP environment variable for a location for its temp directory. If the variable is not set and CFM_TMP was not set in config.h, it will attempt to use /tmp/cfmtmp. If the temporary directory cannot be created, then cfm will disable cut/paste and deletions will be permanent (no undo). If the CD_ON_CLOSE option is not enabled at compile-time (default off), cfm will also check for the presence of the CFM_CD_ON_CLOSE environment variable, which should contain the path to a file into which it can save its current working directory when quit with Q.

USAGE
Note: arrow keys work the same as hjkl.

j k Move up/down

PgUp PgDn
    Move up/down by one full screen

h l Move left/right

gg  Move to top

G   Move to bottom

~   Move to user home directory

/   Move to system root directory

l   Open file using EDITOR, or change into directory

o   Open file or directory with OPENER

RET Works like o if ENTER_OPENS is enabled, else works like l

.   Toggles visibility of dotfiles

e   Open file or directory in EDITOR

r   Reload directory

S   Spawn a shell (defined by SHELL) in a directory

T   Create a new file, opening EDITOR to enter a filename

M   Create a new directory, opening EDITOR to enter a directory name

R   Rename a file by opening EDITOR to edit the filename Note: for T, M, and R, the allowed characters default to POSIX "fully portable filename" standards with the addition of spaces: [A-Za-z0-9 ._-]. Spaces can be disabled by setting ALLOW_SPACES to 0 in config.h.

dd  Delete current selection (does not touch marked files). This will copy the file/directory into the CFM_TMP directory and can be undone with u. If the CFM_TMP directory does not exist, deletions will be permanent.

alt+dd
    Permanently delete current selection (does not touch marked files) without backing up for undo like dd does. This is useful for large directories where a copy will take a long time.

m Space
    Toggle mark for deletion

D   Delete all marked files (does not touch unmarked files)

u   Undo the last deletion operation (does not work if cfm was unable to create or access its trash directory, in which case deletion is permanent)

X   Cut the selected file or directory (can be pasted again with p). Not available if the tmp directory is not available.

yy  Copy the selected file or directory (can be pasted again with p)

p   Paste the previously cut or copied file or directory; shared between all views

TAB Switches to the next view

`   Switches to the previous view

1-0 Switches to view N, up to the number specified by VIEW_COUNT (2 by default)

q ESC
    Quit cfm

Q   Quit cfm, saving its working directory to the file specified in CD_ON_CLOSE, if enabled, or the CFM_CD_ON_CLOSE environment variable if not.

SCRIPTING
If stdin or stdout are not attached to a TTY, cfm will read commands from stdin and quit at EOF, skipping all drawing. Any errors are fatal and will be printed to stderr. Note that in non-interactive mode, cfm will NOT backup files when deleting. All deletions will be permanent.

AUTHOR
Will Eccles <will@eccles.dev>. For more information, see https://github.com/willeccles/cfm.