This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
cfm.1
257 lines (257 loc) · 4.11 KB
/
cfm.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
.TH CFM 1 "2022 April 28"
.
.SH NAME
cfm \- cactus file manager
.
.SH SYNOPSIS
.B cfm
.RI [ DIR ]
.
.SH DESCRIPTION
.B cfm
is a simple, clean, fast TUI file manager.
.
.SH OPTIONS
.TP
.I DIR
Directory to open
.B cfm
in, or the working directory if not specified.
.
.SH CONFIGURATION
Copy
.I config.def.h
to
.I config.h
and modify as needed to configure at build-time.
By default,
.B cfm
will attempt to read the
.BR EDITOR , SHELL ", and " OPENER
environment variables.
If it is preferable for
.B cfm
to use a different value for any of these, it can be specified by prepending
.B CFM_
to any of the variables.
.B cfm
will also check for the
.B CFM_TMP
environment variable for a location for its temp directory.
If the variable is not set and
.B CFM_TMP
was not set in
.IR config.h ,
it will attempt to use
.IR /tmp/cfmtmp .
If the temporary directory cannot be created, then
.B cfm
will disable cut/paste and deletions will be permanent (no undo).
If the
.B CD_ON_CLOSE
option is not enabled at compile-time (default off),
.B cfm
will also check for the presence of the
.B 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
.BR Q .
.
.SH USAGE
Note: Arrow keys work the same as hjkl.
.TP
.B j k
Move up/down.
.
.TP
.B PgUp PgDn
Move up/down by one full screen.
.
.TP
.B h l
Move left/right.
.
.TP
.B gg
Move to top.
.
.TP
.B G
Move to bottom.
.
.TP
.B ~
Move to user home directory.
.
.TP
.B /
Move to system root directory.
.
.TP
.B l
Open file using
.BR EDITOR ,
or change into directory.
.
.TP
.B o
Open file or directory with
.BR OPENER .
.
.TP
.B RET
Works like
.B o
if
.I ENTER_OPENS
is enabled, else works like
.BR l .
.
.TP
.B .
Toggles visibility of dotfiles.
.
.TP
.B e
Open file or directory in
.IR EDITOR .
.
.TP
.B r
Reload directory.
.
.TP
.B S
Spawn a shell (defined by
.BR SHELL
in a directory.
.
.TP
.B T
Create a new file, opening
.B EDITOR
to enter a filename.
.
.TP
.B M
Create a new directory, opening
.B EDITOR
to enter a directory name.
.
.TP
.B R
Rename a file by opening
.B EDITOR
to edit the filename.
.
.IP
Note: For
.BR T ,
.BR M ,
and
.BR R ,
the allowed characters default to POSIX "fully portable filename" standards
with the addition of spaces:
.IR "[A-Za-z0-9 ._-]" .
Spaces can be disabled by setting
.B ALLOW_SPACES
to 0 in
.IR config.h .
.
.TP
.B dd
Delete current selection (does not touch marked files).
This will copy the file/directory into the
.B CFM_TMP
directory and can be undone with
.BR u .
If the
.B CFM_TMP
directory does not exist, deletions will be permanent.
.
.TP
.B alt+dd
Permanently delete current selection (does not touch marked files) without
backing up for undo like
.B dd
does.
This is useful for large directories where a copy will take a long time.
.
.TP
.B m Space
Toggle mark for deletion.
.
.TP
.B D
Delete all marked files (does not touch unmarked files).
.
.TP
.B u
Undo the last deletion operation (does not work if
.B cfm
was unable to create or access its trash directory, in which case deletion is permanent).
.
.TP
.B X
Cut the selected file or directory (can be pasted again with
.BR p ).
Not available if the tmp directory is not available.
.
.TP
.B yy
Copy the selected file or directory (can be pasted again with
.BR p ).
.
.TP
.B p
Paste the previously cut or copied file or directory; shared between all views.
.
.TP
.B TAB
Switches to the next view.
.
.TP
.B \`
Switches to the previous view.
.
.TP
.B 1\(en0
Switches to view
.IR N ,
up to the number specified by
.B VIEW_COUNT
(2 by default).
.
.TP
.B q ESC
Quit
.BR cfm .
.
.TP
.B Q
Quit
.BR cfm ,
saving its working directory to the file specified in
.BR CD_ON_CLOSE ,
if enabled, or the
.B CFM_CD_ON_CLOSE
environment variable if not.
.
.SH SCRIPTING
If stdin or stdout are not attached to a TTY,
.B 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,
.B cfm
will
.B NOT
backup files when deleting.
All deletions will be permanent.
.
.SH AUTHOR
Will Eccles \([email protected]\(ra.
For more information, see the
.UR https://github.com/willeccles/cfm
GitHub repo
.UE .