-
Notifications
You must be signed in to change notification settings - Fork 208
/
FARCmdsEng.hlf
381 lines (258 loc) · 14.5 KB
/
FARCmdsEng.hlf
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
.Language=English,English
.PluginContents=FAR Commands
.Options CtrlStartPosChar=^<wrap>
@Contents
$ #FAR Commands#
The FAR Commands plugin (FARCmds) provides a number of additional commands available
in command line via prefixes.
In addition, the commands can be used in ~User Menu~@:UserMenu@,
in ~file associations~@:FileAssoc@, and in dialog ~Apply Command~@:ApplyCmd@ (#Ctrl-G#)
#Command Line Syntax#
#command:#[#options#] #object#
#command# - one of the following:
~view~@View@ - viewer
~edit~@Edit@ - editor
~goto~@Goto@ - jump to a file or folder
~clip~@Clip@ - put data in the clipboard
~whereis~@WhereIs@ - locate and jump to an object
~link~@Link@ - create links
~run~@Run@ - execute commands
~load~@Load@ - load plugin
~unload~@Unload@ - unload plugin
#options# - ^<wrap>optional parameters, see corresponding commands descriptions.
#object# - ^<wrap>one of the following:
#filename# - ^<wrap>name of the file to be viewed, edited or jumped to.
#path# - ^<wrap>file or directory path to jump to.
#<command# - ^<wrap>~intercept output~@Direction@ of operation system command. Symbol #<# is obligatory.
See also: ~Configuring FAR Commands~@Config@ | ~Notes~@Remark@
@Load
$ #The Load command#
The #load# command allows to load plugins manually.
- Plugin path can be provided as a command argument:
#load:DLL_module_name#
- or picked from provided "#filename#":
#load: <filename#
See also: ~unload~@Unload@ | ~Notes~@Remark@ | ~Contents~@Contents@
@Unload
$ #The Unload command#
The #unload# command allows to unload plugins manually.
- Plugin path can be provided as a command argument:
#unload:DLL_module_name#
- or picked from provided "#filename#":
#unload: <filename#
Plugin GUID can also be used instead of DLL path.
See also: ~load~@Load@ | ~Notes~@Remark@ | ~Contents~@Contents@
@Clip
$ #The Clip command#
The #clip# command puts data into the Windows clipboard.
The data can be the contents of a file or the output of a program.
The clipboard will contain all the data up to the character with the
code #0x00#.
Размер помещаемых данных можно задавать в диалоге конфигурации плагина. По
умолчанию - 1 MB.
#clip:filename#
Передаваемые команде данные нулевого размера очищают буфер обмена.
See also: ~Output Redirection~@Direction@ | ~Notes~@Remark@ | ~Contents~@Contents@
@Run
$ #The Run command#
The #run# command executes an operating system #command# redirecting
its output to the specified file #"filename"#. Output can also be displayed
on the screen or hidden from the user using ~Output Redirection~@Direction@ modifiers.
#run:filename<command#
See also: ~Output Redirection~@Direction@ | ~Remarks~@Remark@ | ~Contents~@Contents@
@View
$ #The View command#
The #view# command opens the file "#filename#" in the FAR
built-in ~viewer~@:Viewer@:
#view:filename#
See also: ~edit~@Edit@ | ~Output Redirection~@Direction@ | ~Notes~@Remark@ | ~Contents~@Contents@
@Edit
$ #The Edit command#
The #edit# command opens the file "#filename#" for editing
in the FAR built-in ~editor~@:Editor@.
#edit:filename#
If the file "#filename#" does not exist, it will be created.
If the newly created file is not changed before leaving the editor, it will
be deleted (same behaviour as #Shift-F4#).
При открытии файла можно сразу перейти в заданную позицию. Для этого в квадратных скобках
надо указать нужную строку и колонку (любую компоненту можно не указывать, по умолчнию одна будет равна 1).
Квадратные скобки обязательны!
#edit:[строка] имяфайла#
#edit:[строка,колонка] имяфайла#
#edit:[,колонка] имяфайла#
В качестве строки и колонки допускается указывать переменные среды, содержащие числа.
Например, переменная среды Line равна 10. В этом случае произойдёт позиционирование курсора
на 10 строку (позиция в строке 1) в файле "File.txt":
edit:[%Line%,] File.txt
If the filename contains square brackets (for example: "[1].txt"), then for
the correct opening of the file in the editor you must provide at least one delimiter
(e.g. a space) before the filename, or enclose it in quotation marks:
edit: [1].txt
edit:"[1].txt"
See also: ~view~@View@ | ~Output Redirection~@Direction@ | ~Notes~@Remark@ | ~Contents~@Contents@
@Goto
$ #The Goto command#
The #goto# command jumps to a file or a folder. The path can be
specified in two ways:
1. Directly as a parameter of the command
#goto:path#
2. The path is taken from the file "#filename#"
#goto: <filename#
If the parameter "#path#" specifies a folder and is terminated with
a backslash ('#\#'), the plugin jumps to the specified folder. If the
path to the folder is not terminated with a backslash, the cursor on the
panels is positioned to the specified folder.
Если файл "#имяфайла#" является ярлыком Windows, то плагин переходит
к объекту, на который ссылается lnk-файл.
When panels are turned off, the cursor is not positioned on the requested object,
only the switching to the required folder occurs.
Плагин осуществляет переход как указано, не пытаясь найти файловый объект.
See also: ~whereis~@WhereIs@ | ~Notes~@Remark@ | ~Contents~@Contents@
@Link
$ #The Link command#
The #link# command creates ~links~@:HardSymLink@ to
files and folders. It also allows to mount local disks
on file system.
#link:#[#/msg#] [#/n#] [#/s#] #source destination#
Depending on the type of source are those types of links:
#file# : #hard link# is created
#folder# : #junction# is created
#drive# : ^<wrap>drive is mounted (#volume mount point# is created)
"drive" should be a sequence "#drive_letter:\#", e.g. "#C:\#"
Switch #/msg# turns on the output of error messages
Switch #/n# disables automatic update of panels after creation of link
Switch #/s# allows to make symbolic links (#symlinks#).
It's possible to create a file symlink (instead of a hardlink)
or a folder symlink (instead of folder junction).
The switch is relevant to Windows Vista or higher.
Ignored when mounting drives.
Mounted drives (or volume mount points) is a feature
that allows to display specified disks as folders. Example:
#link: E:\ C:\cdrom#
After this command the folder C:\cdrom will display the contents of drive E:
See also: ~Remarks~@Remark@ | ~Contents~@Contents@
@WhereIs
$ #The WhereIs command#
The #whereis# command locates the given object and jumps to it if the search was
successful.
#whereis:object#
Второй способ - имя объекта поиска берётся из заданного файла "#имяфайла#"
#whereis: <имяфайла#
The search is performed in the following order:
1. Current folder
2. The directory pointed to by the environment variable %FARHOME%
3. Folders in the system environment variable #PATH#
4. Windows 95: Windows' system folder (SYSTEM)
Windows NT: 32 bit Windows' system folder (SYSTEM32)
5. Windows NT: 16 bit Windows' system folder (SYSTEM)
6. Windows folder.
7. Contents of the registry key:
#HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths#
8. Contents of the registry key:
#HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths#
Плагин пытается найти файловый объект сначала как указано, а затем производит
поиск объекта с расширениями из списка переменной среды PATHEXT.
When panels are turned off, the cursor is not positioned on the requested object,
only the switching to the required folder occurs.
See also: ~goto~@Goto@ | ~Notes~@Remark@ | ~Contents~@Contents@
@Direction
$ #Output Redirection#
The plugin can redirect the output of the specified #"<command"# or #"<<command"#.
#command# - #[#stream#][#mode#][#|path|#]#command#.
#stream# - controls which output stream(s) to redirect.
#1# - redirect only standard output stream #stdout#.
#2# - redirect only standard output stream #stderr#.
#*# - redirect #stderr# and #stdout# as one stream.
#?# - redirect #stderr# and #stdout# as different streams.
^<wrap>For commands ~view~@View@ and ~edit~@Edit@ the streams will be opened
in separate windows. For other commands same behavior as #*#.
^<wrap>Default value of this parameter can be defined in ~config~@Config@.
#mode# - ^<wrap>controls direct console output (not via standard streams)
#># - ^<wrap>ignore the console output of the program
and display only message about its execution.
#<# - ^<wrap>save console output and make it available
for viewing with #Ctrl-O#.
#+# - ^<wrap>same as #<#, but displays on the screen redirected output
of the program along with console output.
^<wrap>Default value of this parameter can be defined in ~config~@Config@.
^<wrap>Параметр #mode# можно указывать только после #stream#.
#|path|# - ^<wrap>command can be executed in the folder different from the
current one. To do this specify the path (enclosed in pipes '#|#')
For example: #edit:<|%TEMP%|dir#
Program output can be opened in viewer: #~view~@View@:<command#
or in editor: #~edit~@Edit@:<command#
or can be placed into clipboard: #~clip~@Clip@:<command#
or saved to a user-defined file: #~run~@Run@:filename<command#
#Notes:#
1. ^<wrap>The entire string after the symbol '#<#' and optional modifiers
is sent to the command processor (%COMSPEC%)
2. ^<wrap>Program output is placed in a temporary file, which is deleted automatically when FAR Manager
doesn't need it.
3. ^<wrap>Some programs do not use standard output stream(s), but
print directly to the console. To store console output
and make it available for viewing with #Ctrl-O#
use modifiers '#<#' and '#+#'. To ignore it - use '#>#'
^<wrap>You can change default behavior in the ~configuration~@Config@.
4. ^<wrap>If the #stream# parameter equals #1# or #2# then the start of the
command text must be separated from it by some symbol.
5. ^<wrap>Если #command# указан без пути, то плагин пытается найти исполняемй
модуль, как это делает команда ~whereis~@WhereIs@.
#Examples:#
Execute the command "#command#" and redirect its output to the editor:
#edit:<command#
Possible cases with the parameter #stream#=#1#:
#edit:<1 command#
#edit:<1"command"#
#edit:<1+command#
#edit:<1|%TEMP%|command#
See also: ~Notes~@Remark@ | ~Contents~@Contents@
@Remark
$ #Notes#
1. ^<wrap>It is possible to enclose parameters #filename#, #path# and #command# in quotes.
2. You can use environment variables.
3. If you make a syntax error, the help will pop up.
4. ^<wrap>You can use console aliases as #command# (Console aliases - macros defined by command DOSKEY)
See also: ~Contents~@Contents@
@Config
$ #Configuring FAR Commands#
#External commands screen output# Control program screen ~output~@Direction@:
#Hide external command# Hides program output. Only a message
#output# with the size of intercepted output
will be displayed. Same as using #<>#
instead of #<#.
#Keep external command# Saves the text output by programs
#output# directly to the console for viewing
by #Ctrl-O#.
Same as using #<<# instead of #<#.
#Duplicate intercepted# Saves for viewing by #Ctrl-O# both the
#output to screen# direct console output and intercepted
output.
Same as using #<+# instead of #<#.
#Intercepting output# Controlling of program ~output~@Direction@
interception:
#Intercept both# Intercept standard output stream
#stdout and stderr# #stdout# and standard error stream
#stderr# as one stream.
Same as using #<*# instead of #<#.
#Intercept stdout only# ^<wrap>Intercept only #stdout# (standard output stream).
Same as using #<1# instead of #<#.
#Intercept stderr only# ^<wrap>Intercept only #stderr# (standard errors stream).
Same as using #<2# instead of #<#.
#Intercept stdout and # Intercept stdout and #stderr#
#stderr separately# separately. It has sense only in
commands #view:<# and #edit:<#.
In other cases same as #<*#.
Can't be used with #<+#.
Same as using #<?# instead of #<#.
#View/edit empty files# With this options off, zero sized
files will not be opened for viewing
or editing.
#Other#
#Edit new files# Allows to open the editor with non
existing files.
#The size of read data# ^<wrap>Позволяет задавать максимальный размер
считываемых из файла данных в командах ~clip~@clip@, ~goto~@goto@ и ~whereis~@whereis@.
По умолчанию - 1048576 (1 MB).
Максимальное значение - 4294967295 (4 GB-1).
Пустое значение или 0 заменяется на 1048576 (1 MB).
See also: ~Contents~@Contents@