/
mintty.1.html
4749 lines (3977 loc) · 189 KB
/
mintty.1.html
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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- Creator : groff version 1.22.4 -->
<!-- CreationDate: Fri Mar 25 18:57:04 2022 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
.h3 {font-size: 13pt;}
.h4 {}
</style>
<title>mintty</title>
</head>
<body>
<h1 align="center">mintty</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#INVOCATION">INVOCATION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#USAGE">USAGE</a><br>
<a href="#CONFIGURATION">CONFIGURATION</a><br>
<a href="#SCOPE AND LIMITATIONS">SCOPE AND LIMITATIONS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#LICENSE">LICENSE</a><br>
<a href="#CONTACT">CONTACT</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">mintty –
Cygwin terminal emulator</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>mintty</b>
[<i>OPTION</i>]... [ <b>-</b> | <i>PROGRAM</i>
[<i>ARG</i>]... ]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>Mintty</b>
is a terminal emulator for Cygwin with a native Windows user
interface and minimalist design. Its terminal emulation is
largely compatible with <b>xterm</b>, but it does not
require an X server.</p>
<h2>INVOCATION
<a name="INVOCATION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">If a program
name is supplied on the command line, this is executed with
any additional arguments given. Otherwise, mintty looks for
a shell to execute in the <i>SHELL</i> environment variable.
If that is not set, it reads the user’s default shell
setting from <i>/etc/passwd</i>. As a last resort, it falls
back to <i>/bin/sh</i>.</p>
<p style="margin-left:11%; margin-top: 1em">If a single
dash is specified instead of a program name, the shell is
invoked as a login shell. If mintty is started from a
Windows shortcut (desktop or start menu), by default the
shell is also invoked as a login shell unless disabled by an
option.</p>
<p style="margin-left:11%; margin-top: 1em">Invocation by a
name of <b>wsl*</b><i>[-distro]</i> implies a
<b>--WSL</b><i>[=distro]</i> parameter.</p>
<p style="margin-left:11%; margin-top: 1em">Mintty supports
being started from a Windows desktop shortcut; it honours
window and icon settings of the shortcut, aligns taskbar
grouping with the shortcut, disables daemonizing, and sets
environment variable MINTTY_SHORTCUT to its pathname. <br>
Before starting the child program, mintty trims the
environment from other variables set by launchers, other
terminals, or shells, that might indicate incorrect
information and lead to confusing behaviour.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The standard
GNU option formats are accepted, with single dashes
introducing short options and double dashes introducing long
options. <br>
Note that setting <b>ShortLongOpts</b> enables single-dash
long options. <b><br>
-c</b>, <b>--config</b> <i>FILENAME</i></p>
<p style="margin-left:22%;">Read settings from the
specified configuration file, in addition to the default
config files. Configuration changes are saved to the last
file thus specified.</p>
<p style="margin-left:11%;"><b>-C</b>, <b>--loadconfig</b>
<i>FILENAME</i></p>
<p style="margin-left:22%;">Read settings from the
specified configuration file, in addition to the default
config files. The file is not taken into account for saving
configuration changes. This is useful to mix-in partial
configuration variants, particularly colour schemes.
However, <b>-o ThemeFile=</b><i>FILENAME</i> may be
preferable.</p>
<p style="margin-left:11%;"><b>--configdir</b>
<i>DIRNAME</i></p>
<p style="margin-left:22%;">Use the given directory to
check for resource subdirectories (<i>themes</i>,
<i>sounds</i>, <i>lang</i>, <i>emojis</i>, <i>icon</i>,
<i>fonts</i>, <i>pointers</i>); also read settings from the
configuration file <i>DIRNAME</i>/<b>config</b>, in addition
to the default config files, and save configuration changes
here.</p>
<p style="margin-left:11%;"><b>--dir</b>
<i>directory</i></p>
<p style="margin-left:22%;">Change initial directory to
start in. This is especially useful for invocation of mintty
from a Windows context menu via registry entry.</p>
<p style="margin-left:11%;"><b>-e</b>, <b>--exec</b>
<i>PROGRAM</i> [<i>ARG</i> ...]</p>
<p style="margin-left:22%;">Execute the specified program
in the terminal session and pass on any additional
arguments.</p>
<p style="margin-left:22%; margin-top: 1em">This option is
present for compatibility with other terminal emulators
only. It can be omitted, in which case the first non-option
argument, if any, is taken as the name of the program to
execute.</p>
<p style="margin-left:11%;"><b>-h</b>, <b>--hold
never</b>|<b>start</b>|<b>error</b>|<b>always</b></p>
<p style="margin-left:22%;">Determine whether to keep the
terminal window open when the command has finished and no
more processes are connected to the terminal. The argument
can be abbreviated to a single letter.</p>
<p style="margin-left:22%; margin-top: 1em">By default, the
window is closed immediately, except if the child process
has exited with status 255, which is used to indicate
failure to execute the shell command. (Exit status 255 is
also used by <b>ssh</b> to indicate connection errors.)</p>
<p style="margin-left:22%; margin-top: 1em">Alternatively,
the window can be set to never stay open, to always stay
open, or to stay open only if the child process terminates
with an error, i.e. with a non-zero exit status or due to a
signal indicating a runtime error.</p>
<p style="margin-left:11%;"><b>-i</b>, <b>--icon</b>
<i>FILE</i>[<b>,</b><i>INDEX</i>]</p>
<p style="margin-left:22%;">Load the window icon from an
executable, DLL, or icon file. The optional comma-separated
index can be used to select a particular icon in a file with
multiple icons.</p>
<p style="margin-left:22%; margin-top: 1em"><i>Note:</i>
About interaction problems of icon, shortcut, and the
Windows taskbar: In a Windows desktop shortcut, it is
suggested not to use this option in the Target command line,
as mintty will detect and use the icon from the invoking
shortcut (Change Icon...), also resolving a leading Windows
environment variable (like %SystemRoot%).</p>
<p style="margin-left:11%;"><b>-l</b>, <b>--log</b>
<i>FILE</i>|<b>-</b></p>
<p style="margin-left:22%;">Copy all output into the
specified log file, or standard output if a dash is given
instead of a file name. (Implies <b>-o Logging=yes</b>.)</p>
<p style="margin-left:22%; margin-top: 1em">If FILE
contains <b>%d</b> it will be substituted with the process
ID. See description of equivalent option "Log
file" (Log=) below for further formatting options and
hints.</p>
<p style="margin-left:22%; margin-top: 1em">Note that
logging can be toggled from the extended context menu.</p>
<p style="margin-left:11%;"><b>--logfile</b>
<i>FILE</i>|<b>-</b></p>
<p style="margin-left:22%;">Like <b>--log</b> but with
logging initially disabled, so just specifying a potential
log file name in case logging is enabled from the extended
context menu. (Equivalent to combining <b>--log</b> with
<b>-o Logging=no</b>.)</p>
<p style="margin-left:11%;"><b>-o</b>, <b>--option</b>
<i>NAME</i>=<i>VALUE</i></p>
<p style="margin-left:22%;">Override the named config file
option with the given value, e.g. <b>-o
ScrollbackLines=1000</b>.</p>
<p style="margin-left:11%;"><b>-p</b>, <b>--position</b>
<i>X</i><b>,</b><i>Y</i></p>
<p style="margin-left:22%;">Open the window with its top
left corner at the specified coordinates. Instead of
coordinates, "centre" or "center" can be
specified to place the window in the screen centre, and
"right" or "bottom" can be specified to
align the right or bottom window border with the right or
bottom screen border (together with another option -p to
specify an offset).</p>
<p style="margin-left:22%; margin-top: 1em">Option value
"@N" where N is a number places the window on
monitor N.</p>
<p style="margin-left:22%; margin-top: 1em">Multiple -p
options can be combined; coordinates have a different
meaning depending on other options: <br>
– With "left", "top", or
"@N", related coordinates are relative to the
monitor. <br>
– With "right" or "bottom",
related coordinates adjust the right or bottom window border
relative to the monitor. <br>
– Otherwise, coordinates are absolute and address the
common multi-monitor address space as provided by
Windows.</p>
<p style="margin-left:22%; margin-top: 1em"><i>Note:</i>
For another option to select the monitor for a new mintty
window, see the description of Alt+F2.</p>
<p style="margin-left:11%;"><b>-s</b>, <b>--size</b>
<i>COLS</i><b>,</b><i>ROWS</i></p>
<p style="margin-left:22%;">Set the default size of the
window in character columns and rows. (The xterm-like syntax
<i>COLS</i><b>x</b><i>ROWS</i> is accepted too.) Instead of
coordinates, "maxwidth" or "maxheight"
can be specified; this can be combined with another
parameter <b>-s</b> for the other dimension. The dimension
for which "max" is applied is ignored in further
<b>-s</b> or <b>-p</b> parameters. For example, <b>mintty -s
maxwidth -p 0,0 -s 0,10</b> will start a window at full
screen width, positioned at the top of the screen, with 10
lines.</p>
<p style="margin-left:11%;"><b>--nobidi</b>,
<b>--nortl</b></p>
<p style="margin-left:22%;">Disable bidi display
(right-to-left support). Same as <b>-o Bidi=0</b>.</p>
<p style="margin-left:11%;"><b>-t</b>, <b>--title</b>
<i>TITLE</i></p>
<p style="margin-left:22%;">Use <i>TITLE</i> as the initial
window title. By default, the title is set to the executed
command.</p>
<p style="margin-left:11%;"><b>-T</b>, <b>--Title</b>
<i>TITLE</i></p>
<p style="margin-left:22%;">Use <i>TITLE</i> as the
permanent window title. The title is not changeable by
control sequences. This feature is only available on the
command line.</p>
<p style="margin-left:11%;"><b>-B</b>, <b>--Border
frame</b>|<b>void</b></p>
<p style="margin-left:22%;">Suppress window title, display
only a frame or no border. This feature is only available on
the command line. Note that frame border operations are also
disabled. However, a window move can also be done with
Ctrl+Alt+click-drag.</p>
<p style="margin-left:11%;"><b>--tabbar</b>[<b>=</b><i>level</i>]</p>
<p style="margin-left:22%;">Activate tabbar for tab-based
session switching among virtual tabs. This sets
<b>TabBar=1</b> and <b>SessionGeomSync=</b><i>level</i>.
Without given value the default window synchronization level
is 2.</p>
<p style="margin-left:11%;"><b>--newtabs</b></p>
<p style="margin-left:22%;">Create a new window even if
virtual tabs are enabled, so running a new tab group.
Implies <b>--tabbar</b> (equivalent to <b>--tabbar -o
NewTabs=2</b>).</p>
<p style="margin-left:11%;"><b>--horbar</b>[<b>=</b><i>mode</i>]</p>
<p style="margin-left:22%;">Support horizontal scrolling.
Values are 3 to enable a permanent horizontal scrollbar, or
2 to display a horizontal scrollbar only while the
horizontal terminal view is narrower than the actual
terminal width.</p>
<p style="margin-left:11%;"><b>-u</b>, <b>--utmp</b></p>
<p style="margin-left:22%;">Create a utmp entry.</p>
<p style="margin-left:11%;"><b>-w</b>, <b>--window
normal</b>|<b>min</b>|<b>max</b>|<b>full</b>|<b>hide</b></p>
<p style="margin-left:22%;">Set the initial window state:
normal, minimized, maximized, full screen, or hidden.</p>
<p style="margin-left:11%;"><b>--class</b> <i>CLASS</i></p>
<p style="margin-left:22%;">Use <i>CLASS</i> as the window
class name of the main window. This allows window grouping
or setup of different tab sets, and it allows scripting
tools to distinguish different mintty instances. The default
is "mintty".</p>
<p style="margin-left:11%;"><b>-d</b>,
<b>--nodaemon</b></p>
<p style="margin-left:22%;">Do not apply
"daemonizing". By default, mintty tries to detach
itself from the invoking terminal when started from a Cygwin
Console in order to avoid disabled signal reception, and
when cloning the window (Alt+F2) in order to avoid a
remaining zombie process.</p>
<p style="margin-left:11%;"><b>-D</b>, <b>--daemon</b></p>
<p style="margin-left:22%;">Enforce
"daemonizing". By default, mintty tries to detach
itself from the invoking terminal only as described above.
With this option, it tries to detach always. This makes a
difference if a Windows "Shortcut key" is
configured in a Windows desktop shortcut for starting
mintty. Without daemonizing, the shortcut key will focus an
already running instance of mintty, with daemonizing it
always starts a new instance.</p>
<p style="margin-left:11%;"><b>-R</b>, <b>--Report</b>
<i>info/mode</i></p>
<p style="margin-left:22%;">Report requested
information.</p>
<p style="margin-left:22%; margin-top: 1em">With values
"s" or "o", mintty reports the position
and size of the window when it exits. This can be used to
manage last window positions and reopen mintty windows
accordingly. Reporting mode is "s" or
"o" to choose short or long option syntax for the
restored (i.e. neither maximized nor minimized) geometry;
min/max/fullscreen information is added.</p>
<p style="margin-left:22%; margin-top: 1em">With value
"m", mintty reports the system’s monitor
configuration (listing all connected monitors and their
geometry and position in Windows’ virtual monitor
coordinate system), and exits.</p>
<p style="margin-left:22%; margin-top: 1em">With value
"f", mintty reports the monospace fonts installed
on the system as determined by mintty, and exits.</p>
<p style="margin-left:22%; margin-top: 1em">With value
"W", mintty lists installed WSL distributions and
properties, and exits.</p>
<p style="margin-left:22%; margin-top: 1em">With value
"t", mintty reports the tty name of the child
process / shell. With value "p", mintty reports
the PID of the child process (e.g. the shell). With value
"P", mintty reports the cygwin PID and the Windows
PID of the mintty process (i.e. running the terminal).</p>
<p style="margin-left:11%;"><b>--trace</b>
<i>OUTPUT</i></p>
<p style="margin-left:22%;">This option redirects reporting
(and debug) output to a file.</p>
<p style="margin-left:11%;"><b>--store-taskbar-properties</b></p>
<p style="margin-left:22%;">Enable persistent storage of
Windows taskbar properties together with options AppName and
AppLaunchCmd.</p>
<p style="margin-left:11%;"><b>--nopin</b></p>
<p style="margin-left:22%;">Prevent pinning of the mintty
window to the Windows taskbar.</p>
<p style="margin-left:11%;"><b>-P</b>, <b>--pcon</b>
[<b>on</b>|<b>off</b>]</p>
<p style="margin-left:22%;">Enforce enabling or disabling
of ConPTY support.</p>
<p style="margin-left:11%;"><b>--wsl</b> (preferred option:
<b>--WSL</b>, see below)</p>
<p style="margin-left:22%;">Adjust to WSL (the Windows
Subsystem for Linux, or Bash/Ubuntu on Windows): <br>
– When dragging a Windows file or folder into mintty,
it will be pasted using the Linux path name. <br>
– When Ctrl+clicking a file name, it will be
interpreted in the Linux namespace and converted before
opening in Windows. <br>
– Options DropCommands, ExitCommands, and setting
MINTTY_PROG for UserCommands are disabled. <br>
– The working directory of the current foreground
process (for click-opening pathnames) cannot be detected.
<br>
– Locale modification (@cjk...) is not set to the
environment variables.</p>
<p style="margin-left:11%;"><b>--WSL</b> <i>WSL
DISTRIBUTION NAME</i></p>
<p style="margin-left:22%;">Run a WSL session, setting
other parameters as appropriate and involving the
<i>wslbridge2</i> gateway implicitly (which should be
installed in /bin for this purpose). If the distribution
name is empty, the default WSL installation is run;
otherwise, it refers to the installed WSL packages as listed
by the Windows tool <b>wslconfig /l</b> or <b>wsl -l</b>.
Implies <b>--wsl</b>, <b>--rootfs=</b>..., and
<b>--icon=</b>... if a respective icon file exists for the
distribution. Also sets up the gateway to propagate locale
settings LANG, LC_CTYPE, LC_ALL and environment variable
APPDATA to the WSL session.</p>
<p style="margin-left:11%;"><b>--WSLmode</b> <i>WSL
DISTRIBUTION NAME</i></p>
<p style="margin-left:22%;">Setup a WSL session for the
given distribution (like <b>--WSL</b>) but do not actually
launch WSL which must be achieved with explicit invocation
of a suitable gateway. The preferred option is <b>--WSL</b>
which invokes <i>/bin/wslbridge2</i> with proper arguments
as determined from the selected WSL distribution, in login
mode if requested and home directory preference if
requested.</p>
<p style="margin-left:11%;"><b>--rootfs</b>
<i>ROOTFOLDER</i></p>
<p style="margin-left:22%;">Provide the root filesystem
folder to adjust path conversion properly for the respective
WSL installation.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>-~</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Start in the user’s home directory. Affects also
WSL sessions.</p></td></tr>
</table>
<p style="margin-left:11%;"><b>-H</b>, <b>--help</b></p>
<p style="margin-left:22%;">Display a brief help message
and exit.</p>
<p style="margin-left:11%;"><b>-V</b>, <b>--version</b></p>
<p style="margin-left:22%;">Print version information and
exit.</p>
<p style="margin-left:11%;"><br>A number of xterm-style
convenience options are also available:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">
<p><b>--fg</b></p></td>
<td width="5%"></td>
<td width="33%">
<p>Sets ForegroundColour.</p></td>
<td width="45%">
</td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">
<p><b>--bg</b></p></td>
<td width="5%"></td>
<td width="33%">
<p>Sets BackgroundColour.</p></td>
<td width="45%">
</td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">
<p><b>--cr</b></p></td>
<td width="5%"></td>
<td width="33%">
<p>Sets CursorColour.</p></td>
<td width="45%">
</td></tr>
</table>
<p style="margin-left:11%;"><b>--selfg</b></p>
<p style="margin-left:22%;">Sets
HighlightForegroundColour.</p>
<p style="margin-left:11%;"><b>--selbg</b></p>
<p style="margin-left:22%;">Sets
HighlightBackgroundColour.</p>
<p style="margin-left:11%;"><b>--fn</b>, <b>--font</b></p>
<p style="margin-left:22%;">Sets Font.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">
<p><b>--fs</b></p></td>
<td width="5%"></td>
<td width="21%">
<p>Sets FontSize.</p></td>
<td width="57%">
</td></tr>
</table>
<p style="margin-left:11%;"><b>--geometry</b>
<i>COLS</i><b>x</b><i>ROWS</i>[[-+]<i>X</i>[-+]<i>Y</i>][<b>@</b><i>MONITOR</i>]</p>
<p style="margin-left:22%;">Sets size and position,
extending xterm syntax by an optional monitor number.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">
<p><b>--en</b></p></td>
<td width="5%"></td>
<td width="78%">
<p>Sets Charset within the current locale.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">
<p><b>--lf</b></p></td>
<td width="5%"></td>
<td width="78%">
<p>Sets Log, the log file name. Use <b>-l</b> to both set
the log file name and enable logging.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">
<p><b>--sl</b></p></td>
<td width="5%"></td>
<td width="78%">
<p>Sets ScrollbackLines; effectively limited by
<b>MaxScrollbackLines</b>.</p> </td></tr>
</table>
<h2>USAGE
<a name="USAGE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Mintty tries to
adhere to both Windows and Unix usage conventions. Where
they conflict, an option is usually provided. This section
primarily describes the default configuration; see the
<b>CONFIGURATION</b> section on how it can be
customized.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Font
rendering</b> <br>
Mintty uses Windows Uniscribe font rendering to display a
wider range of characters; the TextOut API is automatically
used instead if suitable. <br>
<br><b class=h4>Font integration</b></p>
<p style="margin-left:22%;">Fonts in the resource
subdirectory <i>fonts</i> of the config directory are
installed dynamically and can be used for configured or
interactively changed font selection. This is especially
useful for a portable installation.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Bidirectional
rendering</b> <br>
In addition to its default implicit bidirectional rendering
with automatic direction detection (according to the Unicode
Bidi algorithm), mintty supports ECMA-48 bidi modes and
private bidi modes to control switchable bidi behaviour per
line and partially per paragraph (i.e. within an
auto-wrapped line), as listed in
<i><a href="https://github.com/mintty/mintty/wiki/CtrlSeqs#bidirectional-rendering">https://github.com/mintty/mintty/wiki/CtrlSeqs#bidirectional-rendering</a></i>
. They follow the current status of the bidi mode model of
the <b>BiDi in Terminal Emulators</b> recommendation (
<i><a href="https://terminal-wg.pages.freedesktop.org/bidi/">https://terminal-wg.pages.freedesktop.org/bidi/</a></i>
).</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Menus</b>
<br>
The context menu can be opened by right-clicking the mouse
(with Shift in case right-click has been redefined or
redirected to the application) or by pressing the
<b>Menu</b> key that is normally located next to the right
Ctrl key. If invoked while the Ctrl key is held down, an
extended context menu will be opened, with some additional
entries.</p>
<p style="margin-left:11%; margin-top: 1em">The context
menu and its modified variants (with Ctrl etc) can be
customized; see section on Menu configuration for
details.</p>
<p style="margin-left:11%; margin-top: 1em">Mintty also
adds a couple of items to the window menu, which can be
accessed by clicking on the program icon or pressing
<b>Alt+Space</b>.</p>
<p style="margin-left:11%; margin-top: 1em">Both menus have
an entry that leads to the Options dialog for changing
mintty’s configuration.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Text
selection, copy & paste</b> <br>
Screen contents can be selected by holding down the left
mouse button and dragging the mouse. If Alt is held down
before the left mouse button, a rectangular block instead of
whole lines will be selected. The selection can be extended
by holding down <b>Shift</b> while left-clicking.
Double-clicking or triple-clicking selects a whole word or
line, whereby word selection includes special characters
that commonly appear in file names and URLs.</p>
<p style="margin-left:11%; margin-top: 1em">By default,
selected text is automatically copied to the clipboard. This
can be disabled on the <b>Mouse</b> page of the Options
dialog. Selected text can also be copied manually using
either the <b>Copy</b> menu command, the <b>Ctrl+Ins</b> or
<b>Ctrl+Shift+C</b> keyboard shortcuts (the latter if
enabled by setting <b>CtrlShiftShortcuts=yes</b>;
<b>Ctrl+C</b> with option <b>CtrlExchangeShift=yes</b>), or
the middle mouse button combined with <b>Shift</b>.</p>
<p style="margin-left:11%; margin-top: 1em">The selected
region is copied as "rich text" as well as normal
text, which means it can be pasted with colours and
formatting into applications that support it, e.g. word
processors ("true colour" attributes are not
supported).</p>
<p style="margin-left:11%; margin-top: 1em">The window
title can be copied using the <b>Copy Title</b> command in
the window menu.</p>
<p style="margin-left:11%; margin-top: 1em">The clipboard
contents can be pasted using either the <b>Paste</b> menu
command, the <b>Shift+Ins</b> or <b>Ctrl+Shift+V</b>
keyboard shortcuts (the latter if enabled by setting
<b>CtrlShiftShortcuts=yes</b>; <b>Ctrl+V</b> with option
<b>CtrlExchangeShift=yes</b>), or the middle mouse button.
Not only text but also files and directories can be pasted,
whereby the latter are inserted as Cygwin file names. Shell
quoting is added to file names that contain spaces or
special characters.</p>
<p style="margin-left:11%; margin-top: 1em">Selection
highlighting is cleared on input by default. This can be
disabled with option <b>ClearSelectionOnInput=false</b>.</p>
<p style="margin-left:11%; margin-top: 1em">The current
selection size can optionally been indicated with a popup,
enabled with option <b>SelectionShowSize</b>.</p>
<p style="margin-left:11%; margin-top: 1em">Selection can
also be managed using the keyboard. Shift+middle-keypad-key
(Shift+"5") enters keyboard selecting mode
(modifier configurable).</p>
<p style="margin-left:11%; margin-top: 1em">Note: If both
settings <b>CtrlShiftShortcuts</b> and
<b>CtrlExchangeShift</b> are enabled, copy & paste
functions are assigned to plain (unshifted) <b>Ctrl+C</b>
and <b>Ctrl+V</b> for those who prefer them to be handled
like in Windows. <br>
<br><b class=h4>Elastic text selection</b></p>
<p style="margin-left:22%;">The traditional selection
behaviour of cell-based terminals is that a character
touched with the mouse is included in the selection. With
option <b>ElasticMouse</b>, text selection can be changed to
include the first and last characters only if they are
spanned at least halfway by the mouse dragging, like many
GUI applications do.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Drag &
drop</b> <br>
Text, files and directories can be dropped into the mintty
window. They are inserted in the same way as if they were
pasted from the clipboard.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Opening
files, directories and URLs</b> <br>
Files, directories, URLs and web addresses beginning with
"www." can be opened either by holding <b>Ctrl</b>
while left-clicking on them (or double-clicking, if and as
enabled by option <b>OpeningClicks</b>), or by selecting
them and choosing the <b>Open</b> command from the context
menu. Embedded spaces are considered if escaped with a
backslash; for selected pathnames, also embedding quote
marks are considered.</p>
<p style="margin-left:11%; margin-top: 1em">A relative
pathname is interpreted as relative to the current working
directory of the terminal foreground process if that can be
determined, overridden by the working directory
interactively communicated by the respective control
sequence (OSC 7).</p>
<p style="margin-left:11%; margin-top: 1em">Mintty also
supports the OSC 8 control to embed explicit hyperlinks
(similar to links on web pages), see
<i><a href="https://github.com/mintty/mintty/wiki/CtrlSeqs#hyperlinks">https://github.com/mintty/mintty/wiki/CtrlSeqs#hyperlinks</a></i>
.</p>
<p style="margin-left:11%; margin-top: 1em"><i>Note:</i>
While application mouse modes are enabled (as used by many
screen oriented applications), <b>Ctrl+Shift+click</b> can
be used to override it. <br>
<br><b class=h4>Hovering files, directories and URLs</b></p>
<p style="margin-left:22%;">The file names and links
subject to opening are indicated by underlining when
mouse-hovering over them (i.e. when moving the mouse) while
the Control key is pressed. The colour used for hovering
underlines can be configured with <b>HoverColour</b>.
Explicit hyperlinks are displayed in the window title when
hovering them; this can be disabled with
<b>HoverTitle</b>.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Font
zoom</b> <br>
The font size can be increased or decreased using the
keyboard shortcuts <b>Ctrl+(keypad-)plus</b> and
<b>Ctrl+(keypad-)minus</b>, or by holding <b>Ctrl</b> while
rolling the mouse wheel. <b>Ctrl+zero</b> or
<b>Ctrl+middle-mouse click</b> returns the font size to the
default. <i><br>
Shift-coupled window-with-font zooming:</i> If Shift is also
held while zooming, the window will be resized to scale
together with the font, keeping the terminal character size
if possible. This is not applied to the shifted numeric
keypad "0" (which has other meaning) and to the
shifted normal (non-keypad) "-" and "+"
keys (because the shifted key could have a valid mapping,
e.g. Ctrl+_, or the "+" key could be shifted
itself already). <br>
Zooming by keyboard or mouse can be disabled, respectively,
with options ZoomShortcuts=no or ZoomMouse=no.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Drag
resize</b> <br>
The usual windows function to drag on the window border
resizes the terminal. <i><br>
Shift-coupled font-with-window zooming:</i> If Shift is also
held while resizing, but Control is not held, the font will
be scaled along with the resizing, unless disabled with
ZoomFontWithWindow=false (which would help to avoid
interference with certain shifted hotkeys configured to
resize the window). <br>
Note that due to the different height/width factors, coupled
font zooming is not a precise operation.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Reflow /
Line rebreaking after resize</b> <br>
If the terminal is resized to a different width, mintty can
automatically rebreak and rewrap lines that had been
auto-wrapped. This feature can be enabled by setting
<b>RewrapOnResize</b> or in the Options dialog. Note that
rewrapping can also be disabled per line by an escape
sequence.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>DPI
change</b> <br>
When DPI setting changes (by reconfiguration of display
properties "what’s on your screen ...
smaller/medium/larger" or moving the mintty window
between monitors with different DPI settings), mintty adapts
its screen size to avoid Windows blurred auto-adaptation. If
Shift is also held during the change, the font will be
scaled too, roughly maintaining the screen dimensions.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Full
screen</b> <br>
Full screen mode can be toggled using either the <b>Full
Screen</b> command in the menu or either of the
<b>Alt+Enter</b> and <b>Alt+F11</b> keyboard shortcuts, or
the generic functions of the window title bar.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Default
size</b> <br>
If the window has been resized, it can be returned to the
default size set in the Window pane of the options using the
<b>Default size</b> command in the menu or the
<b>Alt+F10</b> shortcut. <b>Shift+Alt+F10</b> also restores
the font size to its default.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Reset</b>
<br>
Sometimes a faulty application or printing a binary file
will leave the terminal in an unusable state. In that case,
resetting the terminal’s state via the <b>Reset</b>
command in the menu or the <b>Alt+F8</b> keyboard shortcut
may help.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Scrolling
and the scrollback buffer</b> <br>
Mintty has a scrollback buffer that can hold up to 10000
lines in the default configuration. It can be accessed using
the scrollbar, the mouse wheel, or the keyboard. Hold the
<b>Shift</b> key while pressing the <b>Up</b> and
<b>Down</b> arrow keys to scroll line-by-line or the
<b>PageUp</b> and <b>PageDown</b> keys to scroll
page-by-page. In <i>scroll mode</i>, the same keys without
<b>Shift</b> do the same. With option <b>KeyFunctions</b>,
user-defined keys can be used for scrolling.</p>
<p style="margin-left:11%; margin-top: 1em">If the
alternate screen is active, instead of scrolling in the
scrollback buffer, the mouse wheel sends virtual cursor key
escape sequences ("mousewheel reporting", roughly
corresponds to xterm alternateScroll mode). This causes many
applications, for example <i>less</i>, to scroll in an
application-specific way (e.g. in the shell history). In
both cases (scrollback and application scrolling), the
number of lines per mouse notch is taken from Windows system
settings, typically 3; this can be overriden by setting
<b>LinesPerMouseWheelNotch</b>. With setting
<b>ZoomMouse=false</b>, holding the <b>Control</b> key while
moving the mouse wheel scrolls by 1 line.</p>
<p style="margin-left:11%; margin-top: 1em">Scrollback
scrolling can be overridden dynamically to enforce
mousewheel reporting in normal screen mode (i.e. not
alternate screen) by holding the <b>Alt</b> key
additionally. So for example shell history can be scrolled
with Control+Alt+mouse-wheel.</p>
<p style="margin-left:11%; margin-top: 1em">Note that all
modes of mouse operation are overridden by various
"mouse tracking" modes enabled by escape
sequences.</p>
<p style="margin-left:11%; margin-top: 1em">See section
further below for horizontal scrolling.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Scroll Lock
handling</b> <br>
The ScrollLock key is one of the most useless keys on
typical PC keyboards as it is mostly ignored by software
nowadays, and yet has its own LED. However, there are two
historic features that could be associated with
"ScrollLock". One is the VT100 NoScroll key which
would hold output via the terminal, the other is a Windows
function to switch cursor keys to screen scrolling as still
used by the Excel program. Mintty provides both features as
user-definable functions, in two variants each. Functions
are no-scroll and scroll-mode (referring to those two
features) which would be reset by any key input, and
toggle-no-scroll and toggle-scroll-mode which would switch
the respective feature on or off. These functions can be
attached to any user-assignable function key or special key,
including the ScrollLock key, with setting
<b>KeyFunctions</b>. Mintty manages the ScrollLock keyboard
light to reflect either of these functions activated, trying
to decouple the light indication from the ScrollLock key
while in a mintty window.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Searching
in the text and scrollback buffer</b> <br>
The <b>Search</b> menu command and <b>Alt+F3</b> shorcut
open a search bar with an input field for a search string.
Matches are highlighted in the scrollback buffer.
<b>Enter</b>/<b>Shift+Enter</b> find the next/previous
position of the match and scrolls the scrollback buffer
accordingly. <b>Tab</b> focusses back into the terminal pane
of the window. The appearance of the search bar and the
matching highlight colours can be customized. <br>
Matching is case-insensitive and ignores combining
characters.</p>
<p style="margin-left:11%; margin-top: 1em">Shift+cursor-left/right
offers another scrolling feature. If prompt lines are marked
with scroll markers they navigate to the previous/next
prompt, to provide a better orientation among the output of
previously invoked commands. See the Control Sequences wiki
page
<i><a href="https://github.com/mintty/mintty/wiki/CtrlSeqs#scroll-markers">https://github.com/mintty/mintty/wiki/CtrlSeqs#scroll-markers</a></i>
for details.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Flip
screen</b> <br>
Applications such as editors and file viewers normally use a
terminal feature called the alternate screen, which is a
second screen buffer without scrollback. When they exit,
they switch back to the primary screen to restore the
command line as it was before invoking the application.</p>
<p style="margin-left:11%; margin-top: 1em">The <b>Flip
Screen</b> menu command and <b>Alt+F12</b> shortcut allow
looking at the primary screen while the alternate screen is
active, and vice versa. For example, this allows to refer to
past commands while editing a file.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Switching
session</b> <br>
The <b>Ctrl+Tab</b> and <b>Ctrl+Shift+Tab</b> shortcuts can
be used to cycle through mintty windows. Minimized windows
are skipped unless both <b>Ctrl</b> keys are used.</p>
<p style="margin-left:11%; margin-top: 1em"><b class=h3>Virtual
Tabs</b> <br>
The Virtual Tabs feature provides a list of all running
mintty sessions (session switcher) as well as configurable
launch parameters for new sessions (session launcher). The