-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfileobj.1.txt
281 lines (212 loc) · 10.1 KB
/
fileobj.1.txt
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
FILEOBJ(1) General Commands Manual FILEOBJ(1)
NAME
fileobj - ncurses based hex editor with vi interface
SYNOPSIS
fileobj [options]... [paths]...
fileobj [options]... [paths[@offset:length]]...
fileobj [options]... [paths[@offset-(offset+length)]]...
DESCRIPTION
ncurses(3) based hex editor with vi interface.
OPTIONS
--version
Print version and exit.
-h, --help
Print help message and exit.
-R
Use read-only mode.
-B
Use Python bytes based buffer for regular files. This option is
required to insert or delete bytes on some platforms.
-o=[<number_of_windows>]
Initially assign buffers given by paths to horizontally splitted
windows. When <number_of_windows> is omitted, assign one window
for each buffer.
-O=[<number_of_windows>]
Initially assign buffers given by paths to vertically splitted
windows. When <number_of_windows> is omitted, assign one window
for each buffer.
--bytes_per_line=<bytes_per_line>, --bpl=<bytes_per_line>
Set number of bytes printed per line. Each line prints
<bytes_per_line> bytes. Available formats for <bytes_per_line> are
digit, "max", "min" and "auto". "auto" sets the value to the
maximum 2^N that fits in the terminal width. Defaults to "auto".
--bytes_per_window=<bytes_per_window>, --bpw=<bytes_per_window>
Set number of bytes printed per window. Each window prints
<bytes_per_window> bytes, using the current number of bytes per
line. Available formats for <bytes_per_window> are digit, "even"
and "auto". "even" sets all windows to have the same size.
Defaults to "auto".
--bytes_per_unit=<bytes_per_unit>, --bpu=<bytes_per_unit>
Set number of bytes printed per unit. Each unit prints
<bytes_per_unit> bytes. Defaults to "1".
--no_text
Disable text window.
--no_mouse
Disable mouse events.
--no_color
Disable color for buffer contents.
--force
Ignore warnings which can be ignored.
--verbose
Enable verbose mode.
--test_screen
Enter ncurses(3) screen test mode.
--test_mouse
Enter ncurses(3) mouse test mode.
--test_color
Enter ncurses(3) color test mode.
--list_color
Print list of available screen colors and exit. "r:g:b" format is
printed if a terminal supports it.
--env
Print list of environment variables and exit.
--command
Print list of editor commands and exit. Also see :help.
--sitepkg
Print python(1) site-package directory and exit.
--md=[<hash_algorithm>]
Print message digest of files using <hash_algorithm> and exit.
Defaults to "sha256".
--blkcmp
Compare contents of files and exit.
--blkdump=[<dump_type>]
Print contents of files to stdout and exit. Available options are
"text" and "raw". Defaults to "text". If multiple files are
specified, this command assumes a single concatenated file. To
handle them separately, append "x" to option string (e.g. "textx").
--blkscan=[<scan_type>]
Print file offsets of matched logical blocks and exit. Available
options are "zero", "nonzero", "ff", "nonff",
"<hash_algorithm>:<value>" and "<hash_algorithm>". Defaults to
"zero". If multiple files are specified, this command assumes a
single concatenated file. To handle them separately, append "x" to
option string (e.g. "zerox").
--lsblk
Print list of block devices and exit. This prints character
devices on some platforms.
ENVIRONMENT
FILEOBJ_USE_READONLY
If defined, use read-only mode (equivalent to -R).
FILEOBJ_USE_BYTES_BUFFER
If defined, use Python bytes based buffer for regular files
(equivalent to -B).
FILEOBJ_USE_ASCII_EDIT
If defined, use ASCII edit mode (equivalent to :set ascii).
Defaults to binary edit mode if undefined.
FILEOBJ_USE_IGNORECASE
If defined, search operation is case-insensitive (equivalent to
:set ic). Defaults to case-sensitive if undefined.
FILEOBJ_USE_SIPREFIX
If defined, use 10^3(K) for kilo (equivalent to :set si). Defaults
to 2^10(Ki) if undefined.
FILEOBJ_USE_WRAPSCAN
If set to "false", search does not wrap around the end of the
buffer (equivalent to :set nows). Defaults to wrap around if
undefined.
FILEOBJ_USE_TEXT_WINDOW
If set to "false", do not use text window. Defaults to use text
window if undefined.
FILEOBJ_USE_MOUSE_EVENTS
If set to "false", do not use mouse events. Defaults to use mouse
events if undefined.
FILEOBJ_USE_COLOR
If set to "false", do not use color for buffer contents (equivalent
to --no_color). This set to "false" is equivalent to
FILEOBJ_COLOR_ZERO, FILEOBJ_COLOR_FF, FILEOBJ_COLOR_PRINT,
FILEOBJ_COLOR_DEFAULT, FILEOBJ_COLOR_OFFSET set to "none" or
"white". Defaults to use color if undefined.
FILEOBJ_USE_UNIT_BASED
If defined, editor operations are on per unit basis where possible.
Defaults to on per byte basis.
FILEOBJ_USE_BACKUP
If defined, create backup files under ~/.fileobj. Backup files
start with '.'. Only applies to regular files.
FILEOBJ_USE_TRUNCATE_SHRINK
If defined, allow :truncate to shrink truncate. Defaults to
disallow.
FILEOBJ_USE_LINE_SCROLL
If set to "false", enable page scroll mode. Defaults to line
scroll mode.
FILEOBJ_USE_LOWER_CASE_HEX
If defined, use lower case for alphabets in hexadecimal. Defaults
to upper case.
FILEOBJ_BUFFER_SIZE
Set custom buffer size if larger than 0. Defaults to 0.
FILEOBJ_LOGICAL_BLOCK_SIZE
Set custom logical block size if larger than 0. Defaults to 0.
FILEOBJ_ENDIANNESS
If set to "little" or "big", set endianness for multi-bytes data
(equivalent to :set le and :set be). Defaults to host endian if
undefined.
FILEOBJ_ADDRESS_RADIX
If set to "16", "10" or "8", show address in either hexadecimal,
decimal or octal (equivalent to :set address). Defaults to "16" if
undefined.
FILEOBJ_BYTES_PER_LINE
Set number of bytes printed per line (equivalent to
--bytes_per_line and :set bytes_per_line).
FILEOBJ_BYTES_PER_WINDOW
Set number of bytes printed per window (equivalent to
--bytes_per_window and :set bytes_per_window).
FILEOBJ_BYTES_PER_UNIT
Set number of bytes printed per unit (equivalent to
--bytes_per_unit and :set bytes_per_unit).
FILEOBJ_COLOR_CURRENT
Set current cursor and window color. Defaults to "black,green" if
undefined. Set blank string to disable. See --list_color for
available colors.
FILEOBJ_COLOR_ZERO
Set color for zero (0) bytes within buffer contents. Defaults to
"green" if undefined. Set blank string to disable. See
--list_color for available colors.
FILEOBJ_COLOR_FF
Set color for 0xff bytes within buffer contents. Defaults to
"magenta" if undefined. Set blank string to disable. See
--list_color for available colors.
FILEOBJ_COLOR_PRINT
Set color for printable bytes within buffer contents. Defaults to
"cyan" if undefined. Set blank string to disable. See
--list_color for available colors.
FILEOBJ_COLOR_DEFAULT
Set default color for buffer contents. Defaults to "none" if
undefined. See --list_color for available colors.
FILEOBJ_COLOR_VISUAL
Set color for visual region. Defaults to "red,yellow" if
undefined. Set blank string to disable. See --list_color for
available colors.
FILEOBJ_COLOR_OFFSET
Set color for offsets in editor windows. Defaults to "none" if
undefined. See --list_color for available colors.
FILEOBJ_DISAS_ARCH
Set architecture name to use for d command. Defaults to "x86" if
undefined, and currently only "x86" is supported.
FILEOBJ_DISAS_PRIVATE
Set FILEOBJ_DISAS_ARCH specific data for d command. Defaults to
use 64 bit mode on x86 if undefined.
FILES
~/.fileobj
A directory automatically created by fileobj(1). Note that on
Windows, name of files automatically created under this directory
end with ".txt".
~/.fileobj/cstruct
A default path for configuration file for :cstruct. Automatically
created.
~/.fileobj/env
A file to specify environment variables via file on runtime.
Existing environment variables take precedence over the file
contents. Automatically created.
~/.fileobj/history
A JSON file contains history of executed editor commands.
Automatically created.
~/.fileobj/log
A text file contains logged messages. Automatically created.
~/.fileobj/marks
A JSON file contains per-file marks marked by an editor command.
Automatically created.
~/.fileobj/session
A JSON file contains session information. Automatically created.
~/.fileobj/.YYYY-MM-DD-HH-MM-SS.name.bak
Temporary backup file format.
AUTHORS
Tomohiro Kusumi <[email protected]>
FILEOBJ 0.8.6 March 4, 2024 FILEOBJ(1)