Compare commits

..

1 Commits

Author SHA1 Message Date
Leonard Hecker
6e942b5144 Add CP_UTF8 support to GetConsoleLangId 2025-02-12 13:55:20 +01:00
561 changed files with 6117 additions and 15577 deletions

View File

@@ -1,43 +0,0 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/microsoft/terminal/blob/main/README.md#developer-guidance
properties:
resources:
- resource: Microsoft.Windows.Settings/WindowsSettings
directives:
description: Enable Developer Mode
allowPrerelease: true
# Requires elevation for the set operation
securityContext: elevated
settings:
DeveloperMode: true
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: powershell
directives:
description: Install PowerShell 7
# Requires elevation for the set operation (i.e., installation)
securityContext: elevated
settings:
id: Microsoft.PowerShell
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2022 Enterprise (any edition is OK)
# Requires elevation for the set operation (i.e., installation)
securityContext: elevated
settings:
id: Microsoft.VisualStudio.2022.Enterprise
source: winget
- resource: Microsoft.VisualStudio.DSC/VSComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads from project .vsconfig file
allowPrerelease: true
# Requires elevation for the get and set operations
securityContext: elevated
settings:
productId: Microsoft.VisualStudio.Product.Enterprise
channelId: VisualStudio.17.Release
vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
configurationVersion: 0.2.0

View File

@@ -1,43 +0,0 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/microsoft/terminal/blob/main/README.md#developer-guidance
properties:
resources:
- resource: Microsoft.Windows.Settings/WindowsSettings
directives:
description: Enable Developer Mode
allowPrerelease: true
# Requires elevation for the set operation
securityContext: elevated
settings:
DeveloperMode: true
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: powershell
directives:
description: Install PowerShell 7
# Requires elevation for the set operation (i.e., installation)
securityContext: elevated
settings:
id: Microsoft.PowerShell
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2022 Professional (any edition is OK)
# Requires elevation for the set operation (i.e., installation)
securityContext: elevated
settings:
id: Microsoft.VisualStudio.2022.Professional
source: winget
- resource: Microsoft.VisualStudio.DSC/VSComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads from project .vsconfig file
allowPrerelease: true
# Requires elevation for the get and set operations
securityContext: elevated
settings:
productId: Microsoft.VisualStudio.Product.Professional
channelId: VisualStudio.17.Release
vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
configurationVersion: 0.2.0

View File

@@ -1,43 +0,0 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/microsoft/terminal/blob/main/README.md#developer-guidance
properties:
resources:
- resource: Microsoft.Windows.Settings/WindowsSettings
directives:
description: Enable Developer Mode
allowPrerelease: true
# Requires elevation for the set operation
securityContext: elevated
settings:
DeveloperMode: true
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: powershell
directives:
description: Install PowerShell 7
# Requires elevation for the set operation (i.e., installation)
securityContext: elevated
settings:
id: Microsoft.PowerShell
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2022 Community (any edition is OK)
# Requires elevation for the set operation (i.e., installation)
securityContext: elevated
settings:
id: Microsoft.VisualStudio.2022.Community
source: winget
- resource: Microsoft.VisualStudio.DSC/VSComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads from project .vsconfig file
allowPrerelease: true
# Requires elevation for the get and set operations
securityContext: elevated
settings:
productId: Microsoft.VisualStudio.Product.Community
channelId: VisualStudio.17.Release
vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
configurationVersion: 0.2.0

View File

@@ -11,25 +11,32 @@ colorbrewer
commandlines
consvc
copyable
dalet
dcs
deselection
dialytika
diffing
Dimidium
dje
downsides
dze
dzhe
Emacspeak
Fitt
flac
FTCS
flac
gantt
gfm
ghe
gje
godbolt
hstrings
hyperlinking
hyperlinks
Kbds
kje
libfuzzer
liga
lje
Llast
Lmid
locl
@@ -41,8 +48,10 @@ minimalistic
mkmk
mnt
mru
nje
notwrapped
NTMTo
ogonek
overlined
perlw
postmodern
@@ -50,8 +59,8 @@ Powerline
ptys
pwn
pwshw
qof
QOL
qof
qps
quickfix
rclt
@@ -64,13 +73,17 @@ rlig
rubyw
runtimes
servicebus
shcha
similaritytolerance
slnt
stakeholders
subpage
sustainability
sxn
Tencent
TLDR
tonos
toolset
tshe
UEFI
uiatextrange
und
@@ -78,5 +91,8 @@ vsdevcmd
westus
workarounds
WSLs
wtconfig
XBox
YBox
yeru
zhe

View File

@@ -2,8 +2,11 @@ aalt
abvm
ACCEPTFILES
ACCESSDENIED
acl
aclapi
alignas
alignof
allocconsolewithoptions
APPLYTOSUBMENUS
appxrecipe
bitfield
@@ -12,20 +15,29 @@ BUILDBRANCH
BUILDMSG
BUILDNUMBER
BYCOMMAND
BYPOSITION
charconv
CLASSNOTAVAILABLE
CLOSEAPP
cmdletbinding
COLORPROPERTY
colspan
COMDLG
commandlinetoargv
commoncontrols
comparand
COPYFROMRESOURCE
cstdint
CXICON
CYICON
Dacl
dataobject
dcomp
debugbreak
delayimp
DERR
dlldata
DNE
dnom
DONTADDTORECENT
DWMSBT
@@ -52,51 +64,90 @@ GETHIGHCONTRAST
GETMOUSEHOVERTIME
GETTEXTLENGTH
HARDBREAKS
Hashtable
HIGHCONTRASTON
HIGHCONTRASTW
HIGHQUALITYSCALE
hinternet
HINTERNET
hotkeys
href
hrgn
HTCLOSE
hwinsta
HWINSTA
IActivation
IApp
IAppearance
IAsync
IBind
IBox
IClass
IComparable
IComparer
ICONINFO
IConnection
ICustom
IDialog
IDirect
Idn
IExplorer
IFACEMETHOD
IFile
IGraphics
IImage
IInheritable
IMap
imm
IObject
iosfwd
IPackage
isa
ISetup
isspace
IStorage
istream
IStringable
ITab
ITaskbar
itow
IUri
IVirtual
KEYSELECT
LCID
LINEBREAK
llabs
llu
localtime
lround
Lsa
lsass
LSHIFT
LTGRAY
MAINWINDOW
MAXIMIZEBOX
medi
memchr
memicmp
MENUCOMMAND
MENUDATA
MENUINFO
MENUITEMINFOW
MINIMIZEBOX
mmeapi
MOUSELEAVE
mov
mptt
msappx
MULTIPLEUSE
NCHITTEST
NCLBUTTONDBLCLK
NCMOUSELEAVE
NCMOUSEMOVE
NCPOINTERUPDATE
NCRBUTTONDBLCLK
NIF
NIN
NOAGGREGATION
NOASYNC
NOBREAKS
NOCHANGEDIR
@@ -109,6 +160,8 @@ NOTIFYICONDATA
ntprivapi
NTSYSCALLAPI
numr
oaidl
ocidl
ODR
offsetof
ofstream
@@ -118,17 +171,22 @@ OSVERSIONINFOEXW
otms
OUTLINETEXTMETRICW
overridable
PACL
PAGESCROLL
PALLOC
PATINVERT
PEXPLICIT
PICKFOLDERS
PINPUT
pmr
ptstr
QUERYENDSESSION
rcx
REGCLS
RETURNCMD
rfind
RLO
rnrn
ROOTOWNER
roundf
RSHIFT
@@ -147,19 +205,23 @@ SHOWTIP
SINGLEUSE
SIZENS
smoothstep
snprintf
SOFTBREAK
spsc
sregex
SRWLOC
srwlock
SRWLOCK
STDCPP
STDMETHOD
strchr
strcpy
streambuf
strtoul
Stubless
Subheader
Subpage
syscall
syscolors
SYSTEMBACKDROP
TABROW
TASKBARCREATED
@@ -174,17 +236,23 @@ tokeninfo
tolower
toupper
TRACKMOUSEEVENT
TTask
TVal
UChar
UFIELD
ULARGE
UOI
UPDATEINIFILE
urlmon
userenv
USEROBJECTFLAGS
Vcpp
Viewbox
virtualalloc
vsnwprintf
wcsnlen
wcsstr
wcstoui
WDJ
winhttp
wininet
@@ -194,8 +262,10 @@ winstamin
wmemcmp
wpc
WSF
wsregex
WWH
wwinmain
xchg
XDocument
XElement
xfacet
@@ -219,5 +289,4 @@ xtree
xutility
YIcon
YMax
zstring
zwstring

View File

@@ -1,4 +1,5 @@
CHINESEBIG
choseong
Choseong
CHOSEONG
Jongseong
Jungseong
ssangtikeut

View File

@@ -1,3 +1,4 @@
alice
aliceblue
antiquewhite
blanchedalmond
@@ -38,6 +39,7 @@ gainsboro
ghostwhite
greenyellow
hotpink
indian
indianred
lavenderblush
lawngreen
@@ -72,6 +74,7 @@ mediumvioletred
midnightblue
mintcream
mistyrose
navajo
navajowhite
navyblue
oldlace
@@ -85,6 +88,7 @@ papayawhip
peachpuff
peru
powderblue
rebecca
rebeccapurple
rosybrown
royalblue
@@ -105,4 +109,9 @@ webgrey
webmaroon
webpurple
whitesmoke
xaroon
xray
xreen
xrey
xurple
yellowgreen

View File

@@ -1,8 +1,8 @@
Consolas
emoji
emojis
Emojis
Extralight
Gabriola
Iosevka
MDL
Monofur

View File

@@ -1 +1,4 @@
arigatoo
doomo
Kaomojis
TATEGAKI

View File

@@ -1,2 +1,11 @@
atan
CPrime
HBar
HPrime
isnan
LPrime
LStep
powf
RSub
sqrtf
ULP

View File

@@ -4,11 +4,12 @@ advapi
akv
AKV
altform
Altforms
altforms
appendwttlogging
appinstaller
appx
appxbundle
appxerror
appxmanifest
ATL
autoexec
@@ -24,43 +25,66 @@ CPRs
cryptbase
cscript
DACL
DACLs
defaultlib
diffs
disposables
dotnetfeed
DTDs
DWINRT
enablewttlogging
HOMESHARE
Intelli
issecret
IVisual
libucrt
libucrtd
LKG
LOCKFILE
Lxss
makepri
mfcribbon
microsoft
microsoftonline
MSAA
msixbundle
MSVC
MSVCP
mtu
muxc
netcore
Onefuzz
osgvsowi
PFILETIME
pgc
pgo
pgosweep
powerrename
powershell
priconfig
PRIINFO
propkey
pscustomobject
QWORD
rdpclip
regedit
resfiles
robocopy
SACLs
sdkddkver
segoe
Shobjidl
sid
Skype
SRW
sxs
symbolrequestprod
Sysinternals
sysnative
systemroot
taskkill
tasklist
tdbuildteamid
ucrt
ucrtd
unvirtualized
@@ -68,9 +92,12 @@ USERDNSDOMAIN
VCRT
vcruntime
Virtualization
visualstudio
vscode
VSTHRD
WINBASEAPI
winsdkver
wlk
wscript
wslpath
wtl

View File

@@ -1,3 +1,4 @@
Anup
arkthur
austdi
Ballmer
@@ -5,11 +6,13 @@ bhoj
Bhojwani
Bluloco
carlos
craigloewen
dhowett
Diviness
dsafa
duhowett
DXP
ekg
eryksun
ethanschoonover
Firefox
@@ -22,42 +25,70 @@ Hernan
Howett
Illhardt
Imms
iquilezles
italo
jantari
jerrysh
Kaiyu
kimwalisch
KMehrain
Kodelife
KODELIFE
Kourosh
kowalczyk
leonardder
leonmsft
Lepilleur
lhecker
lukesampson
Macbook
Manandhar
masserano
mbadolato
Mehrain
menger
mgravell
michaelniksa
michkap
migrie
mikegr
mikemaccana
miloush
miniksa
nguyen
niksa
nvaccess
nvda
oising
oldnewthing
opengl
osgwiki
Ottosson
pabhojwa
Panos
panos
paulcam
pauldotknopf
PGP
Pham
Rincewind
rprichard
Schoonover
shadertoy
Shomnipotence
simioni
Somuah
sonph
sonpham
stakx
talo
thereses
Thysell
Walisch
WDX
Wellons
Westerman
Wirt
Wojciech
zadjii
Zamor
zamora
@@ -65,3 +96,4 @@ Zamora
zljubisic
Zoey
zorio
Zverovich

View File

@@ -1,6 +1,3 @@
# Repeated letters
\b([a-z])\g{-1}{2,}\b
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# marker to ignore all code on line
@@ -10,9 +7,6 @@
# cspell inline
^.*\b[Cc][Ss][Pp][Ee][Ll]{2}:\s*[Dd][Ii][Ss][Aa][Bb][Ll][Ee]-[Ll][Ii][Nn][Ee]\b
# copyright
Copyright (?:\([Cc]\)|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
# patch hunk comments
^@@ -\d+(?:,\d+|) \+\d+(?:,\d+|) @@ .*
# git index header
@@ -21,9 +15,6 @@ index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
# file permissions
['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s]
# css fonts
\bfont(?:-family|):[^;}]+
# css url wrappings
\burl\([^)]+\)
@@ -41,6 +32,9 @@ index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
# https/http/file urls
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]
# https/http/file urls
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,}
@@ -75,8 +69,6 @@ magnet:[?=:\w]+
# Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
# AWS ARN
arn:aws:[-/:\w]+
# AWS S3
\b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]*
# AWS execute-api
@@ -103,8 +95,6 @@ vpc-\w+
\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]*
# Google APIs
\bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+
# Google Artifact Registry
\.pkg\.dev(?:/[-\w]+)+(?::[-\w]+|)
# Google Storage
\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|)
# Google Calendar
@@ -140,8 +130,6 @@ themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+.
\bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+
# Google Colab Research Drive
\bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]*
# Google Cloud regions
(?:us|(?:north|south)america|europe|asia|australia|me|africa)-(?:north|south|east|west|central){1,2}\d+
# GitHub SHAs (api)
\bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b
@@ -180,12 +168,6 @@ GHSA(?:-[0-9a-z]{4}){3}
# GitLab commits
\bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b
# #includes
^\s*#include\s*(?:<.*?>|".*?")
# #pragma lib
^\s*#pragma comment\(lib, ".*?"\)
# binance
accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
@@ -238,7 +220,7 @@ accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
\bmedium\.com/@?[^/\s"]+/[-\w]+
# microsoft
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]*
# powerbi
\bapp\.powerbi\.com/reportEmbed/[^"' ]*
# vs devops
@@ -412,7 +394,7 @@ ipfs://[0-9a-zA-Z]{3,}
\bgetopts\s+(?:"[^"]+"|'[^']+')
# ANSI color codes
(?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+)*m
(?:\\(?:u00|x)1[Bb]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+|)m
# URL escaped characters
%[0-9A-F][A-F](?=[A-Za-z])
@@ -449,14 +431,10 @@ sha\d+:[0-9a-f]*?[a-f]{3,}[0-9a-f]*
# pki (base64)
LS0tLS1CRUdJT.*
# C# includes
^\s*using [^;]+;
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
(?:[\\0][xX]|\\u|[uU]\+|#x?|%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
# integrity
integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1}
@@ -474,10 +452,7 @@ integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1}
Name\[[^\]]+\]=.*
# IServiceProvider / isAThing
(?:(?:\b|_|(?<=[a-z]))I|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
# python
\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,})
(?:\b|_)(?:(?:ns|)I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
# crypt
(['"])\$2[ayb]\$.{56}\g{-1}
@@ -491,14 +466,17 @@ Name\[[^\]]+\]=.*
# machine learning (?)
\b(?i)ml(?=[a-z]{2,})
# python
\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,})
# scrypt / argon
\$(?:scrypt|argon\d+[di]*)\$\S+
# go.sum
\bh1:\S+
# imports
^import\s+(?:(?:static|type)\s+|)(?:[\w.]|\{\s*\w*?(?:,\s*(?:\w*|\*))+\s*\})+
# scala imports
^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+
# scala modules
("[^"]+"\s*%%?\s*){2,3}"[^"]+"
@@ -507,7 +485,7 @@ Name\[[^\]]+\]=.*
image: [-\w./:@]+
# Docker images
^\s*(?i)FROM\s+\S+:\S+(?:\s+AS\s+\S+|)
^\s*FROM\s+\S+:\S+(?:\s+AS\s+\S+|)
# `docker images` REPOSITORY TAG IMAGE ID CREATED SIZE
\s*\S+/\S+\s+\S+\s+[0-9a-f]{8,}\s+\d+\s+(?:hour|day|week)s ago\s+[\d.]+[KMGT]B
@@ -523,7 +501,6 @@ content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
# The `(?=.*?")` suffix should limit the false positives rate
# printf
#%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA])(?=[a-zA-Z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"])
# Alternative printf
# %s
%(?:s(?=[a-z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%[^s])\b)(?=.*?['"])
@@ -547,7 +524,7 @@ content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
# javascript replace regex
\.replace\(/[^/\s"]{3,}/[gim]*\s*,
# assign regex
= /[^*].*?(?:[a-z]{3,}|[A-Z]{3,}|[A-Z][a-z]{2,}).*/[gim]*(?=\W|$)
= /[^*].*?(?:[a-z]{3,}|[A-Z]{3,}|[A-Z][a-z]{2,}).*/[gi]?(?=\W|$)
# perl regex test
[!=]~ (?:/.*/|m\{.*?\}|m<.*?>|m([|!/@#,;']).*?\g{-1})
@@ -561,7 +538,7 @@ perl(?:\s+-[a-zA-Z]\w*)+
(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()
# Go regular expressions
regexp?\.MustCompile\((?:`[^`]*`|".*"|'.*')\)
regexp?\.MustCompile\(`[^`]*`\)
# regex choice
\(\?:[^)]+\|[^)]+\)
@@ -609,7 +586,7 @@ urn:shemas-jetbrains-com
# xcode
# xcodeproject scenes
(?:Controller|destination|(?:first|second)Item|ID|id)="\w{3}-\w{2}-\w{3}"
(?:Controller|destination|ID|id)="\w{3}-\w{2}-\w{3}"
# xcode api botches
customObjectInstantitationMethod
@@ -624,17 +601,14 @@ PrependWithABINamepsace
\.fa-[-a-z0-9]+
# bearer auth
(['"])[Bb]ear[e][r] .{3,}?\g{-1}
(['"])[Bb]ear[e][r] .*?\g{-1}
# bearer auth
\b[Bb]ear[e][r]:? [-a-zA-Z=;:/0-9+.]{3,}
\b[Bb]ear[e][r]:? [-a-zA-Z=;:/0-9+.]+
# basic auth
(['"])[Bb]asic [-a-zA-Z=;:/0-9+]{3,}\g{-1}
# basic auth
: [Bb]asic [-a-zA-Z=;:/0-9+.]{3,}
# base64 encoded content
#([`'"])[-a-zA-Z=;:/0-9+]{3,}=\g{-1}
# base64 encoded content in xml/sgml
@@ -646,9 +620,6 @@ PrependWithABINamepsace
# base64 encoded pkcs
#\bMII[-a-zA-Z=;:/0-9+]+
# uuencoded
#[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]{40,}
# DNS rr data
#(?:\d+\s+){3}(?:[-+/=.\w]{2,}\s*){1,2}
@@ -659,7 +630,7 @@ PrependWithABINamepsace
\bnumer\b(?=.*denom)
# Time Zones
\b(?:Africa|Atlantic|America|Antarctica|Arctic|Asia|Australia|Europe|Indian|Pacific)(?:/[-\w]+)+
\b(?:Africa|Atlantic|America|Antarctica|Asia|Australia|Europe|Indian|Pacific)(?:/\w+)+
# linux kernel info
^(?:bugs|flags|Features)\s+:.*
@@ -705,17 +676,11 @@ TeX/AMS
"varsIgnorePattern": ".+"
# nolint
nolint:\s*[\w,]+
nolint:\w+
# Windows short paths
[/\\][^/\\]{5,6}~\d{1,2}(?=[/\\])
# Windows Resources with accelerators
\b[A-Z]&[a-z]+\b(?!;)
# signed off by
(?i)Signed-off-by: .*
# cygwin paths
/cygdrive/[a-zA-Z]/(?:Program Files(?: \(.*?\)| ?)(?:/[-+.~\\/()\w ]+)*|[-+.~\\/()\w])+
@@ -750,29 +715,29 @@ W/"[^"]+"
# Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker`
#(?:^|[\t ,>"'`=(#])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
#(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# Compiler flags (Windows / PowerShell)
# This is a subset of the more general compiler flags pattern.
# It avoids matching `-Path` to prevent it from being treated as `ath`
#(?:^|[\t ,"'`=(#])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))
#(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))
# Compiler flags (linker)
,-B
# libraries
#(?:\b|_)[Ll]ib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
# iSCSI iqn (approximate regex)
\biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b
#(?:\b|_)lib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
# WWNN/WWPN (NAA identifiers)
\b(?:0x)?10[0-9a-f]{14}\b|\b(?:0x|3)?[25][0-9a-f]{15}\b|\b(?:0x|3)?6[0-9a-f]{31}\b
# iSCSI iqn (approximate regex)
\biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b
# curl arguments
\b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
# set arguments
\b(?:bash|sh|set)(?:\s+[-+][abefimouxE]{1,2})*\s+[-+][abefimouxE]{3,}(?:\s+[-+][abefimouxE]+)*
\b(?:bash|sh|set)(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)*
# tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...

View File

@@ -97,7 +97,7 @@ Resources/(?!en)
^doc/reference/UTF8-torture-test\.txt$
^doc/reference/windows-terminal-logo\.ans$
^NOTICE.md
^oss/.*?/
^oss/
^samples/PixelShaders/Screenshots/
^src/cascadia/TerminalSettingsEditor/SegoeFluentIconList.h$
^src/interactivity/onecore/BgfxEngine\.
@@ -121,8 +121,8 @@ Resources/(?!en)
^tools/ReleaseEngineering/ServicingPipeline\.ps1$
^XamlStyler\.json$
^\.github/actions/spelling/
^\.github/workflows/spelling\d*\.yml$
^\.vsconfig$
^\Q.github/workflows/spelling.yml\E$
^\Qbuild/config/release.gdnbaselines\E$
^\Qdep/WinAppDriver/EULA.rtf\E$
^\Qdoc/reference/windows-terminal-logo.ans\E$
@@ -133,4 +133,3 @@ Resources/(?!en)
^\Qsrc/terminal/parser/ft_fuzzwrapper/run.bat\E$
^\Qsrc/tools/lnkd/lnkd.bat\E$
^\Qsrc/tools/pixels/pixels.bat\E$
^\Qsrc/cascadia/ut_app/FzfTests.cpp\E$

View File

@@ -1,19 +1,38 @@
AAAAAABBBBBBCCC
AAAAABBBBBBCCC
abcd
ABCDEFGHIJ
abcdefghijk
ABCDEFGHIJKLMNOPQRS
ABCDEFGHIJKLMNOPQRST
ABCDEFGHIJKLMNOPQRSTUVWXY
ABCG
ABE
AZZ
BBDM
abf
BBBBB
BBBBBCCC
BBBBCCCCC
BBGGRR
CBN
cbt
Ccc
cch
EFG
efg
EFGh
efgh
fdw
fesb
ffd
FFFD
KLMNOQQQQQQQQQQ
QQQQQQQQQQABCDEFGHIJ
QQQQQQQQQQABCDEFGHIJKLMNOPQRS
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQ
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQQ
QQQQQQQQQQABCDEFGHIJPQRST
QQQQQQQQQQABCDEFGHIJPQRSTQQQQQQQQQQ
qwerty
qwertyuiopasdfg
ZAAZZ
ZABBZ
ZBAZZ
ZBBBZ
ZBBZZ
ZYXWVUT
zzf
ZZBBZ
ZZZBB
ZZZBZ
ZZZZZ

View File

@@ -2,7 +2,7 @@ aaaaabbb
aabbcc
ABANDONFONT
abbcc
abcc
ABCF
abgr
ABORTIFHUNG
ACCESSTOKEN
@@ -26,11 +26,13 @@ AImpl
AInplace
ALIGNRIGHT
allocing
allocs
alpc
ALTERNATENAME
ALTF
ALTNUMPAD
ALWAYSTIP
aml
ansicpg
ANSISYS
ANSISYSRC
@@ -47,17 +49,22 @@ APIENTRY
apiset
APPBARDATA
appcontainer
appium
appletname
applicationmodel
APPLMODAL
Applocal
appmodel
appshellintegration
APPWINDOW
APPXMANIFESTVERSION
APrep
apsect
APSTUDIO
archeologists
Argb
ARRAYSIZE
ARROWKEYS
asan
ASBSET
ASetting
ASingle
@@ -65,11 +72,11 @@ ASYNCDONTCARE
ASYNCWINDOWPOS
atch
ATest
atg
aumid
Authenticode
AUTOBUDDY
AUTOCHECKBOX
autocrlf
autohide
AUTOHSCROLL
automagically
@@ -84,8 +91,10 @@ AZZ
backgrounded
Backgrounder
backgrounding
backported
backstory
Bazz
bbb
bbccb
BBDM
bbwe
@@ -113,14 +122,12 @@ bitmasks
BITOPERATION
BKCOLOR
BKGND
BKMK
Bksp
blds
Blt
blu
BLUESCROLL
bmi
bodgy
BODGY
BOLDFONT
Borland
boutput
@@ -139,7 +146,9 @@ buflen
buildsystems
buildtransitive
BValue
Cacafire
bytebuffer
cac
cacafire
CALLCONV
CANDRABINDU
capslock
@@ -150,6 +159,12 @@ catid
cazamor
CBash
cbiex
CBN
cbt
Ccc
CCCBB
CCCDDD
cch
CCHAR
CCmd
ccolor
@@ -164,14 +179,15 @@ cfie
cfiex
cfte
CFuzz
cgmanifest
cgscrn
chafa
changelists
CHARSETINFO
chh
chshdng
CHT
CLASSSTRING
CLE
cleartype
CLICKACTIVE
clickdown
@@ -181,7 +197,6 @@ CLIPCHILDREN
CLIPSIBLINGS
closetest
cloudconsole
CLOUDT
cloudvault
CLSCTX
clsids
@@ -195,7 +210,9 @@ cmw
CNL
cnn
Codeflow
codenav
codepages
codepath
coinit
colorizing
COLORONCOLOR
@@ -207,8 +224,13 @@ colortbl
colortest
colortool
COLORVALUE
combaseapi
comctl
commandline
commctrl
commdlg
COMMITID
componentization
conapi
conattrs
conbufferout
@@ -226,6 +248,7 @@ conintegrityuwp
coninteractivitybase
coninteractivityonecore
coninteractivitywin
conio
coniosrv
CONKBD
conlibk
@@ -238,13 +261,13 @@ conpropsp
conpty
conptylib
conserv
consoleaccessibility
consoleapi
CONSOLECONTROL
CONSOLEENDTASK
consolegit
consolehost
CONSOLEIME
consoleinternal
CONSOLESETFOREGROUND
consoletaeftemplates
consoleuwp
@@ -252,6 +275,7 @@ Consolewait
CONSOLEWINDOWOWNER
consrv
constexprable
constness
contentfiles
conterm
contsf
@@ -285,6 +309,7 @@ csbi
csbiex
CSHORT
Cspace
csrmsg
CSRSS
csrutil
CSTYLE
@@ -341,14 +366,16 @@ DBGFONTS
DBGOUTPUT
dbh
dblclk
DBUILD
Dcd
DColor
DCOMMON
dcommon
DComposition
dde
DDDCCC
DDESHARE
DDevice
DEADCHAR
dealloc
Debian
debugtype
DECAC
@@ -453,16 +480,18 @@ DELAYLOAD
DELETEONRELEASE
depersist
deprioritized
deserializers
desktopwindowxamlsource
devicecode
Dext
DFactory
DFF
dialogbox
DINLINE
directio
DIRECTX
DISABLEDELAYEDEXPANSION
DISABLENOSCROLL
DISPATCHNOTIFY
DISPLAYATTRIBUTE
DISPLAYCHANGE
distros
@@ -499,10 +528,9 @@ dsm
dsound
DSSCL
DSwap
DTest
DTo
DTTERM
DUNICODE
DUNIT
dup'ed
dvi
dwl
@@ -512,6 +540,8 @@ dwmapi
DWORDs
dwrite
dxgi
dxgidwm
dxinterop
dxsm
dxttbmp
Dyreen
@@ -525,6 +555,7 @@ EDITKEYS
EDITTEXT
EDITUPDATE
Efast
efghijklmn
EHsc
EINS
ELEMENTNOTAVAILABLE
@@ -533,6 +564,7 @@ enabledelayedexpansion
ENDCAP
endptr
ENTIREBUFFER
entrypoints
ENU
ENUMLOGFONT
ENUMLOGFONTEX
@@ -547,6 +579,7 @@ esrp
ESV
ETW
EUDC
EVENTID
eventing
evflags
evt
@@ -568,6 +601,16 @@ FACESIZE
FAILIFTHERE
fastlink
fcharset
FDEA
fdw
FECF
FEEF
fesb
FFAF
ffd
FFDE
FFFD
FFFDb
fgbg
FGCOLOR
FGHIJ
@@ -585,6 +628,7 @@ FINDDLG
FINDDOWN
FINDREGEX
FINDSTRINGEXACT
FINDUP
FITZPATRICK
FIXEDFILEINFO
Flg
@@ -605,7 +649,6 @@ FONTSTRING
FONTTYPE
FONTWIDTH
FONTWINDOW
foob
FORCEOFFFEEDBACK
FORCEONFEEDBACK
FRAMECHANGED
@@ -619,14 +662,13 @@ Ftm
Fullscreens
Fullwidth
FUNCTIONCALL
fuzzer
fuzzmain
fuzzmap
fuzzwrapper
fuzzyfinder
fwdecl
fwe
fwlink
fzf
gci
gcx
gdi
@@ -682,7 +724,6 @@ GETWHEELSCROLLCHARS
GETWHEELSCROLLLINES
Gfun
gfx
gfycat
GGI
GHgh
GHIJK
@@ -703,7 +744,6 @@ Greyscale
gridline
gset
gsl
Guake
guc
GUIDATOM
GValue
@@ -733,6 +773,7 @@ hfind
hfont
hfontresource
hglobal
hhh
hhook
hhx
HIBYTE
@@ -748,6 +789,7 @@ HKCU
hkey
hkl
HKLM
hlocal
hlsl
HMB
HMK
@@ -766,6 +808,7 @@ HREDRAW
hresult
hscroll
hstr
hstring
HTBOTTOMLEFT
HTBOTTOMRIGHT
HTCAPTION
@@ -794,12 +837,14 @@ idl
idllib
IDOK
IDR
idth
IDTo
IDXGI
IFACEMETHODIMP
ification
IGNORELANGUAGE
iid
IInput
IIo
ILC
ILCo
@@ -813,18 +858,20 @@ INFOEX
inheritcursor
INITCOMMONCONTROLSEX
INITDIALOG
INITGUID
initguid
INITMENU
inkscape
INLINEPREFIX
inproc
Inputkeyinfo
inputpaneinterop
Inputreadhandledata
INPUTSCOPE
INSERTMODE
INTERACTIVITYBASE
INTERCEPTCOPYPASTE
INTERNALNAME
Interner
intsafe
INVALIDARG
INVALIDATERECT
@@ -836,6 +883,8 @@ itermcolors
itf
Ith
IUI
IUnknown
ivalid
IWIC
IXP
jconcpp
@@ -859,6 +908,7 @@ keydowns
KEYFIRST
KEYLAST
Keymapping
keyscan
keystate
keyups
Kickstart
@@ -868,6 +918,10 @@ kinda
KIYEOK
KLF
KLMNO
KLMNOPQRST
KLMNOPQRSTQQQQQ
KLMNOPQRSTUVWXY
KLMNOPQRSTY
KOK
KPRIORITY
KVM
@@ -889,8 +943,6 @@ LCONTROL
LCTRL
lcx
LEFTALIGN
libsancov
libtickit
LIMITTEXT
LINEDOWN
LINESELECTION
@@ -995,7 +1047,6 @@ MBUTTONDOWN
MBUTTONUP
mdmerge
MDs
mdtauk
MEASUREITEM
megamix
memallocator
@@ -1005,6 +1056,7 @@ MENUCONTROL
MENUDROPALIGNMENT
MENUITEMINFO
MENUSELECT
messageext
metaproj
Mgrs
microsoftpublicsymbols
@@ -1021,9 +1073,11 @@ minwindef
MMBB
mmcc
MMCPL
mmsystem
MNC
MNOPQ
MNOPQR
MNOPQRSTUVWXY
MODALFRAME
MODERNCORE
MONITORINFO
@@ -1035,6 +1089,7 @@ MOUSEHWHEEL
MOVESTART
msb
msbuildcache
msctf
msctls
msdata
MSDL
@@ -1049,9 +1104,10 @@ MSGSELECTMODE
msiexec
MSIL
msix
MSRC
msrc
MSVCRTD
MTSM
Munged
murmurhash
muxes
myapplet
@@ -1090,6 +1146,7 @@ Newtonsoft
NEXTLINE
nfe
NLSMODE
nnn
NOACTIVATE
NOAPPLYNOW
NOCLIP
@@ -1142,31 +1199,40 @@ NPFS
nrcs
NSTATUS
ntapi
ntcon
ntcsrdll
ntdef
NTDEV
ntdll
ntifs
ntlpcapi
ntm
ntrtl
ntstatus
nttree
nturtl
ntuser
NTVDM
ntverp
nugetversions
NUKTA
nullness
nullonfailure
nullopts
numlock
NUMSCROLL
NUnit
nupkg
NVIDIA
NVT
OACR
objbase
ocolor
oemcp
OEMFONT
OEMFORMAT
OEMs
offboarded
OLEAUT
OLECHAR
onebranch
@@ -1180,7 +1246,6 @@ onecoreuuid
ONECOREWINDOWS
onehalf
oneseq
oob
openbash
opencode
opencon
@@ -1216,6 +1281,7 @@ PALPC
pankaj
parentable
PATCOPY
pathcch
PATTERNID
pbstr
pcb
@@ -1270,6 +1336,7 @@ phicon
phwnd
pidl
PIDLIST
pids
pii
piml
pimpl
@@ -1294,9 +1361,11 @@ POINTERUPDATE
POINTSLIST
policheck
POLYTEXTW
poppack
POPUPATTR
popups
PORFLG
positionals
POSTCHARBREAKS
POSX
POSXSCROLL
@@ -1329,9 +1398,11 @@ PREVLINE
prg
pri
prioritization
processenv
processhost
PROCESSINFOCLASS
PRODEXT
Productize
PROPERTYID
PROPERTYKEY
propertyval
@@ -1343,12 +1414,15 @@ propsys
PROPTITLE
propvar
propvariant
propvarutil
psa
PSECURITY
pseudoconsole
pseudoterminal
psh
pshn
PSHNOTIFY
pshpack
PSINGLE
psl
psldl
@@ -1420,6 +1494,8 @@ REGISTERVDM
regkey
REGSTR
RELBINPATH
remoting
renamer
rendersize
reparented
reparenting
@@ -1454,16 +1530,19 @@ RIGHTALIGN
RIGHTBUTTON
riid
ris
roadmap
robomac
rodata
rosetta
RRF
rrr
RRRGGGBB
rsas
rtcore
RTEXT
RTLREADING
Rtn
ruleset
runas
RUNDLL
runformat
@@ -1481,6 +1560,7 @@ rvpa
RWIN
rxvt
safemath
sancov
sba
SBCS
SBCSDBCS
@@ -1508,8 +1588,10 @@ SCROLLSCREENBUFFER
scursor
sddl
SDKDDK
securityappcontainer
segfault
SELCHANGE
SELECTALL
SELECTEDFONT
SELECTSTRING
Selfhosters
@@ -1553,10 +1635,14 @@ SFUI
sgr
SHCo
shcore
shellapi
shellex
shellscalingapi
SHFILEINFO
SHGFI
SHIFTJIS
shlguid
shlobj
shlwapi
SHORTPATH
SHOWCURSOR
@@ -1591,9 +1677,9 @@ SMARTQUOTE
SMTO
snapcx
snapcy
snk
SOLIDBOX
Solutiondir
somefile
sourced
SRCAND
SRCCODEPAGE
@@ -1625,8 +1711,9 @@ STDEXT
STDMETHODCALLTYPE
STDMETHODIMP
STGM
Stringable
STRINGTABLE
STRSAFE
strsafe
STUBHEAD
STUVWX
stylecop
@@ -1652,27 +1739,32 @@ SYSLIB
SYSLINK
SYSMENU
sysparams
sysparamsext
SYSTEMHAND
SYSTEMMENU
SYSTEMTIME
tabview
TAdd
taef
TARG
targetentrypoint
TARGETLIBS
TARGETNAME
targetver
TBase
tbc
tbi
Tbl
TBM
TCHAR
tchar
TCHFORMAT
TCI
tcommands
tdbuild
Tdd
TDelegated
TDP
tearoff
Teb
Techo
tellp
@@ -1682,6 +1774,7 @@ terminalinput
terminalrenderdata
TERMINALSCROLLING
terminfo
TEs
testcon
testd
testenvs
@@ -1693,6 +1786,7 @@ TESTNULL
testpass
testpasses
TEXCOORD
TExpected
textattribute
TEXTATTRIBUTEID
textboxes
@@ -1703,28 +1797,39 @@ TEXTMETRIC
TEXTMETRICW
textmode
texttests
TFunction
THUMBPOSITION
THUMBTRACK
tickit
TIcon
tilunittests
titlebars
TITLEISLINKNAME
TJson
TLambda
TLDP
TLEN
TMAE
TMPF
TMult
tmultiple
TODOs
tofrom
tokenhelpers
toolbars
TOOLINFO
TOOLWINDOW
TOPDOWNDIB
TOpt
tosign
touchpad
tracelogging
traceviewpp
trackbar
trackpad
transitioning
Trd
TREX
triaged
triaging
TRIMZEROHEADINGS
@@ -1732,7 +1837,9 @@ trx
tsa
tsgr
tsm
TStr
TSTRFORMAT
TSub
TTBITMAP
TTFONT
TTFONTLIST
@@ -1741,6 +1848,7 @@ TTo
tvpp
tvtseq
TYUI
UAC
uap
uapadmin
UAX
@@ -1776,6 +1884,7 @@ unk
unknwn
UNORM
unparseable
Unregistering
untextured
UPDATEDISPLAY
UPDOWN
@@ -1793,6 +1902,7 @@ USEFILLATTRIBUTE
USEGLYPHCHARS
USEHICON
USEPOSITION
USERDATA
userdpiapi
Userp
userprivapi
@@ -1805,6 +1915,7 @@ USRDLL
utext
utr
UVWXY
UVWXYZ
uwa
uwp
uwu
@@ -1813,16 +1924,17 @@ Vanara
vararg
vclib
vcxitems
vectorize
VERCTRL
VERTBAR
VFT
vga
vgaoem
viewkind
viewports
VIRAMA
Virt
VIRTTERM
visualstudiosdk
vkey
VKKEYSCAN
VMs
@@ -1833,7 +1945,6 @@ VPACKMANIFESTDIRECTORY
VPR
VREDRAW
vsc
vsconfig
vscprintf
VSCROLL
vsdevshell
@@ -1881,6 +1992,7 @@ wekyb
wewoad
wex
wextest
wextestclass
WFill
wfopen
WHelper
@@ -1891,7 +2003,9 @@ Wiggum
wil
WImpl
WINAPI
winbase
winbasep
wincodec
wincon
winconp
winconpty
@@ -1906,8 +2020,10 @@ windll
WINDOWALPHA
windowdpiapi
WINDOWEDGE
windowext
WINDOWINFO
windowio
windowmetrics
WINDOWPLACEMENT
windowpos
WINDOWPOSCHANGED
@@ -1915,15 +2031,20 @@ WINDOWPOSCHANGING
windowproc
windowrect
windowsapp
windowsinternalstring
WINDOWSIZE
windowsshell
windowsterminal
windowsx
windowtheme
winevent
wingdi
winget
wingetcreate
WINIDE
winioctl
winmd
winmeta
winmgr
winmm
WINMSAPP
@@ -1933,8 +2054,8 @@ WInplace
winres
winrt
winternl
winui
winuser
winuserp
WINVER
wistd
wmain
@@ -1971,9 +2092,10 @@ WRITECONSOLEINPUT
WRITECONSOLEOUTPUT
WRITECONSOLEOUTPUTSTRING
wrkstr
WRL
wrl
wrp
WRunoff
wsl
WSLENV
wstr
wstrings
@@ -1986,7 +2108,7 @@ wtof
WTs
WTSOFTFONT
wtw
Wtypes
wtypes
WUX
WVerify
WWith
@@ -2005,6 +2127,7 @@ XBUTTONDOWN
XBUTTONUP
XCast
XCENTER
xchar
xcopy
XCount
xdy
@@ -2014,7 +2137,6 @@ XFG
XFile
XFORM
XIn
xkcd
XManifest
XMath
XNamespace
@@ -2041,6 +2163,7 @@ YLimit
YPan
YSubstantial
YVIRTUALSCREEN
Zab
zabcd
Zabcdefghijklmn
Zabcdefghijklmnopqrstuvwxyz
@@ -2049,3 +2172,4 @@ ZCtrl
ZWJs
ZYXWVU
ZYXWVUTd
zzf

View File

@@ -8,24 +8,6 @@
# you might not want to check in code where you skip all the other tests.
#\bfit\(
# English does not use a hyphen between adverbs and nouns
# https://twitter.com/nyttypos/status/1894815686192685239
(?:^|\s)[A-Z]?[a-z]+ly-(?=[a-z]{3,})(?:[.,?!]?\s|$)
# Don't use `requires that` + `to be`
# https://twitter.com/nyttypos/status/1894816551435641027
\brequires that \w+\b[^.]+to be\b
# A fully parenthetical sentences period goes inside the parentheses, not outside.
# https://twitter.com/nyttypos/status/1898844061873639490
\([A-Z][a-z]{2,}(?: [a-z]+){3,}\)\.\s
# Complete sentences shouldn't be in the middle of another sentence as a parenthetical.
(?<!\.)(?<!\betc)\.\),
# Complete sentences in parentheticals should not have a space before the period.
\s\.\)(?!.*\}\})
# Should be `HH:MM:SS`
\bHH:SS:MM\b
@@ -42,52 +24,18 @@
# Should be `a priori` or `and prior`
(?i)(?<!posteriori)\sand priori\s
# Should be `a`
\san (?=(?:[b-df-gj-np-rtv-xz]|h(?!our|sl|tml|ttp)|s(?!sh|vg))[a-z])
# Should only be one of `a`, `an`, or `the`
\b(?:(?:an?|the)\s+){2,}\b
# Should only be `are` or `can`, not both
\b(?:(?:are|can)\s+){2,}\b
# Should probably be `ABCDEFGHIJKLMNOPQRSTUVWXYZ`
(?i)(?!ABCDEFGHIJKLMNOPQRSTUVWXYZ)ABC[A-Z]{21}YZ
# Should be `an`
(?<!\b[Ii] )\bam\b
# Should be `anymore`
\bany more[,.]
# Should be `Ask`
(?:^|[.?]\s+)As\s+[A-Z][a-z]{2,}\s[^.?]*?(?:how|if|wh\w+)\b
# Should be `at one fell swoop`
# and only when talking about killing, not some other completion
# Act 4 Scene 3, Macbeth
# https://www.opensourceshakespeare.org/views/plays/play_view.php?WorkID=macbeth&Act=4&Scene=3&Scope=scene
\bin one fell s[lw]?oop\b
# Should be `'`
(?i)\b(?:(?:i|s?he|they|what|who|you)[`"]ll|(?:are|ca|did|do|does|ha[ds]|have|is|should|were|wo|would)n[`"]t|(?:s?he|let|that|there|what|where|who)[`"]s|(?:i|they|we|what|who|you)[`"]ve)\b
# Should be `background` / `intro text` / `introduction` / `prologue` unless it's a brand or relates to _subterfuge_
(?i)\bpretext\b
# Should be `bearer`
\b(?<=the )burden(?= of bad news\b)
# Should be `branches`
# ... unless it's really about the meal that replaces breakfast and lunch.
\b[Bb]runches\b
(?i)\b(?:(?:i|s?he|they|what|who|you)"ll|(?:are|ca|did|do|does|ha[ds]|have|is|should|were|wo|would)n"t|(?:s?he|let|that|there|what|where|who)"s|(?:i|they|we|what|who|you)"ve)\b
# Should be `briefcase`
\bbrief-case\b
# Should be `by far` or `far and away`
\bby far and away\b
# Should be `can, not only ..., ... also...`
\bcan not only.*can also\b
@@ -98,10 +46,7 @@
# > In formal writing and where contractions are frowned upon, use `cannot`.
# > It is possible to write `can not`, but you generally find it only as part of some other construction, such as `not only . . . but also.`
# - if you encounter such a case, add a pattern for that case to patterns.txt.
\b[Cc]an not\b(?! only\b)
# Should be `chart`
(?i)\bhelm\b.*\bchard\b
\b[Cc]an not\b
# Do not use `(click) here` links
# For more information, see:
@@ -111,27 +56,9 @@
# * https://heyoka.medium.com/dont-use-click-here-f32f445d1021
(?i)(?:>|\[)(?:(?:click |)here|link|(?:read |)more)(?:</|\]\()
# Including "image of" or "picture of" in alt text is unnecessary.
\balt=['"](?:an? |)(?:image|picture) of
# Alt text should be short
\balt=(?:'[^']{126,}'|"[^"]{126,}")
# Should be `equals` to `is equal to`
\bequals to\b
# Should be `ECMA` 262 (JavaScript)
(?i)\bTS\/EMCA\b|\bEMCA(?: \d|\s*Script)|\bEMCA\b(?=.*\bTS\b)
# Should be `ECMA` 340 (Near Field Communications)
(?i)EMCA[- ]340
# Should be `fall back`
(?<!\ba )(?<!\bthe )\bfallback(?= to(?! ask))\b
# Should be `for`, `for, to` or `to`
\b(?:for to|to for)\b
# Should be `GitHub`
(?<![&*.]|// |\b(?:from|import|type) )\bGithub\b(?![{()])
@@ -157,14 +84,11 @@
# Should be `RabbitMQ`
\bRabbitmq\b
# Should be `TensorFlow`
\bTensorflow\b
# Should be `TypeScript`
\bTypescript\b
# Should be `another`
\ban[- ]other(?!-)\b
\ban[- ]other\b
# Should be `case-(in)sensitive`
\bcase (?:in|)sensitive\b
@@ -184,14 +108,11 @@
# Should be `here-in`, `the`, `them`, `this`, `these` or reworded in some other way
\bthe here(?:\.|,| (?!and|defined))
# Should be `going to bed` or `going to a bad`
\bgoing to bad(?!-)\b
# Should be `greater than`
#\bhigher than\b
# Should be `ID` (unless it's a flag/property)
#(?<![-\.])\bId\b(?![(])
# Should be `ID`
#\bId\b
# Should be `in front of`
\bin from of\b
@@ -204,12 +125,6 @@
# Should be `use`
\sin used by\b
# Should be `in-depth` if used as an adjective (but `in depth` when used as an adverb)
\bin depth\s(?!rather\b)\w{6,}
# Should be `in-flight` or `on the fly` (unless actually talking about airline flights)
\bon[- ]flight\b(?!=\s+(?:(?:\w{2}|)\d+|availability|booking|computer|data|delay|departure|management|performance|radar|reservation|scheduling|software|status|ticket|time|type|.*(?:hotel|taxi)))
# Should be `is obsolete`
\bis obsolescent\b
@@ -217,10 +132,7 @@
\bits[']
# Should be `its`
\bit's(?= (?:child|only purpose|own(?:er|)|parent|sibling)\b)
# Should be `for its` (possessive) or `because it is`
\bfor it(?:'s| is)\b
\bit's(?= own\b)
# Should be `log in`
\blogin to the
@@ -228,25 +140,6 @@
# Should be `long-standing`
\blong standing\b
# Should be `lose`
(?<=\bwill )loose\b
# `apt-key` is deprecated
# ... instead you should be writing a pair of files:
# ... * the gpg key added to a distinct key ring file based on your project/distro/key...
# ... * the sources.list in a district file -- not simply appended to `/etc/apt/sources.list` -- (there is a newer format [DEB822](https://manpages.debian.org/bookworm/dpkg-dev/deb822.5.en.html)) that references the gpg key.
# Consider:
# ````sh
# curl http://download.something.example.com/$DISTRO/Release.key | \
# gpg --dearmor --yes --output /usr/share/keyrings/something-distro.gpg
# echo "deb [signed-by=/usr/share/keyrings/something-distro.gpg] http://download.something.example.com/repositories/home:/$DISTRO ./" \
# >> /etc/apt/sources.list.d/something-distro.list
# ````
\bapt-key add\b
# Should be `nearby`
\bnear by\b
# Should probably be a person named `Nick` or the abbreviation `NIC`
\bNic\b
@@ -260,7 +153,7 @@
\bperform it's\b
# Should be `opt-in`
#(?<!\scan|for)(?<!\smust)(?<!\sif)\sopt in\s
#(?<!\scan|for)(?<!\sif)\sopt in\s
# Should be `less than`
\bless then\b
@@ -277,77 +170,24 @@
# Should be `on the other hand`
\b(?i)on another hand\b
# Reword to `on at runtime` or `enabled at launch`
# The former if you mean it can be changed dynamically.
# The latter if you mean that it can be changed without recompiling but not after the program starts.
\bswitched on runtime\b
# Should be `Of course,`
[?.!]\s+Of course\s(?=[-\w\s]+[.?;!,])
# Most people only have two hands. Reword.
\b(?i)on the third hand\b
# Should be `Open Graph`
# unless talking about a specific Open Graph implementation:
# - Java
# - Node
# - Py
# - Ruby
\bOpenGraph\b
# Should be `OpenShift`
\bOpenshift\b
# Should be `otherwise`
\bother[- ]wise\b
# Should be `; otherwise` or `. Otherwise`
# https://study.com/learn/lesson/otherwise-in-a-sentence.html
, [Oo]therwise\b
# Should probably be `Otherwise,`
(?<=\. )Otherwise\s
# Should be `or (more|less)`
\bore (?:more|less)\b
# Should be reworded.
# `passthrough` is an adjective
# `pass-through` could be a noun
# `pass through` would be a verb phrase
\b(?i)passthrough(?= an?\b)
# Should be `rather than`
\brather then\b
# Should be `Red Hat`
\bRed[Hh]at\b
# Should be `regardless, ...` or `regardless of (whether)`
\b[Rr]egardless if you\b
# Should be `self-signed`
\bself signed\b
# Should be `SendGrid`
\bSendgrid\b
# Should be `set up` (`setup` is a noun / `set up` is a verb)
\b[Ss]etup(?= (?:an?|the)\b)
# Should be `state`
\bsate(?=\b|[A-Z])|(?<=[a-z])Sate(?=\b|[A-Z])|(?<=[A-Z]{2})Sate(?=\b|[A-Z])
# Should be `no longer needed`
\bno more needed\b(?! than\b)
# Should be `<see|look> below for the`
(?i)\bfind below the\b
# Should be `then any` unless there's a comparison before the `,`
, than any\b
# Should be `did not exist`
\bwere not existent\b
@@ -357,18 +197,9 @@
# Should be `nonexistent`
\b[Nn]o[nt][- ]existent\b
# Should be `our`
\bspending out time\b
# Should be `@brief` / `@details` / `@param` / `@return` / `@retval`
(?:^\s*|(?:\*|//|/*)\s+`)[\\@](?:breif|(?:detail|detials)|(?:params(?!\.)|prama?)|ret(?:uns?)|retvl)\b
# Should be `more than` or `more, then`
\bmore then\b
# Should be `Pipeline`/`pipeline`
(?:(?<=\b|[A-Z])p|P)ipeLine(?:\b|(?=[A-Z]))
# Should be `preexisting`
[Pp]re[- ]existing
@@ -393,27 +224,14 @@
# Should be `reentrant`
[Rr]e[- ]entrant
# Should be `room for`
\brooms for (?!lease|rent|sale)
# Should be `socioeconomic`
# https://dictionary.cambridge.org/us/dictionary/english/socioeconomic
socio-economic
# Should be `strong suit`
\b(?:my|his|her|their) strong suite\b
# Should probably be `temperatures` unless actually talking about thermal drafts (things birds may fly on)
\bthermals\b
# Should be `there are` or `they are` (or `they're`)
(?i)\btheir are\b
# Should be `understand`
\bunder stand\b
# Should be `URI` or `uri` unless it refers to a person named `Uri` (or a flag)
#(?<![-\.])\bUri\b(?![(])
# Should be `URI` or `uri` unless it refers to a person named `Uri`
#(?<!\.)\bUri\b(?![(])
# Should be `it uses is`
/\bis uses is\b/
@@ -427,36 +245,12 @@ socio-economic
# Should be `where`
\bwere they are\b
# Should be `why`
, way(?= is [^.]*\?)
# should be `vCenter`
\bV[Cc]enter\b
# Should be `VM`
\bVm\b
# Should be `walkthrough(s)`
\bwalk-throughs?\b
# Should be `want`
\bdon't ant\b
# Should be `we'll`
\bwe 'll\b
# Should be `whereas`
\bwhere as\b
# Should be `WinGet`
\bWinget\b
# Should be `without` (unless `out` is a modifier of the next word)
\bwith out\b(?!-)
# Should be `work around`
\b[Ww]orkaround(?= an?\b)
# Should be `workarounds`
#\bwork[- ]arounds\b
@@ -476,12 +270,12 @@ socio-economic
\b(?:coarse|fine) grained\b
# Homoglyph (Cyrillic) should be `A`/`B`/`C`/`E`/`H`/`I`/`I`/`J`/`K`/`M`/`O`/`P`/`S`/`T`/`Y`
# It's possible that your content is intentionally mixing Cyrillic and Latin scripts, but if it isn't, you definitely want to correct this.
# It's possible that your content is intentionally mixing Cyrllic and Latin scripts, but if it isn't, you definitely want to correct this.
(?<=[A-Z]{2})[АВСЕНІӀЈКМОРЅТУ]|[АВСЕНІӀЈКМОРЅТУ](?=[A-Z]+(?:\b|[a-z]+)|[a-z]+(?:[^a-z]|$))
# Homoglyph (Cyrillic) should be `a`/`b`/`c`/`e`/`o`/`p`/`x`/`y`
# It's possible that your content is intentionally mixing Cyrillic and Latin scripts, but if it isn't, you definitely want to correct this.
[авсеорху](?=[A-Za-z]{2,})|(?<=[A-Za-z]{2})[авсеорху]|(?<=[A-Za-z])[авсеорху](?=[A-Za-z])
# Homoglyph (Cyrillic) should be `a`/`b`/`e`
# It's possible that your content is intentionally mixing Cyrllic and Latin scripts, but if it isn't, you definitely want to correct this.
[аве](?=[A-Za-z]{2,})|(?<=[A-Za-z]{2})[аве]|(?<=[A-Za-z])[аве](?=[A-Za-z])
# Should be `neither/nor` -- or reword
#(?!<do )\bnot\b([^.?!"/(](?!neither|,.*?,))+\bnor\b

View File

@@ -1,35 +1,5 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
# Windows accelerators
\b[A-Z][a-z]*&[a-z]+(?!;)\b
# charsets.hpp
\{ L.*\}, // (?:Cyrillic|Greek|Hebrew).*
# Screen buffer tests
\bQQ[A-Z]+\s*[A-Z]*Q+\b
# Unicode references
(?<=\W)(?:U\+?|)[0-9A-F]+b?\b
# Verify
VERIFY_IS_TRUE\(.*\)
# TEST_METHOD(ApiScrollConsoleScreenBufferW)
\bZ[A-Z]+$
# TerminalApiTest
stateMachine\.ProcessString\(L".*"
# bundles
[0-9a-z]+\\?\.msixbundle
# text file names
"[a-z]+\.txt"
# Checksum
L"[0-9A-F]{4}"
# Direct 2D/3D
\b(?:d[23]d(?=[a-z])|D[23]D(?=[A-Z]))
@@ -39,127 +9,39 @@ L"[0-9A-F]{4}"
# Windows Resources with accelerators
\b[A-Z]&[a-z]+\b(?!;)
# bug in check-spelling v0.0.24 (fixed later)
\bok'd\b
# Automatically suggested patterns
# hit-count: 3904 file-count: 577
# IServiceProvider / isAThing
(?:(?:\b|_|(?<=[a-z]))[IT]|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
# hit-count: 2437 file-count: 826
# #includes
^\s*#include\s*(?:<.*?>|".*?")
# hit-count: 1131 file-count: 326
# C# includes
^\s*using [^;]+;
# hit-count: 128 file-count: 47
# hit-count: 83 file-count: 18
# C network byte conversions
(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()
# hit-count: 53 file-count: 10
# ANSI color codes
(?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+)*m
# hit-count: 59 file-count: 36
# IServiceProvider / isAThing
(?:\b|_)(?:(?:ns|)I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
# hit-count: 45 file-count: 29
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# hit-count: 30 file-count: 19
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hit-count: 17 file-count: 7
# File extensions
\*\.[+\w]+,
# hit-count: 15 file-count: 9
# hit-count: 9 file-count: 6
# Markdown anchor links
\(#\S*?[a-zA-Z]\S*?\)
# hit-count: 14 file-count: 8
# hex runs
\b[0-9a-fA-F]{16,}\b
# hit-count: 12 file-count: 8
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
# hit-count: 12 file-count: 7
# tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
# hit-count: 9 file-count: 6
# Repeated letters
\b([a-z])\g{-1}{2,}\b
# hit-count: 8 file-count: 2
# regex choice
\(\?:[^)]+\|[^)]+\)
# hit-count: 8 file-count: 1
# latex (check-spelling >= 0.0.22)
\\\w{2,}\{
# hit-count: 7 file-count: 4
# Python string prefix / binary prefix
# Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings
(?<!['"])\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)['"](?=[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})
# hit-count: 5 file-count: 3
# Alternatively, if you're using check-spelling v0.0.25+, and you would like to _check_ the Non-English content for spelling errors, you can. For information on how to do so, see:
# https://docs.check-spelling.dev/Feature:-Configurable-word-characters.html#unicode
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}
# hit-count: 5 file-count: 5
# libraries
(?:\b|_)lib(?:re(?=office)|)(?!era[lt]|ero|ert(?:ies|y)|rar(?:i(?:an|es)|y))(?=[a-z])
# hit-count: 3 file-count: 3
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,}
# hit-count: 2 file-count: 2
# Alternative printf
# %s
%(?:s(?=[a-z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%[^s])\b)(?=.*?['"])
# File extensions
\*\.[+\w]+,
# hit-count: 2 file-count: 1
# kubernetes crd patterns
^\s*pattern: .*$
# hit-count: 1 file-count: 1
# css fonts
\bfont(?:-family|):[^;}]+
# hit-count: 1 file-count: 1
# microsoft
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
# hit-count: 1 file-count: 1
# Punycode
\bxn--[-0-9a-z]+
# hit-count: 1 file-count: 1
# sha-... -- uses a fancy capture
(\\?['"]|&quot;)[0-9a-f]{40,}\g{-1}
# hit-count: 1 file-count: 1
# Docker images
^\s*(?i)FROM\s+\S+:\S+(?:\s+AS\s+\S+|)
# hit-count: 1 file-count: 1
# WWNN/WWPN (NAA identifiers)
\b(?:0x)?10[0-9a-f]{14}\b|\b(?:0x|3)?[25][0-9a-f]{15}\b|\b(?:0x|3)?6[0-9a-f]{31}\b
# hit-count: 1 file-count: 1
# curl arguments
\b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
# hit-count: 1 file-count: 1
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...
\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b
# bug in check-spelling v0.0.24 (fixed later)
\bok'd\b
https?://\S+
[Pp]ublicKeyToken="?[0-9a-fA-F]{16}"?
(?:[{"]|UniqueIdentifier>)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(?:[}"]|</UniqueIdentifier)
@@ -190,11 +72,24 @@ ROY\sG\.\sBIV
# ARM NEON intrinsics like "vsubq_u16"
\bv\w+_[fsu](?:8|16|32|64)\b
# color floating numbers
0x[0-9a-f](?:\.[0-9a-f]*p)[-+]\d+f
# AppX package
_\d[0-9a-z]{12}['\.]
# string test
equals_insensitive_ascii\("\w+", "\w+"
# Automatically suggested patterns
# hit-count: 3788 file-count: 599
# IServiceProvider / isAThing
\b(?:I|isA)(?=(?:[A-Z][a-z]{2,})+\b)
# hit-count: 314 file-count: 21
# hex runs
\b[0-9a-fA-F]{16,}\b
# hit-count: 47 file-count: 11
# special cased printf markers
\\r\\n(?=[a-z])|(?<!\\)\\[nrt](?=[a-z]{2,})(?=.*(?:<.*['"`]|"(?:[;,]|\);)$|\) \+$))
@@ -202,6 +97,84 @@ equals_insensitive_ascii\("\w+", "\w+"
# ConsoleArgumentsTests
--headless\\.*?"
# hit-count: 109 file-count: 62
# Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker`
(?:^|[\t ,>"'`=(])-(?:D(?=[A-Z])|W(?!ork)|X|f(?=[ms]))(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# hit-count: 60 file-count: 35
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# hit-count: 2 file-count: 2
# This does not cover multiline strings, if your repository has them,
# you'll want to remove the `(?=.*?")` suffix.
# The `(?=.*?")` suffix should limit the false positives rate
# printf
%(?:s)(?!ize)(?=[a-z]{2,})
# hit-count: 16 file-count: 10
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hit-count: 13 file-count: 4
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}
# hit-count: 7 file-count: 5
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
# hit-count: 7 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)
# hit-count: 4 file-count: 4
# tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
# hit-count: 4 file-count: 1
# ANSI color codes
(?:\\(?:u00|x)1[Bb]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+|)m
# hit-count: 4 file-count: 1
# Update Lorem based on your content (requires `ge` and `w` from https://github.com/jsoref/spelling; and `review` from https://github.com/check-spelling/check-spelling/wiki/Looking-for-items-locally )
# grep '^[^#].*lorem' .github/actions/spelling/patterns.txt|perl -pne 's/.*i..\?://;s/\).*//' |tr '|' "\n"|sort -f |xargs -n1 ge|perl -pne 's/^[^:]*://'|sort -u|w|sed -e 's/ .*//'|w|review -
# Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into:
## Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary).
## You could manually change `(?i)X...` to use `[Xx]...`
## or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path)
# Lorem
(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*
# hit-count: 3 file-count: 3
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
# hit-count: 2 file-count: 1
# Python string prefix / binary prefix
# Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings
(?<!')\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'(?=[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})
# hit-count: 1 file-count: 1
# Punycode
\bxn--[-0-9a-z]+
# hit-count: 1 file-count: 1
# latex (check-spelling >= 0.0.22)
\\\w{2,}\{
# hit-count: 1 file-count: 1
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...
\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b
# Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object
# https://www.tprteaching.com/log-into-log-in-to-login/
\b(?:[Ll]og|[Ss]ign) in to\b
# to opt in
\bto opt in\b
# Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object
@@ -210,10 +183,6 @@ equals_insensitive_ascii\("\w+", "\w+"
# to opt in
\bto opt in\b
# pass(ed|ing) in
\bpass(?:ed|ing) in\b
# acceptable duplicates
# ls directory listings
[-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+[.\d]+(?:[KMGT]|)\s+

View File

@@ -1,19 +1,10 @@
^attache$
^attacher$
^attachers$
^bellow?$
^bellow$
benefitting
occurences?
^dependan.*
^develope$
^developement$
^developpe
^Devers?$
^devex
^devide
^Devinn?[ae]
^devisal
^devisor
^diables?$
^oer$
Sorce
@@ -21,5 +12,4 @@ Sorce
^Teh$
^untill$
^untilling$
^venders?$
^wether.*

View File

@@ -8,7 +8,7 @@ where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: '"Needs-Author-Feedback" and "No-Recent-Activity" issues are closed after 3 days of inactivity'
- description:
frequencies:
- hourly:
hour: 3
@@ -23,7 +23,7 @@ configuration:
days: 3
actions:
- closeIssue
- description: '"Needs-Author-Feedback" issues are labelled "No-Recent-Activity" after 4 days of inactivity'
- description:
frequencies:
- hourly:
hour: 3
@@ -41,7 +41,7 @@ configuration:
label: No-Recent-Activity
- addReply:
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
- description: '"Resolution-Duplicate" issues are closed after 1 day of inactivity'
- description:
frequencies:
- hourly:
hour: 3
@@ -56,7 +56,7 @@ configuration:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
- closeIssue
- description: '"Needs-Author-Feedback" and "No-Recent-Activity" PRs are closed after 7 days of inactivity'
- description:
frequencies:
- hourly:
hour: 3
@@ -71,7 +71,7 @@ configuration:
days: 7
actions:
- closeIssue
- description: Add "No-Recent-Activity" label to PRs with "Needs-Author-Feedback" label after 7 days of inactivity
- description:
frequencies:
- hourly:
hour: 3
@@ -90,8 +90,7 @@ configuration:
- addReply:
reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**.
eventResponderTasks:
- description: Add "Needs-Triage" to new issues
if:
- if:
- payloadType: Issues
- or:
- and:
@@ -103,8 +102,8 @@ configuration:
then:
- addLabel:
label: Needs-Triage
- description: Replace "Needs-Author-Feedback" with "Needs-Attention" when author comments
if:
description:
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
@@ -117,8 +116,8 @@ configuration:
label: Needs-Attention
- removeLabel:
label: Needs-Author-Feedback
- description: Remove "No-Recent-Activity" when closing an issue
if:
description:
- if:
- payloadType: Issues
- not:
isAction:
@@ -128,16 +127,16 @@ configuration:
then:
- removeLabel:
label: No-Recent-Activity
- description: Remove "No-Recent-Activity" when someone comments on an issue
if:
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: No-Recent-Activity
then:
- removeLabel:
label: No-Recent-Activity
- description: Add "Needs-Author-Feedback" when changes are requested on a PR
if:
description:
- if:
- payloadType: Pull_Request_Review
- isAction:
action: Submitted
@@ -146,8 +145,8 @@ configuration:
then:
- addLabel:
label: Needs-Author-Feedback
- description: Remove "Needs-Author-Feedback" when author performs activity on their PR
if:
description:
- if:
- payloadType: Pull_Request
- isActivitySender:
issueAuthor: True
@@ -159,8 +158,8 @@ configuration:
then:
- removeLabel:
label: Needs-Author-Feedback
- description: Remove "Needs-Author-Feedback" when author comments on their issue
if:
description:
- if:
- payloadType: Issue_Comment
- isActivitySender:
issueAuthor: True
@@ -169,8 +168,8 @@ configuration:
then:
- removeLabel:
label: Needs-Author-Feedback
- description: Remove "Needs-Author-Feedback" when the author reviews the PR
if:
description:
- if:
- payloadType: Pull_Request_Review
- isActivitySender:
issueAuthor: True
@@ -179,8 +178,8 @@ configuration:
then:
- removeLabel:
label: Needs-Author-Feedback
- description: Remove "No-Recent-Activity"" when activity occurs on the PR (aside from closing it)
if:
description:
- if:
- payloadType: Pull_Request
- not:
isAction:
@@ -190,39 +189,39 @@ configuration:
then:
- removeLabel:
label: No-Recent-Activity
- description: Remove "No-Recent-Activity" when someone comments on the PR
if:
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: No-Recent-Activity
then:
- removeLabel:
label: No-Recent-Activity
- description: Remove "No-Recent-Activity" when someone reviews the PR
if:
description:
- if:
- payloadType: Pull_Request_Review
- hasLabel:
label: No-Recent-Activity
then:
- removeLabel:
label: No-Recent-Activity
- description: Enable auto-merge on PRs with the "AutoMerge" label
if:
description:
- if:
- payloadType: Pull_Request
- hasLabel:
label: AutoMerge
then:
- enableAutoMerge:
mergeMethod: Squash
- description: Disable auto-merge on PRs when the "AutoMerge" label is removed
if:
description:
- if:
- payloadType: Pull_Request
- labelRemoved:
label: AutoMerge
then:
- disableAutoMerge
- description: Add "Needs-Tag-Fix" label to issues without an Area, Issue, or Product label
if:
description:
- if:
- payloadType: Issues
- or:
- and:
@@ -239,45 +238,15 @@ configuration:
- not:
hasLabel:
label: Area-Accessibility
- not:
hasLabel:
label: Area-AtlasEngine
- not:
hasLabel:
label: Area-AzureShell
- not:
hasLabel:
label: Area-Build
- not:
hasLabel:
label: Area-Chat
- not:
hasLabel:
label: Area-CmdPal
- not:
hasLabel:
label: Area-CodeHealth
- not:
hasLabel:
label: Area-Commandline
- not:
hasLabel:
label: Area-CookedRead
- not:
hasLabel:
label: Area-DefApp
- not:
hasLabel:
label: Area-Extensibility
- not:
hasLabel:
label: Area-Fonts
- not:
hasLabel:
label: Area-GroupPolicy
- not:
hasLabel:
label: Area-i18n
- not:
hasLabel:
label: Area-Input
@@ -287,45 +256,21 @@ configuration:
- not:
hasLabel:
label: Area-Interop
- not:
hasLabel:
label: Area-Localization
- not:
hasLabel:
label: Area-Output
- not:
hasLabel:
label: Area-Performance
- not:
hasLabel:
label: Area-Portable
- not:
hasLabel:
label: Area-Quality
- not:
hasLabel:
label: Area-Remoting
- not:
hasLabel:
label: Area-Rendering
- not:
hasLabel:
label: Area-Schema
- not:
hasLabel:
label: Area-Server
- not:
hasLabel:
label: Area-Settings
- not:
hasLabel:
label: Area-SettingsUI
- not:
hasLabel:
label: Area-ShellExtension
- not:
hasLabel:
label: Area-Suggestions
- not:
hasLabel:
label: Area-TerminalConnection
@@ -334,19 +279,49 @@ configuration:
label: Area-TerminalControl
- not:
hasLabel:
label: Area-Theming
- not:
hasLabel:
label: Area-UserInterface
label: Area-User Interface
- not:
hasLabel:
label: Area-VT
- not:
hasLabel:
label: Area-Windowing
label: Area-CodeHealth
- not:
hasLabel:
label: Area-Quality
- not:
hasLabel:
label: Area-AzureShell
- not:
hasLabel:
label: Area-Schema
- not:
hasLabel:
label: Area-Commandline
- not:
hasLabel:
label: Area-ShellExtension
- not:
hasLabel:
label: Area-WPFControl
- not:
hasLabel:
label: Area-Settings UI
- not:
hasLabel:
label: Area-DefApp
- not:
hasLabel:
label: Area-Remoting
- not:
hasLabel:
label: Area-Windowing
- not:
hasLabel:
label: Area-Theming
- not:
hasLabel:
label: Area-Localization
- and:
- not:
hasLabel:
@@ -433,8 +408,8 @@ configuration:
then:
- addLabel:
label: Needs-Tag-Fix
- description: Remove "Needs-Tag-Fix" label when an issue is tagged with an Area, Issue, and Product label
if:
description:
- if:
- payloadType: Issues
- and:
- isLabeled
@@ -442,117 +417,66 @@ configuration:
label: Needs-Tag-Fix
- and:
- or:
- not:
hasLabel:
label: Area-Accessibility
- not:
hasLabel:
label: Area-AtlasEngine
- not:
hasLabel:
label: Area-AzureShell
- not:
hasLabel:
label: Area-Build
- not:
hasLabel:
label: Area-Chat
- not:
hasLabel:
label: Area-CmdPal
- not:
hasLabel:
label: Area-CodeHealth
- not:
hasLabel:
label: Area-Commandline
- not:
hasLabel:
label: Area-CookedRead
- not:
hasLabel:
label: Area-DefApp
- not:
hasLabel:
label: Area-Extensibility
- not:
hasLabel:
label: Area-Fonts
- not:
hasLabel:
label: Area-GroupPolicy
- not:
hasLabel:
label: Area-i18n
- not:
hasLabel:
label: Area-Input
- not:
hasLabel:
label: Area-Interaction
- not:
hasLabel:
label: Area-Interop
- not:
hasLabel:
label: Area-Localization
- not:
hasLabel:
label: Area-Output
- not:
hasLabel:
label: Area-Performance
- not:
hasLabel:
label: Area-Portable
- not:
hasLabel:
label: Area-Quality
- not:
hasLabel:
label: Area-Remoting
- not:
hasLabel:
label: Area-Rendering
- not:
hasLabel:
label: Area-Schema
- not:
hasLabel:
label: Area-Server
- not:
hasLabel:
label: Area-Settings
- not:
hasLabel:
label: Area-SettingsUI
- not:
hasLabel:
label: Area-ShellExtension
- not:
hasLabel:
label: Area-Suggestions
- not:
hasLabel:
label: Area-TerminalConnection
- not:
hasLabel:
label: Area-TerminalControl
- not:
hasLabel:
label: Area-Theming
- not:
hasLabel:
label: Area-UserInterface
- not:
hasLabel:
label: Area-VT
- not:
hasLabel:
label: Area-Windowing
- not:
hasLabel:
label: Area-WPFControl
- hasLabel:
label: Area-Accessibility
- hasLabel:
label: Area-Build
- hasLabel:
label: Area-Extensibility
- hasLabel:
label: Area-Fonts
- hasLabel:
label: Area-Input
- hasLabel:
label: Area-Interaction
- hasLabel:
label: Area-Interop
- hasLabel:
label: Area-Output
- hasLabel:
label: Area-Performance
- hasLabel:
label: Area-Rendering
- hasLabel:
label: Area-Server
- hasLabel:
label: Area-Settings
- hasLabel:
label: Area-TerminalConnection
- hasLabel:
label: Area-TerminalControl
- hasLabel:
label: Area-User Interface
- hasLabel:
label: Area-VT
- hasLabel:
label: Area-CodeHealth
- hasLabel:
label: Area-Quality
- hasLabel:
label: Area-Schema
- hasLabel:
label: Area-AzureShell
- hasLabel:
label: Area-Commandline
- hasLabel:
label: Area-ShellExtension
- hasLabel:
label: Area-WPFControl
- hasLabel:
label: Area-Settings UI
- hasLabel:
label: Area-DefApp
- hasLabel:
label: Area-Localization
- hasLabel:
label: Area-Windowing
- hasLabel:
label: Area-Theming
- hasLabel:
label: Area-AtlasEngine
- hasLabel:
label: Area-CmdPal
- or:
- hasLabel:
label: Issue-Bug
@@ -609,14 +533,14 @@ configuration:
then:
- removeLabel:
label: Needs-Tag-Fix
- description: Add "In-PR" label to issues that are referenced in a PR
if:
description:
- if:
- payloadType: Pull_Request
then:
- inPrLabel:
label: In-PR
- description: Remove "Needs-Tag-Fix" label when an issue also has the "Resolution-Duplicate" label
if:
description:
- if:
- payloadType: Issues
- hasLabel:
label: Needs-Tag-Fix
@@ -625,8 +549,8 @@ configuration:
then:
- removeLabel:
label: Needs-Tag-Fix
- description: Close issues that are opened and have the template title
if:
description:
- if:
- payloadType: Issues
- or:
- titleContains:
@@ -652,8 +576,8 @@ configuration:
label: Needs-Author-Feedback
- addReply:
reply: Hi! Thanks for attempting to open an issue. Unfortunately, your title wasn't changed from the original template which makes it very hard for us to track and triage. You are welcome to fix up the title and try again with a new issue.
- description: Close issues that are opened and have no body
if:
description:
- if:
- payloadType: Issues
- or:
- isAction:
@@ -671,8 +595,8 @@ configuration:
label: Needs-Author-Feedback
- addReply:
reply: "Hi! Thanks for attempting to open an issue. Unfortunately, you didn't write anything in the body which makes it impossible to understand your concern. You are welcome to fix up the issue and try again by opening another issue with the body filled out. "
- description: Request a review from the team when a PR is labeled "Needs-Second"
if:
description:
- if:
- payloadType: Pull_Request
- isLabeled
- hasLabel:
@@ -689,8 +613,8 @@ configuration:
reviewer: dhowett
- requestReview:
reviewer: lhecker
- description: Remove "Needs-Second" label when a PR is reviewed
if:
description:
- if:
- payloadType: Pull_Request_Review
- not: isOpen
- hasLabel:
@@ -698,8 +622,8 @@ configuration:
then:
- removeLabel:
label: Needs-Second
- description: Remove "Help-Wanted" label from issues that are in a PR
if:
description:
- if:
- payloadType: Issues
- hasLabel:
label: In-PR
@@ -709,8 +633,8 @@ configuration:
then:
- removeLabel:
label: Help-Wanted
- description: Comments with "/dup", "/dupe", or "/duplicate" will close the issue as a duplicate and remove "Needs-" labels
if:
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/dup(licate|e)?(\s+of)?\s+\#[\d]+'
@@ -738,8 +662,8 @@ configuration:
label: Needs-Repro
- removeLabel:
label: Needs-Second
- description: Comments with "/feedback" will direct people to Feedback Hub
if:
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/feedback'
@@ -756,13 +680,13 @@ configuration:
Hi there!<br><br>Can you please send us feedback with the [Feedback Hub](https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332) with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?<br><br>Thanks!<br><br>![image](https://user-images.githubusercontent.com/18356694/140811502-a068f78b-89d2-4587-925a-73e19652b830.png)<br><br>![image](https://user-images.githubusercontent.com/18356694/140811557-cdc22a0f-fa6a-4f6a-953e-73b51f5548a3.png)<br><br>![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png)
- addLabel:
label: Needs-Author-Feedback
- description: Comments clean the email reply
if:
description:
- if:
- payloadType: Issue_Comment
then:
- cleanEmailReply
- description: Sync labels when a PR event occurs
if:
description:
- if:
- payloadType: Pull_Request
then:
- labelSync:
@@ -777,8 +701,8 @@ configuration:
pattern: Severity-
- labelSync:
pattern: Impact-
- description: Comments with "/dup", "/dupe", or "/duplicate" targeting another repo will close the issue as a duplicate and remove "Needs-" labels
if:
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/dup(licate|e)?(\s+of)?\s+https'
@@ -806,8 +730,8 @@ configuration:
label: Needs-Repro
- removeLabel:
label: Needs-Second
- description: Comments with "/?" will replace the "Needs-Attention" label with "Needs-Author-Feedback"
if:
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: /?
@@ -822,5 +746,6 @@ configuration:
label: Needs-Attention
- addLabel:
label: Needs-Author-Feedback
description:
onFailure:
onSuccess:

View File

@@ -93,7 +93,7 @@ jobs:
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@v0.0.25
uses: check-spelling/check-spelling@v0.0.24
with:
suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
checkout: true
@@ -104,7 +104,7 @@ jobs:
report-timing: 1
warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end
experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }}
use_sarif: 1
use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }}
check_extra_dictionaries: ""
dictionary_source_prefixes: >
{
@@ -114,33 +114,34 @@ jobs:
cspell:software-terms/softwareTerms.txt
cspell:cpp/stdlib-cpp.txt
cspell:cpp/stdlib-c.txt
cspell:python/python/python-lib.txt
cspell:lorem-ipsum/dictionary.txt
cspell:php/php.txt
cspell:node/node.txt
cspell:dart/dart.txt
cspell:filetypes/filetypes.txt
cspell:java/java.txt
cspell:css/css.txt
cspell:dotnet/dotnet.txt
cspell:node/node.txt
cspell:golang/go.txt
cspell:java/java-terms.txt
cspell:mnemonics/mnemonics.txt
cspell:npm/npm.txt
cspell:fullstack/fullstack.txt
cspell:java/java-terms.txt
cspell:r/r.txt
cspell:golang/go.txt
cspell:cpp/stdlib-cmath.txt
cspell:typescript/typescript.txt
cspell:html/html.txt
cspell:cpp/compiler-msvc.txt
cspell:django/django.txt
cspell:python/python/python-lib.txt
cspell:dotnet/dotnet.txt
cspell:dart/dart.txt
cspell:aws/aws.txt
cspell:python/common/extra.txt
cspell:cpp/ecosystem.txt
cspell:css/css.txt
cspell:cpp/stdlib-cmath.txt
cspell:typescript/typescript.txt
cspell:cpp/compiler-msvc.txt
cspell:django/django.txt
cspell:html/html.txt
cspell:cpp/lang-keywords.txt
cspell:csharp/csharp.txt
cspell:cpp/ecosystem.txt
cspell:r/r.txt
cspell:cpp/compiler-clang-attributes.txt
cspell:python/python/python.txt
cspell:mnemonics/mnemonics.txt
cspell:powershell/powershell.txt
cspell:csharp/csharp.txt
cspell:python/python/python.txt
comment-push:
name: Report (Push)
@@ -153,7 +154,7 @@ jobs:
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
steps:
- name: comment
uses: check-spelling/check-spelling@v0.0.25
uses: check-spelling/check-spelling@v0.0.24
with:
checkout: true
spell_check_this: microsoft/terminal@main
@@ -171,7 +172,7 @@ jobs:
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
steps:
- name: comment
uses: check-spelling/check-spelling@v0.0.25
uses: check-spelling/check-spelling@v0.0.24
with:
checkout: true
spell_check_this: microsoft/terminal@main
@@ -197,7 +198,7 @@ jobs:
cancel-in-progress: false
steps:
- name: apply spelling updates
uses: check-spelling/check-spelling@v0.0.25
uses: check-spelling/check-spelling@v0.0.24
with:
experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }}
checkout: true

View File

@@ -1,4 +1,4 @@
name: Publish to WinGet
name: Publish to Winget
on:
release:
@@ -6,9 +6,6 @@ on:
env:
REGEX: 'Microsoft\.WindowsTerminal(?:Preview)?_([\d.]+)_8wekyb3d8bbwe\.msixbundle$'
# winget-create will read the following environment variable to access the GitHub token needed for submitting a PR
# See https://aka.ms/winget-create-token
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }}
jobs:
publish:
@@ -24,4 +21,4 @@ jobs:
$wingetPackage = "Microsoft.WindowsTerminal${{ github.event.release.prerelease && '.Preview' || '' }}"
& curl.exe -JLO https://aka.ms/wingetcreate/latest
& .\wingetcreate.exe update $wingetPackage -s -v $version -u $wingetRelevantAsset.browser_download_url
& .\wingetcreate.exe update $wingetPackage -s -v $version -u $wingetRelevantAsset.browser_download_url -t "${{ secrets.WINGET_TOKEN }}"

View File

@@ -33,17 +33,6 @@
A:\;
E:\;
$(windir)\**;
$(MSBuildBinPath)\**;
$(MSBuildToolsPath32)\**;
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
<!--
Unit tests may write to TEMP, but should not be considered outputs. However, $(Temp) is using the DOS path (C:\Users\CLOUDT~1\AppData\Local\Temp), which
isn't accounted for in these globs. So we're building up to TEMP using $(LOCALAPPDATA) instead.
-->
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
$(LOCALAPPDATA)\Temp\**;
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
<!--
@@ -57,15 +46,6 @@
-->
<MSBuildCacheIdenticalDuplicateOutputPatterns>$(MSBuildCacheIdenticalDuplicateOutputPatterns);obj\*\vcpkg\**</MSBuildCacheIdenticalDuplicateOutputPatterns>
<!--
Ensure the MSBuildCache ignores collecting outputs under vcpkg's build tree, which is a working directory used to build vcpkg packages and not intended to be consumed by anything else in the build.
Note: We cannot use $(VcpkgInstalledDir) directly since it differs between projects, so use a pattern which encompasses all possibilities.
-->
<MSBuildCacheIgnoredOutputPatterns>
$(MSBuildCacheIgnoredOutputPatterns);
$(SolutionDir)\obj\*\vcpkg*\vcpkg\blds\**;
</MSBuildCacheIgnoredOutputPatterns>
<!-- version of MSBuildCache is not part of the cache key -->
<PackagesConfigFile>$(MSBuildThisFileDirectory)\dep\nuget\packages.config</PackagesConfigFile>
<MSBuildCacheIgnoredInputPatterns>$(MSBuildCacheIgnoredInputPatterns);$(PackagesConfigFile)</MSBuildCacheIgnoredInputPatterns>

View File

@@ -285,8 +285,6 @@ specific language governing permissions and limitations under the License.
**Source**: [https://github.com/commonmark/cmark](https://github.com/commonmark/cmark)
### License
```
Copyright (c) 2014, John MacFarlane
All rights reserved.
@@ -457,36 +455,6 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
## fzf
### License
```
The MIT License (MIT)
Copyright (c) 2013-2024 Junegunn Choi
Copyright (c) 2021-2025 Simon Hauser
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
# Microsoft Open Source

View File

@@ -340,19 +340,6 @@ If you would like to ask a question that you feel doesn't warrant an issue
## Prerequisites
You can configure your environment to build Terminal in one of two ways:
### Using WinGet configuration file
After cloning the repository, you can use a [WinGet configuration file](https://learn.microsoft.com/en-us/windows/package-manager/configuration/#use-a-winget-configuration-file-to-configure-your-machine)
to set up your environment. The [default configuration file](.config/configuration.winget) installs Visual Studio 2022 Community & rest of the required tools. There are two other variants of the configuration file available in the [.config](.config) directory for Enterprise & Professional editions of Visual Studio 2022. To run the default configuration file, you can either double-click the file from explorer or run the following command:
```powershell
winget configure .config\configuration.winget
```
### Manual configuration
* You must be running Windows 10 2004 (build >= 10.0.19041.0) or later to run
Windows Terminal
* You must [enable Developer Mode in the Windows Settings

View File

@@ -28,7 +28,7 @@ namespace HelixTestHelpers
public List<string> Screenshots { get; private set; }
public List<TestResult> RerunResults { get; private set; }
}
//
// Azure DevOps doesn't currently provide a way to directly report sub-results for tests that failed at least once
// that were run multiple times. To get around that limitation, we'll mark the test as "Skip" since
@@ -49,46 +49,46 @@ namespace HelixTestHelpers
// TODO (https://github.com/dotnet/arcade/issues/2773): Once we're able to directly report things in a
// more granular fashion than just a binary pass/fail result, we should do that.
//
[DataContract]
[DataContract]
internal class JsonSerializableTestResults
{
{
[DataMember]
internal string blobPrefix;
[DataMember]
internal string blobSuffix;
[DataMember]
internal string[] errors;
[DataMember]
internal JsonSerializableTestResult[] results;
}
[DataContract]
internal class JsonSerializableTestResult
[DataContract]
internal class JsonSerializableTestResult
{
[DataMember]
internal string outcome;
[DataMember]
internal int duration;
[DataMember(EmitDefaultValue = false)]
internal string log;
[DataMember(EmitDefaultValue = false)]
internal string[] screenshots;
[DataMember(EmitDefaultValue = false)]
internal int errorIndex;
}
public class TestPass
{
public TimeSpan TestPassExecutionTime { get; set; }
public List<TestResult> TestResults { get; set; }
public static TestPass ParseTestWttFile(string fileName, bool cleanupFailuresAreRegressions, bool truncateTestNames)
{
using (var stream = File.OpenRead(fileName))
@@ -174,7 +174,7 @@ namespace HelixTestHelpers
if (testsExecuting == 1)
{
string testName = element.Attribute("Title").Value;
if (truncateTestNames)
{
const string xamlNativePrefix = "Windows::UI::Xaml::Tests::";
@@ -243,7 +243,7 @@ namespace HelixTestHelpers
// The test cleanup errors will often come after the test claimed to have
// 'passed'. We treat them as errors as well.
// 'passed'. We treat them as errors as well.
if (inTestCleanup)
{
currentResult.CleanupPassed = false;
@@ -292,7 +292,7 @@ namespace HelixTestHelpers
foreach(var screenshot in screenshots)
{
string fileNameSuffix = string.Empty;
if (fileName.Contains("_rerun_multiple"))
{
fileNameSuffix = "_rerun_multiple";
@@ -301,7 +301,7 @@ namespace HelixTestHelpers
{
fileNameSuffix = "_rerun";
}
currentResult.Screenshots.Add(screenshot.Replace(".jpg", fileNameSuffix + ".jpg"));
}
}
@@ -313,7 +313,7 @@ namespace HelixTestHelpers
testPassStopTime = Int64.Parse(doc.Root.Descendants("WexTraceInfo").Last().Attribute("TimeStamp").Value);
var testPassTime = TimeSpan.FromSeconds((double)(testPassStopTime - testPassStartTime) / frequency);
foreach (TestResult testResult in testResults)
{
if (testResult.Details != null)
@@ -331,13 +331,13 @@ namespace HelixTestHelpers
return testpass;
}
}
public static TestPass ParseTestWttFileWithReruns(string fileName, string singleRerunFileName, string multipleRerunFileName, bool cleanupFailuresAreRegressions, bool truncateTestNames)
{
TestPass testPass = ParseTestWttFile(fileName, cleanupFailuresAreRegressions, truncateTestNames);
TestPass singleRerunTestPass = File.Exists(singleRerunFileName) ? ParseTestWttFile(singleRerunFileName, cleanupFailuresAreRegressions, truncateTestNames) : null;
TestPass multipleRerunTestPass = File.Exists(multipleRerunFileName) ? ParseTestWttFile(multipleRerunFileName, cleanupFailuresAreRegressions, truncateTestNames) : null;
List<TestResult> rerunTestResults = new List<TestResult>();
if (singleRerunTestPass != null)
@@ -377,9 +377,9 @@ namespace HelixTestHelpers
public static void OutputFailedTestQuery(string wttInputPath)
{
var testPass = TestPass.ParseTestWttFile(wttInputPath, cleanupFailuresAreRegressions: true, truncateTestNames: false);
List<string> failedTestNames = new List<string>();
foreach (var result in testPass.TestResults)
{
if (!result.Passed)
@@ -387,23 +387,23 @@ namespace HelixTestHelpers
failedTestNames.Add(result.Name);
}
}
if (failedTestNames.Count > 0)
{
string failedTestSelectQuery = "(@Name='";
for (int i = 0; i < failedTestNames.Count; i++)
{
failedTestSelectQuery += failedTestNames[i];
if (i < failedTestNames.Count - 1)
{
failedTestSelectQuery += "' or @Name='";
}
}
failedTestSelectQuery += "')";
Console.WriteLine(failedTestSelectQuery);
}
else
@@ -418,7 +418,7 @@ namespace HelixTestHelpers
private string testNamePrefix;
private string helixResultsContainerUri;
private string helixResultsContainerRsas;
public TestResultParser(string testNamePrefix, string helixResultsContainerUri, string helixResultsContainerRsas)
{
this.testNamePrefix = testNamePrefix;
@@ -430,7 +430,7 @@ namespace HelixTestHelpers
{
Dictionary<string, string> subResultsJsonByMethod = new Dictionary<string, string>();
TestPass testPass = TestPass.ParseTestWttFileWithReruns(wttInputPath, wttSingleRerunInputPath, wttMultipleRerunInputPath, cleanupFailuresAreRegressions: true, truncateTestNames: false);
foreach (var result in testPass.TestResults)
{
var methodName = result.Name.Substring(result.Name.LastIndexOf('.') + 1);
@@ -488,7 +488,7 @@ namespace HelixTestHelpers
int resultCount = results.Count;
int passedCount = results.Where(r => r.Passed).Count();
// Since we re-run tests on failure, we'll mark every test that failed at least once as "skipped" rather than "failed".
// If the test failed sufficiently often enough for it to count as a failed test (determined by a property on the
// Azure DevOps job), we'll later mark it as failed during test results processing.
@@ -504,15 +504,15 @@ namespace HelixTestHelpers
assembly.SetAttributeValue("run-date", DateTime.Now.ToString("yyyy-MM-dd"));
// This doesn't need to be completely accurate since it's not exposed anywhere.
// If we need an accurate start time we can probably calculate it from the te.wtl file, but for
// If we need accurate an start time we can probably calculate it from the te.wtl file, but for
// now this is fine.
assembly.SetAttributeValue("run-time", (DateTime.Now - testPass.TestPassExecutionTime).ToString("hh:mm:ss"));
assembly.SetAttributeValue("total", resultCount);
assembly.SetAttributeValue("passed", passedCount);
assembly.SetAttributeValue("failed", failedCount);
assembly.SetAttributeValue("skipped", skippedCount);
assembly.SetAttributeValue("time", (int)testPass.TestPassExecutionTime.TotalSeconds);
assembly.SetAttributeValue("errors", 0);
root.Add(assembly);
@@ -537,9 +537,9 @@ namespace HelixTestHelpers
test.SetAttributeValue("method", methodName);
test.SetAttributeValue("time", result.ExecutionTime.TotalSeconds);
string resultString = string.Empty;
if (result.Passed && !result.Skipped)
{
resultString = "Pass";
@@ -554,7 +554,7 @@ namespace HelixTestHelpers
resultString = "Fail";
}
if (!result.Passed)
{
if (result.Skipped)
@@ -579,36 +579,36 @@ namespace HelixTestHelpers
File.WriteAllText(xunitOutputPath, root.ToString());
}
private JsonSerializableTestResult ConvertToSerializableResult(TestResult rerunResult, string[] uniqueErrors)
{
var serializableResult = new JsonSerializableTestResult();
serializableResult.outcome = rerunResult.Passed ? "Passed" : "Failed";
serializableResult.duration = (int)Math.Round(rerunResult.ExecutionTime.TotalMilliseconds);
if (!rerunResult.Passed)
{
serializableResult.log = Path.GetFileName(rerunResult.SourceWttFile);
if (rerunResult.Screenshots.Any())
{
List<string> screenshots = new List<string>();
foreach (var screenshot in rerunResult.Screenshots)
{
screenshots.Add(Path.GetFileName(screenshot));
}
serializableResult.screenshots = screenshots.ToArray();
}
// To conserve space, we'll log the index of the error to index in a list of unique errors rather than
// jotting down every single error in its entirety. We'll add one to the result so we can avoid
// serializing this property when it has the default value of 0.
serializableResult.errorIndex = Array.IndexOf(uniqueErrors, rerunResult.Details) + 1;
}
return serializableResult;
}
@@ -617,7 +617,7 @@ namespace HelixTestHelpers
var filename = Path.GetFileName(filePath);
return string.Format("{0}/{1}{2}", helixResultsContainerUri, filename, helixResultsContainerRsas);
}
private string GetTestNameSeparator(string testname)
{
var separatorString = ".";

View File

@@ -6,20 +6,6 @@
],
"SigningInfo": {
"Operations": [
{
"KeyCode": "CP-233904-SN",
"OperationSetCode": "StrongNameSign",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": []
},
{
"KeyCode": "CP-233904-SN",
"OperationSetCode": "StrongNameVerify",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": []
},
{
"KeyCode": "CP-230012",
"OperationSetCode": "SigntoolSign",

View File

@@ -1,6 +1,6 @@
{
"instanceUrl": "https://microsoft.visualstudio.com",
"projectName": "OS",
"areaPath": "OS\\Windows Client and Services\\WinPD\\DFX-Developer Fundamentals and Experiences\\DEFT\\SHINE\\Terminal",
"areaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\Terminal",
"notificationAliases": ["condev@microsoft.com", "duhowett@microsoft.com"]
}

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MUXCustomBuildTasks" version="1.0.48" targetFramework="native" />
<package id="Microsoft.Taef" version="10.93.240607003" targetFramework="native" />
<package id="Microsoft.Internal.PGO-Helpers.Cpp" version="0.2.34" targetFramework="native" />
<package id="Microsoft.Debugging.Tools.PdbStr" version="20220617.1556.0" targetFramework="native" />

View File

@@ -84,7 +84,7 @@ stages:
buildEverything: true
keepAllExpensiveBuildOutputs: false
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
enableMsBuildCaching: true
enableCaching: true
- ${{ if eq(parameters.runTests, true) }}:
- stage: Test_${{ platform }}

View File

@@ -25,8 +25,6 @@ pr:
variables:
- name: runCodesignValidationInjectionBG
value: false
- name: EnablePipelineCache
value: true
# 0.0.yyMM.dd##
# 0.0.1904.0900
@@ -47,10 +45,6 @@ parameters:
- x64
- x86
- arm64
- name: enableMsBuildCaching
type: boolean
displayName: "Enable MSBuild Caching"
default: true
stages:
- ${{ if eq(parameters.auditMode, true) }}:
@@ -93,8 +87,6 @@ stages:
buildConfigurations: [Release]
buildEverything: true
keepAllExpensiveBuildOutputs: false
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
- ${{ if eq(parameters.runTests, true) }}:
- stage: Test_${{ platform }}

View File

@@ -47,7 +47,7 @@ steps:
git config --local core.autocrlf true
displayName: Prepare git submission environment
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@5
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@3
displayName: 'Touchdown Build - 7105, PRODEXT'
inputs:
teamId: 7105

View File

@@ -50,7 +50,6 @@ extends:
parameters:
pool: { type: windows }
variables:
ob_sdl_prefast_enabled: false # This is a collection of powershell scripts
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: "$(Build.SourcesDirectory)/_none"

View File

@@ -68,7 +68,7 @@ parameters:
- name: signingIdentity
type: object
default: {}
- name: enableMsBuildCaching
- name: enableCaching
type: boolean
default: false
@@ -144,7 +144,7 @@ jobs:
}
displayName: Prepare Build and Sign Targets
- ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- ${{ if eq(parameters.enableCaching, true) }}:
- pwsh: |-
$MSBuildCacheParameters = ""
$MSBuildCacheParameters += " -graph"
@@ -183,7 +183,7 @@ jobs:
configuration: $(BuildConfiguration)
msbuildArchitecture: x64
maximumCpuCount: true
${{ if eq(parameters.enableMsBuildCaching, true) }}:
${{ if eq(parameters.enableCaching, true) }}:
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
@@ -192,7 +192,7 @@ jobs:
artifact: logs-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }}
condition: always()
displayName: Publish Build Log
- ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- ${{ if eq(parameters.enableCaching, true) }}:
- publish: $(Build.SourcesDirectory)\MSBuildCacheLogs
artifact: logs-msbuildcache-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }}
condition: always()
@@ -203,7 +203,7 @@ jobs:
inputs:
contents: $(Build.SourcesDirectory)/msbuild.binlog
TargetFolder: $(Terminal.BinDir)
- ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- ${{ if eq(parameters.enableCaching, true) }}:
- task: CopyFiles@2
displayName: Copy MSBuildCache Logs
inputs:

View File

@@ -75,22 +75,10 @@ jobs:
}
displayName: "Wrangle Unpackaged builds into place, rename"
- task: PowerShell@2
displayName: Install Azure Modules from custom PowerShell Gallery Repo
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
pwsh: false # We are preparing modules for AzureFileCopy, which uses PowerShell 5.1
targetType: inline
script: |-
$MachineToken = $env:SYSTEM_ACCESSTOKEN | ConvertTo-SecureString -AsPlainText -Force
$Credential = [PSCredential]::new("ONEBRANCH_TOKEN", $MachineToken)
$MachineToken = $null
$Feed = "https://pkgs.dev.azure.com/shine-oss/terminal/_packaging/TerminalDependencies/nuget/v3/index.json"
Register-PSResourceRepository -Name "PSGalleryUpstream" -Uri $Feed -Trusted
Get-PSResourceRepository
Install-PSResource -Name Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute -Repository "PSGalleryUpstream" -Credential $Credential
- powershell: |-
Get-PackageProvider -Name NuGet -ForceBootstrap
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
displayName: Install Azure Module Dependencies
- task: AzureFileCopy@6
displayName: Publish to Storage Account

View File

@@ -147,10 +147,6 @@ jobs:
ValidateSignature: true
Verbosity: 'Verbose'
- pwsh: |-
tar -c -v --format=zip -f "$(JobOutputDirectory)/GroupPolicyTemplates_$(XES_APPXMANIFESTVERSION).zip" -C "$(Build.SourcesDirectory)/policies" *
displayName: Package GPO Templates
- ${{ parameters.afterBuildSteps }}
- ${{ if eq(parameters.publishArtifacts, true) }}:

View File

@@ -30,7 +30,7 @@ jobs:
steps:
- checkout: self
clean: true
# It is important that this be 0; otherwise, git will not fetch the branch ref names that the PGO rules require.
# It is important that this be 0, otherwise git will not fetch the branch ref names that the PGO rules require.
fetchDepth: 0
submodules: false
persistCredentials: false

View File

@@ -52,6 +52,11 @@ jobs:
itemPattern: '**/*.pdb'
targetPath: '$(Build.SourcesDirectory)/bin'
- powershell: |-
Get-PackageProvider -Name NuGet -ForceBootstrap
Install-Module -Verbose -AllowClobber -Force Az.Accounts, Az.Storage, Az.Network, Az.Resources, Az.Compute
displayName: Install Azure Module Dependencies
# Transit the Azure token from the Service Connection into a secret variable for the rest of the pipeline to use.
- task: AzurePowerShell@5
displayName: Generate an Azure Token
@@ -61,7 +66,7 @@ jobs:
pwsh: true
ScriptType: InlineScript
Inline: |-
$AzToken = (Get-AzAccessToken -AsSecureString -ResourceUrl api://30471ccf-0966-45b9-a979-065dbedb24c1).Token | ConvertFrom-SecureString -AsPlainText
$AzToken = (Get-AzAccessToken -ResourceUrl api://30471ccf-0966-45b9-a979-065dbedb24c1).Token
Write-Host "##vso[task.setvariable variable=SymbolAccessToken;issecret=true]$AzToken"

View File

@@ -78,9 +78,7 @@ extends:
template: v2/Microsoft.NonOfficial.yml@templates
parameters:
featureFlags:
WindowsHostVersion:
Version: 2022
Network: R1
WindowsHostVersion: 1ESWindows2022
platform:
name: 'windows_undocked'
product: 'Windows Terminal'
@@ -88,9 +86,6 @@ extends:
enabled: false
globalSdl: # https://aka.ms/obpipelines/sdl
enableCheckCFlags: false # CheckCFlags is broken and exploding our builds; to remove, :g/BAD-FLAGS/d
isNativeCode: true
prefast:
enabled: true
asyncSdl:
enabled: true
tsaOptionsFile: 'build/config/tsa.json'
@@ -118,8 +113,6 @@ extends:
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_sdl_prefast_runDuring: Build
ob_sdl_checkCompliantCompilerWarnings: true
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -154,7 +147,6 @@ extends:
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_sdl_prefast_enabled: false # This is a C# build job
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -186,7 +178,6 @@ extends:
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_sdl_prefast_enabled: false # This is a collection of powershell scripts
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -241,7 +232,6 @@ extends:
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_sdl_prefast_enabled: false # This is a collection of powershell scripts
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -260,7 +250,6 @@ extends:
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_sdl_prefast_enabled: false # This is a collection of powershell scripts
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(JobOutputDirectory)
@@ -286,7 +275,6 @@ extends:
variables:
ob_sdl_checkcflags_enabled: false # BAD-FLAGS
ob_sdl_xfgcheck_enabled: false # BAD-FLAGS
ob_sdl_prefast_enabled: false # This is a collection of powershell scripts
ob_git_checkout: false # This job checks itself out
ob_git_skip_checkout_none: true
ob_outputDirectory: $(Build.ArtifactStagingDirectory)

View File

@@ -1,12 +1,5 @@
steps:
- ${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}:
- pwsh: |-
Write-Host "Assuming NuGet is already installed..."
& nuget.exe help
displayName: Assume NuGet is fine
- ${{ else }}:
- task: NuGetToolInstaller@1
displayName: Use NuGet 6.6.1
inputs:
versionSpec: 6.6.1
- task: NuGetToolInstaller@1
displayName: Use NuGet 6.6.1
inputs:
versionSpec: 6.6.1

View File

@@ -1,28 +1,8 @@
$VSInstances = ([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml))
$VSPackages = $VSInstances.instances.instance.packages.package
$LatestVCPackage = ($VSPackages | ? { $_.id -eq "Microsoft.VisualCpp.Tools.Core" })
$LatestVCPackage = ($VSInstances.instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.Tools.Core" })
$LatestVCToolsVersion = $LatestVCPackage.version;
$VSRoot = (& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property 'resolvedInstallationPath')
$VCToolsRoot = Join-Path $VSRoot "VC\Tools\MSVC"
# We have observed a few instances where the VC tools package version actually
# differs from the version on the files themselves. We might as well check
# whether the version we just found _actually exists_ before we use it.
# We'll use whichever highest version exists.
$PackageVCToolPath = Join-Path $VCToolsRoot $LatestVCToolsVersion
If ($Null -Eq (Get-Item $PackageVCToolPath -ErrorAction:Ignore)) {
$VCToolsVersions = Get-ChildItem $VCToolsRoot | ForEach-Object {
[Version]$_.Name
} | Sort -Descending
$LatestActualVCToolsVersion = $VCToolsVersions | Select -First 1
If ([Version]$LatestVCToolsVersion -Ne $LatestActualVCToolsVersion) {
Write-Output "VC Tools Mismatch: Directory = $LatestActualVCToolsVersion, Package = $LatestVCToolsVersion"
$LatestVCToolsVersion = $LatestActualVCToolsVersion.ToString(3)
}
}
Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion"
Write-Output "Updating VCToolsVersion environment variable for job"
Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion"

View File

@@ -7,8 +7,5 @@
<VersionMajor>1</VersionMajor>
<VersionMinor>24</VersionMinor>
<VersionInfoProductName>Windows Terminal</VersionInfoProductName>
<VersionInfoCulture>1033</VersionInfoCulture>
<!-- The default has a spacing problem -->
<VersionInfoCopyRight>\xa9 Microsoft Corporation. All rights reserved.</VersionInfoCopyRight>
</PropertyGroup>
</Project>

View File

@@ -20,7 +20,7 @@
<package id="Selenium.WebDriver" version="3.5.0" targetFramework="net45" />
<!-- MSBuildCache -->
<package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.318-preview" />
<package id="Microsoft.MSBuildCache.Local" version="0.1.318-preview" />
<package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.318-preview" />
<package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.283-preview" />
<package id="Microsoft.MSBuildCache.Local" version="0.1.283-preview" />
<package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.283-preview" />
</packages>

View File

@@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88c12148..967b53dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -260,7 +260,7 @@ if (FMT_MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio")
join(netfxpath
"C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\"
".NETFramework\\v4.0")
- file(WRITE run-msbuild.bat "
+ file(WRITE "${CMAKE_BINARY_DIR}/run-msbuild.bat" "
${MSBUILD_SETUP}
${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*")
endif ()

View File

@@ -1,38 +0,0 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fmtlib/fmt
REF "${VERSION}"
SHA512 573b7de1bd224b7b1b60d44808a843db35d4bc4634f72a9edcb52cf68e99ca66c744fd5d5c97b4336ba70b94abdabac5fc253b245d0d5cd8bbe2a096bf941e39
HEAD_REF master
PATCHES
fix-write-batch.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DFMT_CMAKE_DIR=share/fmt
-DFMT_TEST=OFF
-DFMT_DOC=OFF
-DFMT_PEDANTIC=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fmt/base.h"
"defined(FMT_SHARED)"
"1"
)
endif()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@@ -1,8 +0,0 @@
The package fmt provides CMake targets:
find_package(fmt CONFIG REQUIRED)
target_link_libraries(main PRIVATE fmt::fmt)
# Or use the header-only version
find_package(fmt CONFIG REQUIRED)
target_link_libraries(main PRIVATE fmt::fmt-header-only)

View File

@@ -1,17 +0,0 @@
{
"name": "fmt",
"version": "11.1.4",
"description": "{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.",
"homepage": "https://github.com/fmtlib/fmt",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@@ -1,6 +0,0 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CXX_FLAGS /fsanitize=address)
set(VCPKG_C_FLAGS /fsanitize=address)

View File

@@ -1,6 +0,0 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CXX_FLAGS /fsanitize=address)
set(VCPKG_C_FLAGS /fsanitize=address)

View File

@@ -1,6 +0,0 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CXX_FLAGS /fsanitize=address)
set(VCPKG_C_FLAGS /fsanitize=address)

View File

@@ -15,7 +15,7 @@ This document serves as a storage point for those posts.
## <a name="cmd"></a>Why do we avoid changing CMD.exe?
`setlocal` doesn't behave the same way as an environment variable. It's a thing that would have to be put in at the top of the batch script that is `somefile.cmd` as one of its first commands to adjust the way that one specific batch file is processed by the `cmd.exe` engine. That's probably not suitable for your needs, but that's the way we have to go.
I don't think anyone is disagreeing with you, @mikemaccana, that this would be a five minute development change to read that environment variable and change the behavior of `cmd.exe`. It absolutely would be a tiny development time.
I don't think anyone is disagreeing with you, @mikemaccana, that this would be a five minute development change to read that environment variable and change the behavior of `cmd.exe`. It absolutely would be a tiny development time.
It's just that from our experience, we know there's going to be a 3-24 month bug tail here where we get massive investigation callbacks by some billion dollar enterprise customer who for whatever reason was already using the environment variable we pick for another purpose. Their script that they give their rank-and-file folks will tell them to press Ctrl+C at some point in the batch script to do whatever happens, it will do something different, those people will notice the script doesn't match the computer anymore. They will then halt the production line and tell their supervisor. The supervisor tells some director. Their director comes screaming at their Microsoft enterprise support contract person that we've introduced a change to the OS that is costing them millions if not billions of dollars in shipments per month. Our directors at Microsoft then come bashing down our doors angry with us and make us fix it ASAP or revert it, we don't get to go home at 5pm to our families or friends because we're fixing it, we get stressed the heck out, we have to spin up servicing potentially for already shipped operating systems which is expensive and headache-causing...etc.
@@ -27,7 +27,7 @@ I would highly recommend that Gulp convert to using PowerShell scripts and that
Original Source: https://github.com/microsoft/terminal/issues/217#issuecomment-404240443
_Addendum_: cmd.exe is the literal embodiment of [xkcd#1172]([url](https://xkcd.com/1172/)). Every change, no matter how small, will break _someone_.
_Addendum_: cmd.exe is the literal embodiment of [xkcd#1172]([url](https://xkcd.com/1172/)). Every change, no matter how small, will break _someone_.
## <a name="screenPerf"></a>Why is typing-to-screen performance better than every other app?
@@ -37,33 +37,33 @@ Also, I'm happy to discuss this with you until you're utterly sick of reading it
If I had to take an educated guess as to what is making us faster than pretty much any other application on Windows at putting your text on the screen... I would say it is because that is literally our only job! Also probably because we are using darn near the oldest and lowest level APIs that Windows has to accomplish this work.
Pretty much everything else you've listed has some sort of layer or framework involved, or many, many layers and frameworks, when you start talking about Electron and JavaScript. We don't.
Pretty much everything else you've listed has some sort of layer or framework involved, or many, many layers and frameworks, when you start talking about Electron and JavaScript. We don't.
We have one bare, super un-special window with no additional controls attached to it. We get our keys fed into us from just barely above the kernel given that we're processing them from window messages and not from some sort of eventing framework common to pretty much any other more complicated UI framework than ours (WPF, WinForms, UWP, Electron). And we dump our text straight onto the window surface using GDI's [PolyTextOut](https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-polytextoutw) with no frills.
We have one bare, super un-special window with no additional controls attached to it. We get our keys fed into us from just barely above the kernel given that we're processing them from window messages and not from some sort of eventing framework common to pretty much any other more complicated UI framework than ours (WPF, WinForms, UWP, Electron). And we dump our text straight onto the window surface using GDI's [PolyTextOut](https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-polytextoutw) with no frills.
Even `notepad.exe` has multiple controls on its window at the very least and is probably (I haven't looked) using some sort of library framework in the edit control to figure out its text layout (which probably is using another library framework for internationalization support...)
Of course this also means that we have trade offs. We don't support fully international text like pretty much every other application will. RTL? No go zone right now. Surrogate pairs and emoji? We're getting there but not there yet. Indic scripts? Nope.
Of course this also means that we have trade offs. We don't support fully international text like pretty much every other application will. RTL? No go zone right now. Surrogate pairs and emoji? We're getting there but not there yet. Indic scripts? Nope.
Why are we like this? For one, `conhost.exe` is old as dirt. It has to use the bare metal bottom layer of everything because it was created before most of those other frameworks were created. And also it maintains as low/bottom level as possible because it is pretty much the first thing that one needs to bring up when bringing up a new operating system edition or device before you have all the nice things like frameworks or what those frameworks require to operate. Also it's written in C/C++ which is about as low and bare metal as we can get.
Will this UI enhancement come to other apps on Windows? Almost certainly not. They have too much going on which is both a good and a bad thing. I'm jealous of their ability to just call one method and layout text in an uncomplicated manner in any language without manually calculating pixels or caring about what styles apply to their font. But my manual pixel calculations, dirty region math, scroll region madness, and more makes it so we go faster than them. I'm also jealous that when someone says "hey can you add a status bar to the bottom of your window" that they can pretty much click and drag that into place with their UI Framework and it will just work whereas for us, it's been a backlog item forever and gives me heartburn to think about implementing.
Will this UI enhancement come to other apps on Windows? Almost certainly not. They have too much going on which is both a good and a bad thing. I'm jealous of their ability to just call one method and layout text in an uncomplicated manner in any language without manually calculating pixels or caring about what styles apply to their font. But my manual pixel calculations, dirty region math, scroll region madness, and more makes it so we go faster than them. I'm also jealous that when someone says "hey can you add a status bar to the bottom of your window" that they can pretty much click and drag that into place with their UI Framework and it will just work where as for us, it's been a backlog item forever and gives me heartburn to think about implementing.
Will we try to keep it from regressing? Yes! Right now it's sort of a manual process. We identify that something is getting slow and then we go haul out [WPR](https://docs.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-recorder) and start taking traces. We stare down the hot paths and try to reason out what is going on and then improve them. For instance, in the last cycle or two, we focused on heap allocations as a major area where we could improve our end-to-end performance, changing a ton of our code to use stack-constructed iterator-like facades over the underlying request buffer instead of translating and allocating it into a new heap space for each level of processing.
Will we try to keep it from regressing? Yes! Right now it's sort of a manual process. We identify that something is getting slow and then we go haul out [WPR](https://docs.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-recorder) and start taking traces. We stare down the hot paths and try to reason out what is going on and then improve them. For instance, in the last cycle or two, we focused on heap allocations as a major area where we could improve our end-to-end performance, changing a ton of our code to use stack-constructed iterator-like facades over the underlying request buffer instead of translating and allocating it into a new heap space for each level of processing.
As an aside, @bitcrazed wants us to automate performance tests in some conhost specific way, but I haven't quite figured out a controlled environment to do this in yet. The Windows Engineering System runs performance tests each night that give us a coarse-grained way of knowing if we messed something up for the whole operating system, and they technically offer a fine-grained way for us to insert our own performance tests... but I just haven't got around to that yet. If you have an idea for a way for us to do this in an automated fashion, I'm all ears.
If there's anything else you'd like to know, let me know. I could go on all day. I deleted like 15 tangents from this reply before posting it....
If there's anything else you'd like to know, let me know. I could go on all day. I deleted like 15 tangents from this reply before posting it....
Original Source: https://github.com/microsoft/terminal/issues/327#issuecomment-447391705
## <a name="gfxMsgStack"></a>How are the Windows graphics/messaging stack assembled?
@stakx, I am referring to USER32 and GDI32.
@stakx, I am referring to USER32 and GDI32.
I'll give you a cursory overview of what I know off the top of my head without spending hours confirming the details. As such, some of this is subject to handwaving and could be mildly incorrect but is probably in the right direction. Consider every statement to be my personal knowledge on how the world works and subject to opinion or error.
For the graphics part of the pipeline (GDI32), the user-mode portions of GDI are pretty far down. The app calls GDI32, some work is done in that DLL on the user-mode side, then a kernel call jumps over to the kernel and drawing occurs.
For the graphics part of the pipeline (GDI32), the user-mode portions of GDI are pretty far down. The app calls GDI32, some work is done in that DLL on the user-mode side, then a kernel call jumps over to the kernel and drawing occurs.
The portion that you're thinking of regarding "silently converted to sit on top of other stuff" is probably that once we hit the kernel calls, a bunch of the kernel GDI stuff tends to be re-platformed on top of the same stuff as DirectX when it is actually handled by the NVIDIA/AMD/Intel/etc. graphics driver and the GPU at the bottom of the stack. I think this happened with the graphics driver re-architecture that came as a part of WDDM for Windows Vista. There's a document out there somewhere about what calls are still really fast in GDI and which are slower as a result of the re-platforming. Last time I found that document and checked, we were using the fast ones.
@@ -71,11 +71,11 @@ On top of GDI, I believe there are things like Common Controls or comctl32.dll w
As for DirectWrite and D2D and D3D and DXGI themselves, they're a separate set of commands and paths that are completely off to the side from GDI at all both in user and kernel mode. They're not really related other than that there's some interoperability provisions between the two. Most of our other UI frameworks tend to be built on top of the DirectX stack though. XAML is for sure. I think WPF is. Not sure about WinForms. And I believe the composition stack and the window manager are using DirectX as well.
As for the input/interaction part of the pipeline (USER32), I tend to find most other newer things (at least for desktop PCs) are built on top of what is already there. USER32's major concept is windows and window handles and everything is sent to a window handle. As long as you're on a desktop machine (or a laptop or whatever... I mean a classic-style Windows-powered machine), there's a window handle involved and messages floating around and that means we're talking USER32.
As for the input/interaction part of the pipeline (USER32), I tend to find most other newer things (at least for desktop PCs) are built on top of what is already there. USER32's major concept is windows and window handles and everything is sent to a window handle. As long as you're on a desktop machine (or a laptop or whatever... I mean a classic-style Windows-powered machine), there's a window handle involved and messages floating around and that means we're talking USER32.
The window message queue is just a straight up FIFO (more or less) of whatever input has occurred relevant to that window while it's in the foreground + whatever has been sent to the window by other components in the system.
The window message queue is just a straight up FIFO (more or less) of whatever input has occurred relevant to that window while it's in the foreground + whatever has been sent to the window by other components in the system.
The newer technologies and the frameworks like XAML and WPF and WinForms tend to receive the messages from the window message queue one way or another and process them and turn them into event callbacks to various objects that they've provisioned within their world.
The newer technologies and the frameworks like XAML and WPF and WinForms tend to receive the messages from the window message queue one way or another and process them and turn them into event callbacks to various objects that they've provisioned within their world.
However, the newer technologies that also work on other non-desktop platforms like XAML tend to have the ability to process stuff off of a completely different non-USER32 stack as well. There's a separate parallel stack to USER32 with all of our new innovations and realizations on how input and interaction should occur that doesn't exactly deal with classic messaging queues and window handles the same way. This is the whole Core* family of things like CoreWindow and CoreMessaging. They also have a different concept of "what is a user" that isn't so centric around your butt in rolling chair in front of a screen with a keyboard and mouse on the desk.
@@ -83,7 +83,7 @@ Now, if you're on XAML or one of the other Frameworks... all this intricacy is h
The trick is that GDI32 and USER32 were designed for a limited world with a limited set of commands. Desktop PCs were the only thing that existed, single user at the keyboard and mouse, simple graphics output to a VGA monitor. So using them directly at the "low level" like conhost does is pretty easy. The new platforms could be used at the "low level" but they're orders of magnitude more complicated because they now account for everything that has happened with personal computing in 20+ years like different form factors, multiple active users, multiple graphics adapters, and on and on and on and on. So you tend to use a framework when using the new stuff so your head doesn't explode. They handle it for you, but they handle more than they ever did before so they're slower to some degree.
So are GDI32 and USER32 "lower" than the new stuff? Sort of.
So are GDI32 and USER32 "lower" than the new stuff? Sort of.
Can you get that low with the newer stuff? Mostly yes, but you probably shouldn't and don't want to.
Does new live on top of old or is old replatformed on the new? Sometimes and/or partially.
Basically... it's like the answer to anything software... "it's an unmitigated disaster and if we all stepped back a moment, we should be astounded that it works at all." :P
@@ -94,7 +94,7 @@ Original Source: https://github.com/microsoft/terminal/issues/327#issuecomment-4
## <a name="fesb"></a>Output Processing between "Far East" and "Western"
>
>
> ```
> if (WI_IsFlagSet(CharType, C1_CNTRL))
> ```
@@ -120,7 +120,7 @@ Note in both of these, there is a little bit of indirection before `MultiByteToW
When we took over the console codebase, this variation between "Western" and "Eastern" countries was especially painful because `conhost.exe` would choose which one it was in based on the `Codepage for Non-Unicode Applications` set in the Control Panel's Regional > Administrative panel and it could only be changed with a reboot. It wouldn't even change properly when you `chcp` to a different codepage. Heck, `chcp` would deny you from switching into many codepages. There was a block in place to prevent going to an "Eastern" codepage if you booted up in a "Western" codepage. There was also a block preventing you from going between "Eastern" codepages, if I recall correctly.
In modernizing, I decided a few things:
1. What's good for the "Far East" should be good for the rest of the world. CJK languages that encompassed the "Far East" code have to be able to handle "Western" text as well even if the reverse wasn't true.
1. What's good for the "Far East" should be good for the rest of the world. CJK languages that encompassed the "Far East" code have to be able to handle "Western" text as well even if the reverse wasn't true.
2. We need to scrub all usages of "Far East" from the code. Someone already started that and replaced them with "East Asia" except then they left behind the shorthand of "FE" prefixing dozens of functions which made it hard to follow the code. It took us months to realize "FE" and "East Asia" were the same thing.
3. It's obnoxious that the way this was handled was to literally double-define every output function in the code base to have two definitions, compile them both into the conhost, then choose to run down the SB_ versions or the FE_ versions depending on the startup Non-Unicode codepage. It was a massive pile of complex pre-compilation `#ifdef` and `#else`s that would sometimes surround individual lines in the function bodies. Gross.
4. The fact that the FE_ versions of the functions were way slower than the SB_ ones was unacceptable even for the same output of Latin-character text.
@@ -139,13 +139,13 @@ Original Source: https://github.com/microsoft/terminal/issues/166#issuecomment-5
## <a name="backport"></a>Why do we not backport things?
Someone has to prove that this is costing millions to billions of dollars of lost productivity or revenue to outweigh the risks of shipping the fix to hundreds of millions of Windows machines and potentially breaking something.
Someone has to prove that this is costing millions to billions of dollars of lost productivity or revenue to outweigh the risks of shipping the fix to hundreds of millions of Windows machines and potentially breaking something.
Our team generally finds it pretty hard to prove that against the developer audience given that they're only a small portion of the total installed market of Windows machines.
Our team generally finds it pretty hard to prove that against the developer audience given that they're only a small portion of the total installed market of Windows machines.
Our only backport successes really come from corporations with massive addressable market (like OEMs shipping PCs) who complain that this is fouling up their manufacturing line (or something of that ilk). Otherwise, our management typically says that the risks don't outweigh the benefits.
It's also costly in terms of time, effort, and testing for us to validate a modification to a released OS. We have a mindbogglingly massive amount of automated machinery dedicated to processing and validating the things that we check in while developing the current OS builds. But it's a special costly ask to spin up some to all of those activities to validate backported fixes. We do it all the time for Patch Tuesday, but in those patches, they only pass through the minimum number of fixes required to maximize the restoration of productivity/security/revenue/etc. because every additional fix adds additional complexity and additional risk.
It's also costly in terms of time, effort, and testing for us to validate a modification to a released OS. We have a mindbogglingly massive amount of automated machinery dedicated to processing and validating the things that we check in while developing the current OS builds. But it's a special costly ask to spin up some to all of those activities to validate backported fixes. We do it all the time for Patch Tuesday, but in those patches, they only pass through the minimum number of fixes required to maximize the restoration of productivity/security/revenue/etc. because every additional fix adds additional complexity and additional risk.
So from our little team working hard to make developers happy, we virtually never make the cut for servicing. We're sorry, but we hope you can understand. It's just the reality of the situation to say "nope" when people ask for a backport. In our team's ideal world, you would all be running the latest console bits everywhere every time we make a change. But that's just not how it is today.
@@ -189,7 +189,7 @@ _guest speaker @zadjii-msft_
I think there might be a bit of a misunderstanding here - there are two different kinds of applications we're talking about here:
* shell applications, like `cmd.exe`, `powershell`, `zsh`, etc. These are text-only applications that emit streams of characters. They don't care at all about how they're eventually rendered to the user. These are also sometimes referred to as "commandline client" applications.
* terminal applications, like the Windows Terminal, gnome-terminal, xterm, iterm2, hyper. These are graphical applications that can be used to render the output of commandline clients.
* terminal applications, like the Windows Terminal, gnome-terminal, xterm, iterm2, hyper. These are graphical applications that can be used to render the output of commandline clients.
On Windows, if you just run `cmd.exe` directly, the OS will create an instance of `conhost.exe` as the _terminal_ for `cmd.exe`. The same thing happens for `powershell.exe`, the system will create a new conhost window for any client that's not already connected to a terminal of some sort. This has lead to an enormous amount of confusion for people thinking that a conhost window is actually a "`cmd` window". `cmd` can't have a window, it's just a commandline application. Its window is always some other terminal.

View File

@@ -31,12 +31,12 @@ Prerequisites:
1. Right click the machine name in the `Device Manager` list and choose `Launch T-Shell`. You can also use `Connect via Console` to get a "remote desktop"-like session to the KVM port on the VM.
1. In T-shell, use `testd Microsoft.Console.TestLab.Desktop.testlist` or a command of that format with a different TESTLIST or TESTMD name from our project (see the [UniversalTest.md] documentation). The `testd` utility will automatically resolve the build/branch/flavor information, dig through the build shares for the matching TESTLIST/TESTMD metadata, and attempt to deploy all relevant packages and dependencies on the device. When it's successful, it will move onto running all the tests and giving you the results. On conclusion, the test results should pop up in the web browser or the `Hubble - Log Viewer` tool provided by the Engineering Systems team.
If some of the above things do not work, go to [https://osgwiki.com] and type them into the Search bar. For instance, if T-Shell isn't found or working, you can find out where to get it or download it on `OSGWiki`. The same goes for the other commands besides `testd` to use in T-shell and more information on what `Hubble` or `Nebula` are.
If some of the above things do not work, go to [https://osgwiki.com] and type them into the Search bar. For instance, if T-Shell isn't found or working, you can find out where to get it or download it on `OSGWiki`. The same goes for the other commands besides `testd` to use in T-shell and more information on what `Hubble` or `Nebula` are.
Presumably now you have a failure. Or a success. You can attempt to spelunk the logs in `Hubble` and you might come to a conclusion. Or you can move onto debugging directly.
Now that you've relied on `testd` to get everything deployed and orchestrated and run once on the device, you can use `execd` to run things again or to run a smaller subset of things on the remote device through `T-Shell`.
Now that you've relied on `testd` to get everything deployed and orchestrated and run once on the device, you can use `execd` to run things again or to run a smaller subset of things on the remote device through `T-Shell`.
By default, in the `Universal Test` world, everything will be deployed onto the remote machine at `C:\data\test\bin`. In T-Shell, use `cdd C:\data\test\bin` to change to that directory and then `execd te.exe Microsoft.Console.Host.FeatureTests.dll /name:*TestReadFileEcho*` to run just one specific test. Of course, you should substitute the file name and test name parameters as makes sense. And of course you can find out more about `cdd` and `execd` on the `T-shell` page of `OSGWiki`.
By default, in the `Universal Test` world, everything will be deployed onto the remote machine at `C:\data\test\bin`. In T-Shell, use `cdd C:\data\test\bin` to change to that directory and then `execd te.exe Microsoft.Console.Host.FeatureTests.dll /name:*TestReadFileEcho*` to run just one specific test. Of course you should substitute the file name and test name parameters as makes sense. And of course you can find out more about `cdd` and `execd` on the `T-shell` page of `OSGWiki`.
Fortunately, running things through `T-shell` in this fashion is exactly the same way that the testlab orchestrates the tests. If you still don't get good data this way, you can use the `Connect via Console` mechanism way above to try to run things under `WinDBG` or the `Visual Studio Remote Debugger` manually on the machine to get them to repro or under the debugger more completely.

View File

@@ -32,21 +32,13 @@
]
},
"DynamicProfileSource": {
"type": "string",
"anyOf": [
{
"type": "string"
},
{
"enum": [
"Microsoft.WSL",
"Windows.Terminal.Wsl",
"Windows.Terminal.Azure",
"Windows.Terminal.PowershellCore",
"Windows.Terminal.VisualStudio"
]
}
]
"enum": [
"Windows.Terminal.Wsl",
"Windows.Terminal.Azure",
"Windows.Terminal.PowershellCore",
"Windows.Terminal.VisualStudio"
],
"type": "string"
},
"BellStyle": {
"oneOf": [
@@ -2376,16 +2368,6 @@
"description": "When set to true, the terminal will focus the pane on mouse hover.",
"type": "boolean"
},
"experimental.scrollToZoom": {
"default": true,
"description": "When set to true, holding the Ctrl key while scrolling will increase or decrease the terminal font size.",
"type": "boolean"
},
"experimental.scrollToChangeOpacity": {
"default": true,
"description": "When set to true, holding the Ctrl and Shift keys while scrolling will change the window opacity.",
"type": "boolean"
},
"compatibility.allowHeadless": {
"default": false,
"description": "When set to true, Windows Terminal will run in the background. This allows globalSummon and quakeMode actions to work even when no windows are open.",
@@ -2498,6 +2480,11 @@
"minimum": 1,
"type": "integer"
},
"startOnUserLogin": {
"default": false,
"description": "When set to true, this enables the launch of Terminal at startup. Setting this to false will disable the startup task entry. If the Terminal startup task entry is disabled either by org policy or by user action this setting will have no effect.",
"type": "boolean"
},
"firstWindowPreference": {
"default": "defaultProfile",
"description": "Defines what behavior the terminal takes when it starts. \"defaultProfile\" will have the terminal launch with one tab of the default profile, and \"persistedWindowLayout\" will cause the terminal to save its layout on close and reload it on open.",
@@ -3132,13 +3119,12 @@
},
"pathTranslationStyle": {
"default": "none",
"description": "Controls how file paths are transformed when they are dragged and dropped on the terminal. Possible values are \"none\", \"wsl\", \"cygwin\", \"msys2\" and \"mingw\".",
"description": "Controls how file paths are transformed when they are dragged and dropped on the terminal. Possible values are \"none\", \"wsl\", \"cygwin\" and \"msys2\".",
"enum": [
"none",
"wsl",
"cygwin",
"msys2",
"mingw"
"msys2"
],
"type": "string"
}

View File

@@ -6,7 +6,7 @@ When creating a new DLL, it was really helpful to reference an existing DLL's `.
- [ ] Make sure to `<Import>` our pre props at the _top_ of the vcxproj, and our post props at the _bottom_ of the vcxproj.
```
<!-- pre props -->
<!-- pre props -->
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
<Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
@@ -35,7 +35,7 @@ DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
- _Note_: If your new library eventually rolls up as a reference to our Centennial Packaging project `CascadiaPackage`, you don't have to worry about manually adding your definitions to the `AppXManifest.xml` because the Centennial Packaging project automatically enumerates the reference tree of WinMDs and stitches that information into the `AppXManifest.xml`. However, if your new project does _not_ ultimately roll up to a packaging project that will automatically put the references into `AppXManifest`, you will have to add them in manually.
### Troubleshooting
- If you hit an error that looks like this:
- If you hit an error that looks like this:
```
X found processing metadata file ..\blah1\Microsoft.UI.Xaml.winmd, type already exists in file ..\blah\NewDLLProject\Microsoft.UI.Xaml.winmd.
```
@@ -51,4 +51,4 @@ DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
- If you hit a `Class not Registered` error, this might be because a class isn't getting registered in the app manifest. You can go check `src/cascadia/CascadiaPackage/bin/x64/Debug/AppX/AppXManifest.xml` to see if there exist entries to the classes of your newly created DLL. If the references aren't there, double check that you've added `<ProjectReference>` blocks to both `WindowsTerminal.vcxproj` and `TerminalApp.vcxproj`.
- If you hit an extremely vague error along the lines of `Error in the DLL`, and right before that line you notice that your new DLL is loaded and unloaded right after each other, double check that your new DLL's definitions show up in the `AppXManifest.xml` file. If your new DLL is included as a reference to a project that rolls up to `CascadiaPackage`, double check that you've created a `.def` file for the project. Otherwise, if your new project _does not_ roll up to a package that populates the `AppXManifest` references for you, you'll have to add those references yourself.
- If you hit an extremely vague error along the lines of `Error in the DLL`, and right before that line you notice that your new DLL is loaded and unloaded right after each other, double check that your new DLL's definitions show up in the `AppXManifest.xml` file. If your new DLL is included as a reference to a project that rolls up to `CascadiaPackage`, double check that you've created a `.def` file for the project. Otherwise if your new project _does not_ roll up to a package that populates the `AppXManifest` references for you, you'll have to add those references yourself.

View File

@@ -9,7 +9,7 @@ issue id: 1564
## Abstract
Windows Terminal's settings model adheres to a cascading settings architecture. This allows a settings object to be defined incrementally across multiple layers of declarations. The value for any global setting like `copyOnSelect`, for example, is set to your settings.json value if one is defined; otherwise, defaults.json, and otherwise a system set value. Profiles in particular are more complicated in that they must also take into account the values in `profiles.defaults` and dynamic profile generators.
Windows Terminal's settings model adheres to a cascading settings architecture. This allows a settings object to be defined incrementally across multiple layers of declarations. The value for any global setting like `copyOnSelect`, for example, is set to your settings.json value if one is defined, otherwise defaults.json, and otherwise a system set value. Profiles in particular are more complicated in that they must also take into account the values in `profiles.defaults` and dynamic profile generators.
This spec explores how to represent this feature in the Settings UI.

View File

@@ -529,7 +529,7 @@ their own workflows.
* `--local`: Save to the `.wt.json` in the CWD, if there is one (or create
one)
* `--parent`: Save to the `.wt.json` in the first ancestor of the CWD, if
there is one. Otherwise, create one here.
there is one. Otherwise create one here.
* `--settings`: Manually save to the settings file?
* `--profile`: save to this profile???? Not sure if this is actually possible.
Maybe with the `WT_SESSION_ID` env var to figure out which profile is in use

View File

@@ -23,7 +23,7 @@ In a similar vein, many fonts allow for setting variations on the font along cer
### Font features
It is already possible to pass in a list of [font feature structs](https://docs.microsoft.com/en-us/windows/win32/api/dwrite/ns-dwrite-dwrite_font_feature) to DWrite for it to handle. A font feature struct contains only 2 things:
It is already possible to pass in a list of [font feature structs](https://docs.microsoft.com/en-us/windows/win32/api/dwrite/ns-dwrite-dwrite_font_feature) to DWrite for it to handle. A font feature struct contains only 2 things:
1. A font feature tag
2. A parameter value
@@ -78,7 +78,7 @@ Aside from additional parsing required for the settings file (which inherently o
### Compatibility
Older versions of Windows may not have the DWrite updates that allow for defining font features and axes of variation. We must make sure to fall back to the current implementation in these cases.
Older versions of Windows may not have the DWrite updates that allow for defining font features and axes of variation. We must make sure to fallback to the current implementation in these cases.
### Performance, Power, and Efficiency
@@ -102,4 +102,4 @@ We will also need to consider how we want to represent this in the settings UI.
[DWRITE_FONT_FEATURE structure](https://docs.microsoft.com/en-us/windows/win32/api/dwrite/ns-dwrite-dwrite_font_feature)
[DWRITE_FONT_AXIS_VALUE structure](https://docs.microsoft.com/en-us/windows/win32/api/dwrite_3/ns-dwrite_3-dwrite_font_axis_value)
[DWRITE_FONT_AXIS_VALUE structure](https://docs.microsoft.com/en-us/windows/win32/api/dwrite_3/ns-dwrite_3-dwrite_font_axis_value)

View File

@@ -17,7 +17,7 @@ I work remotely as a developer, so I have to spend a lot of hours in front of my
Normally I like dark modes in all the programs and apps I use, but when there's too much sunlight, it becomes annoying, and sometimes even painful, to work in dark mode. So, I have all the programs and apps I use (at least, those that can) set to switch their color themes to what the system has.
The company I work for sent me a MacBook Pro, and my personal phone is an Android, both with automatic dark mode at sunset and light mode at sunrise, and in those devices it's been working relatively well. In Windows, as it is known, there's no such feature, so I manually change between dark and light mode when it's needed, and most of the programs and apps I use go along with this change. Windows Terminal, is not one of them.
The company I work for sent me a Macbook Pro, and my personal phone is an Android, both with automatic dark mode at sunset and light mode at sunrise, and in those devices it's been working relatively well. In Windows, as it is known, there's no such feature, so I manually change between dark and light mode when it's needed, and most of the programs and apps I use go along with this change. Windows Terminal, is not one of them.
The theme changes just as expected, but in an app like this, this change only affects the top of the window, leaving almost all of the screen at the mercy of what the color scheme is, and it doesn't depend on the theme, which defeats any attempt to make a good use of the `system` theme feature.

View File

@@ -94,7 +94,7 @@ configurations:
- `"useExisting"`: always glom to the most recent window, regardless of desktop.
- `"useExistingOnSameDesktop"`: Only glom if there's an existing window on this
virtual desktop; otherwise, create a new window. This will be the new default
virtual desktop, otherwise create a new window. This will be the new default
value.
- `"useNew"`: Never glom, always create a new window. This is technically the
current behavior of the Terminal.

View File

@@ -362,7 +362,7 @@ Essentially, the probabilistic elective monarchy will work in the following way:
register.
3. After registering as a server for `Monarch`s, attempt to create a `Monarch`
using `winrt::create_instance`.
4. Using that `Monarch`, ask it for its PID.
4. Using that `Monarch`, ask it for it's PID.
- If that PID is the same as the PID of the current process, then the window
process knows that it is the monarch.
- If that PID is some other process, then we know that we're not currently
@@ -1102,7 +1102,7 @@ launch to use seems like an obvious next step. See also [#961].
- `true` or `"always"`: always glom to the most recent window, regardless of
desktop
- `"sameDesktop"`: Only glom if there's an existing window on this virtual
desktop; otherwise, create a new window
desktop, otherwise create a new window
- `false` or `"never"`: Never glom, always create a new window.

View File

@@ -13,7 +13,7 @@ This spec is for feature request #605 "Search". It goes over the details of a ne
## Inspiration
One of the superior features of iTerm2 is it's content search. The search comes in two variants: search from active tab and search from all tabs. In almost any editor, there is a roughly equivalent string search. We also want to realize search experience in Terminal. There will be two variants, search within one tab or from multiple tabs. We will start with one-tab search implementation.
One of the superior features of iTerm2 is it's content search. The search comes in two variants: search from active tab and search from all tabs. In almost any editor, there is an roughly equivalent string search. We also want to realize search experience in Terminal. There will be two variants, search within one tab or from multiple tabs. We will start with one-tab search implementation.
## Solution Design

View File

@@ -331,7 +331,7 @@ Are there other allocation policies we need to consider?
- requires coordination between tooling teams both within and without Microsoft (regarding any tool that operates on
or produces PE files)
- An exported symbol that shells can check for in order to determine whether to wait for the attached process to exit
- An exported symbol that shells can check for to determine whether to wait for the attached process to exit
- relies on shells to update and check for this
- cracking an executable to look for symbols is probably the last thing shells want to do
- we could provide an API to determine whether to wait or return?

View File

@@ -360,7 +360,7 @@ GUID GetNamespaceGuid(IDynamicProfileGenerator& generator);
GUID GetGuidForName(IDynamicProfileGenerator& generator, std::wstring& name);
```
The generator does not _need_ to use `GetGuidForName` to generate guids for its
The generator does not _need_ to use `GetGuidForName` to generate guids for it's
profiles. If the generator can determine another way to generate stable GUIDs
for its profiles, it's free to use whatever method it wants. `GetGuidForName` is
provided as a convenience.

View File

@@ -151,11 +151,11 @@ void CascadiaSettings::LayerJson(const Json::Value& json)
// repeat the same for Profiles...
}
```
For `defaults.json`, `_globals` will now hold all of the values set in `defaults.json`. If any settings were omitted from the `defaults.json`, `_globals` will fall back to its parent (a `GlobalAppSettings` consisting purely of system-defined values).
For `defaults.json`, `_globals` will now hold all of the values set in `defaults.json`. If any settings were omitted from the `defaults.json`, `_globals` will fallback to its parent (a `GlobalAppSettings` consisting purely of system-defined values).
For `settings.json`, `_globals` will only hold the values set in `settings.json`. If any settings were omitted from `settings.json`, `_globals` will fall back to its parent (the `GlobalAppSettings` built from `defaults.json`).
For `settings.json`, `_globals` will only hold the values set in `settings.json`. If any settings were omitted from `settings.json`, `_globals` will fallback to its parent (the `GlobalAppSettings` built from `defaults.json`).
This process becomes a bit more complex for `Profile` because it can fall back in the following order:
This process becomes a bit more complex for `Profile` because it can fallback in the following order:
1. `settings.json` profile
2. `settings.json` `profiles.defaults`
3. (if a dynamic profile) the hard-coded value in the dynamic profile generator

View File

@@ -101,8 +101,8 @@ The scopes would work as follows:
this tab.
- **TODO!: FOR DISCUSSION**: Should this disable the tab's
"broadcastToAllPanes" setting? Or should it leave that alone?
* `"disableBroadcastInput"`: For this tab, set the global setting to false,
the tab's setting to false, and clear the set of panes being broadcasted.
* `"disableBroadcastInput"`: Set the global setting to false, the tab's setting
to false, and clear the set of panes being broadcasted to for this tab.
- **TODO!** This could also just be `"action": "toggleBroadcastInput",
"scope": "none"`
@@ -161,7 +161,7 @@ As far as actions, we're looking at something like:
from the broadcast set. Otherwise, add all the panes from this tab to the
broadcast set.
* **D** toggle sending input to the current pane
* If this pane is in the broadcast set, remove it. Otherwise, add it.
* If this pane is in the broadcast set, remove it. Otherwise add it.
This seems to break down into the following actions:
```json

View File

@@ -8,12 +8,12 @@ Since accessibility is a very broad area, this document is intended to present r
### First-party terminals
For many years, Console Host (Conhost) was the only first-party terminal on Windows. In 2019, Windows Terminal was released to the world as an open source first-party terminal. Windows Terminal was distributed through the Microsoft Store and received regular updates throughout the year, much more frequently than Conhost. In October 2022, Windows Terminal was enabled as the default terminal on Windows.
A significant amount of code is shared between Conhost and Windows Terminal to create the terminal area. To enable an accessible experience for this area, a shared UI Automation provider was introduced in 2019[^1], enabling accessibility tools to navigate and read contents from the terminal area. In 2020, Windows Terminal was updated to dispatch UIA events signaling when the cursor position, text output, or selection changed; this left the work of identifying what changed in the output to the attached screen reader application[^2]. In 2022, Windows Terminal was updated to dispatch UIA notifications with a payload of what text was written to the screen[^3].
A significant amount of code is shared between Conhost and Windows Terminal to create the terminal area. To enable an accessible experience for this area, a shared UI Automation provider was introduced in 2019[^1], enabling accessibility tools to navigate and read contents from the terminal area. In 2020, Windows Terminal was updated to dispatch UIA events signaling when the cursor position, text output, or selection changed; this left the work of identifying what changed in the output to the attached screen reader application[^2]. In 2022, Windows Terminal was updated to dispatch UIA notifications with a payload of what text was written to the screen[^3].
### Internal Partners
There are many first-party command-line applications on Windows. The following are a few examples of those that are regularly updated:
- [**GitHub CLI**](https://cli.github.com/): a tool that can be used to query and interact with GitHub repos (open source)
- [**WinGet**](https://github.com/microsoft/winget-cli): a tool to install applications and other packages
- [**Winget**](https://github.com/microsoft/winget-cli): a tool to install applications and other packages
- [**PSReadLine**](https://github.com/PowerShell/PSReadLine): a PowerShell module that enhances the input line experience
- [**Windows Subsystem for Linux (WSL)**](https://learn.microsoft.com/en-us/windows/wsl/): a tool to manage and run GNU/Linux environments without a traditional virtual machine
- [**PowerShell**](https://github.com/PowerShell/PowerShell): a cross-platform command-line shell (open source)
@@ -33,7 +33,7 @@ The following examples don't take over the entire viewport:
- [**Oh My Posh**](https://ohmyposh.dev/): a tool to customize shell prompts
- **git**: a tool for version control
The following examples operate as command-line shells:
- [**Bash**](https://www.gnu.org/software/bash/) is the default shell for most Linux distributions
- [**Bash**](https://www.gnu.org/software/bash/) is the default shell for most Linux distributions
- [**Fish shell**](https://fishshell.com/) provides a rich shell experience with features like autosuggestion support and VGA colors
- [**Z shell**](https://zsh.sourceforge.io/) is an extended Bourne shell
@@ -113,7 +113,7 @@ This issue is tracked by [megathread: Scrollbar Marks · Issue #11000](https://g
### Mark Mode support for degenerate range
[PR #13053](https://github.com/microsoft/terminal/pull/13053) added support for mark mode in Windows Terminal. Mark mode allows users to create and modify selections by exclusively using the keyboard. However, screen reader users have reported it as a strange experience because it always has a cell of text selected; this results in the screen reader reading "x selected, y unselected" as opposed to the expected "x" when moving the cursor around.
Unfortunately, the changes required to fix this are very extensive because selections are stored as two inclusive terminal coordinates, which makes it impossible to represent an empty selection.
Unfortunately, the changes required to fix this are very extensive because selections are stored as two inclusive terminal coordinates, which makes it impossible to represent an empty selection.
This is tracked by [A11y: windows terminal emits selection/deselection events in mark mode when navigating with arrow keys · Issue #13447](https://github.com/microsoft/terminal/issues/13447).
@@ -158,7 +158,7 @@ In 2022, Windows Terminal added UI Automation notifications that contained a pay
UIA notifications have provided many compatibility benefits since screen readers automatically read notifications they receive. Additionally, this has provided the possibility for major performance enhancements as screen readers may no longer be required to diff the text buffer and figure out what has changed. NVDA has prototyped listening to notifications and ignoring text changed events entirely[^7]. However, it reveals underlying challenges with this new model such as how to handle passwords. The proposals listed in this section are intended to have Windows Terminal achieve improved performance and accessibility quality.
#### VT Screen Reader Control
Some command-line applications are simply too difficult to create a consistent accessible experience. Applications that draw decorative content, for example, may have that content read by a screen reader.
Some command-line applications are simply too difficult to create a consistent accessible experience. Applications that draw decorative content, for example, may have that content read by a screen reader.
In 2019, Daniel Imms wrote a spec proposing a VT sequence that can partially control the attached screen reader[^8]. This VT sequence consists of three main formats:
1. Stop announcing incoming data to the screen reader. The screen reader will resume announcing incoming data if any key is pressed.
@@ -214,4 +214,4 @@ Generally, the reasoning behind these priorities can be broken down as follows:
[^5]: [Implement the Delta E algorithm to improve color perception by PankajBhojwani · Pull Request #11095](https://github.com/microsoft/terminal/pull/11095)
[^6]: [Change AdjustIndistinguishableColors to an enum setting instead of a boolean setting by PankajBhojwani · Pull Request #13512](https://github.com/microsoft/terminal/pull/13512)
[^7]: [Prototype for Windows Terminal: Use notifications instead of monitoring for new text by leonardder · Pull Request #14047 · nvaccess/nvda (github.com)](https://github.com/nvaccess/nvda/pull/14047)
[^8]: [Control Screen Reader from Applications (#18) · Issues · terminal-wg / specifications · GitLab](https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/18)
[^8]: [Control Screen Reader from Applications (#18) · Issues · terminal-wg / specifications · GitLab](https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/18)

View File

@@ -9,7 +9,6 @@
<supportedOn>
<definitions>
<definition name="SUPPORTED_WindowsTerminal_1_21" displayName="$(string.SUPPORTED_WindowsTerminal_1_21)" />
<definition name="SUPPORTED_DefaultTerminalApplication" displayName="$(string.SUPPORTED_DefaultTerminalApplication)" />
</definitions>
</supportedOn>
<categories>
@@ -25,61 +24,5 @@
<multiText id="DisabledProfileSources" valueName="DisabledProfileSources" required="true" />
</elements>
</policy>
<policy name="DefaultTerminalApplication" class="User" displayName="$(string.DefaultTerminalApplication)" explainText="$(string.DefaultTerminalApplicationText)" presentation="$(presentation.TermAppSelection)" key="Console\%%Startup">
<parentCategory ref="WindowsTerminal" />
<supportedOn ref="SUPPORTED_DefaultTerminalApplication" />
<elements>
<enum id="TermAppSelect" required="true" valueName="DelegationTerminal">
<item displayName="$(string.TermAppAutomatic)">
<value>
<string>{00000000-0000-0000-0000-000000000000}</string>
</value>
<valueList>
<item key="Console\%%Startup" valueName="DelegationConsole">
<value>
<string>{00000000-0000-0000-0000-000000000000}</string>
</value>
</item>
</valueList>
</item>
<item displayName="$(string.TermAppConsoleHost)">
<value>
<string>{B23D10C0-E52E-411E-9D5B-C09FDF709C7D}</string>
</value>
<valueList>
<item key="Console\%%Startup" valueName="DelegationConsole">
<value>
<string>{B23D10C0-E52E-411E-9D5B-C09FDF709C7D}</string>
</value>
</item>
</valueList>
</item>
<item displayName="$(string.TermAppWindowsTerminal)">
<value>
<string>{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}</string>
</value>
<valueList>
<item key="Console\%%Startup" valueName="DelegationConsole">
<value>
<string>{2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}</string>
</value>
</item>
</valueList>
</item>
<item displayName="$(string.TermAppWindowsTerminalPreview)">
<value>
<string>{86633F1F-6454-40EC-89CE-DA4EBA977EE2}</string>
</value>
<valueList>
<item key="Console\%%Startup" valueName="DelegationConsole">
<value>
<string>{06EC847C-C0A5-46B8-92CB-7C92F6E35CD5}</string>
</value>
</item>
</valueList>
</item>
</enum>
</elements>
</policy>
</policies>
</policyDefinitions>

View File

@@ -7,7 +7,6 @@
<stringTable>
<string id="WindowsTerminal">Windows Terminal</string>
<string id="SUPPORTED_WindowsTerminal_1_21">At least Windows Terminal 1.21</string>
<string id="SUPPORTED_DefaultTerminalApplication">At least Windows 11 22H2 or Windows 10 22H2 (Build 19045.3031, KB5026435) with Windows Terminal 1.17</string>
<string id="DisabledProfileSources">Disabled Profile Sources</string>
<string id="DisabledProfileSourcesText">Profiles will not be generated from any sources listed here. Source names can be arbitrary strings. Potential candidates can be found as the "source" property on profile definitions in Windows Terminal's settings.json file.
@@ -19,22 +18,11 @@ Common sources are:
For instance, setting this policy to Windows.Terminal.Wsl will disable the builtin WSL integration of Windows Terminal.
Note: Existing profiles will disappear from Windows Terminal after adding their source to this policy.</string>
<string id="DefaultTerminalApplication">Default terminal application</string>
<string id="DefaultTerminalApplicationText">Select the default terminal application used in Windows.
If you select Windows Terminal Preview and it is not installed the system will fall back to the legacy Windows Console Host. (Please note that the settings interfaces showing "Let windows decide" in this case as configuration.)</string>
<string id="TermAppAutomatic">Automatic selection (Windows Terminal, if available)</string>
<string id="TermAppConsoleHost">Windows Console Host (legacy)</string>
<string id="TermAppWindowsTerminal">Windows Terminal</string>
<string id="TermAppWindowsTerminalPreview">Windows Terminal Preview (if available)</string>
</stringTable>
<presentationTable>
<presentation id="DisabledProfileSources">
<multiTextBox refId="DisabledProfileSources">List of disabled sources (one per line)</multiTextBox>
</presentation>
<presentation id="TermAppSelection">
<dropdownList refId="TermAppSelect" noSort="true" defaultItem="0">Select from the following options:</dropdownList>
</presentation>
</presentationTable>
</resources>
</policyDefinitionResources>

View File

@@ -32,7 +32,7 @@
BasedOn="{StaticResource TitleBarButtonStyle}"
TargetType="{x:Type Button}">
<Setter Property="Content" Value="&#xE10A;" />
<!-- Remove the default Button template's Triggers; otherwise, they'll override our trigger below. -->
<!-- Remove the default Button template's Triggers, otherwise they'll override our trigger below. -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">

View File

@@ -1,3 +1,3 @@
BUILD_PASS1_CONSUMES= \
onecore\windows\core\console\vcpkg|PASS1 \
onecore\windows\vcpkg|PASS1 \

View File

@@ -186,20 +186,18 @@ bool ImageSlice::_copyCells(const ImageSlice& srcSlice, const til::CoordType src
}
// The used destination before and after the written area must be erased.
// If this results in the entire range being erased, we return true to let
// the caller know that the slice should be deleted.
if (dstUsedBegin < dstWriteBegin && _eraseCells(dstUsedBegin, dstWriteBegin))
if (dstUsedBegin < dstWriteBegin)
{
return true;
_eraseCells(dstUsedBegin, dstWriteBegin);
}
if (dstUsedEnd > dstWriteEnd && _eraseCells(dstWriteEnd, dstUsedEnd))
if (dstUsedEnd > dstWriteEnd)
{
return true;
_eraseCells(dstWriteEnd, dstUsedEnd);
}
// At this point, if the beginning column is not less than the end, that
// means this was an empty slice into which nothing was copied, so we can
// again return true to let the caller know it should be deleted.
// If the beginning column is now not less than the end, that means the
// content has been entirely erased, so we return true to let the caller
// know that the slice should be deleted.
return _columnBegin >= _columnEnd;
}
@@ -212,19 +210,10 @@ void ImageSlice::EraseBlock(TextBuffer& buffer, const til::rect rect)
}
}
void ImageSlice::EraseCells(TextBuffer& buffer, const til::point at, const til::CoordType distance)
void ImageSlice::EraseCells(TextBuffer& buffer, const til::point at, const size_t distance)
{
auto x = at.x;
auto y = at.y;
auto distanceRemaining = distance;
while (distanceRemaining > 0)
{
auto& row = buffer.GetMutableRowByOffset(y);
EraseCells(row, x, x + distanceRemaining);
distanceRemaining -= (static_cast<til::CoordType>(row.size()) - x);
x = 0;
y++;
}
auto& row = buffer.GetMutableRowByOffset(at.y);
EraseCells(row, at.x, gsl::narrow_cast<til::CoordType>(at.x + distance));
}
void ImageSlice::EraseCells(ROW& row, const til::CoordType columnBegin, const til::CoordType columnEnd)

View File

@@ -41,7 +41,7 @@ public:
static void CopyRow(const ROW& srcRow, ROW& dstRow);
static void CopyCells(const ROW& srcRow, const til::CoordType srcColumn, ROW& dstRow, const til::CoordType dstColumnBegin, const til::CoordType dstColumnEnd);
static void EraseBlock(TextBuffer& buffer, const til::rect rect);
static void EraseCells(TextBuffer& buffer, const til::point at, const til::CoordType distance);
static void EraseCells(TextBuffer& buffer, const til::point at, const size_t distance);
static void EraseCells(ROW& row, const til::CoordType columnBegin, const til::CoordType columnEnd);
private:

View File

@@ -431,7 +431,7 @@ OutputCellIterator ROW::WriteCells(OutputCellIterator it, const til::CoordType c
THROW_HR_IF(E_INVALIDARG, limitRight.value_or(0) >= size());
// If we're given a right-side column limit, use it. Otherwise, the write limit is the final column index available in the char row.
const auto finalColumnInRow = gsl::narrow_cast<uint16_t>(limitRight.value_or(size() - 1));
const auto finalColumnInRow = limitRight.value_or(size() - 1);
auto currentColor = it->TextAttr();
uint16_t colorUses = 0;

View File

@@ -232,11 +232,6 @@ void TextAttribute::SetRightVerticalDisplayed(const bool isDisplayed) noexcept
WI_UpdateFlag(_attrs, CharacterAttributes::RightGridline, isDisplayed);
}
bool TextAttribute::IsBold(const bool intenseIsBold) const noexcept
{
return IsIntense() && (intenseIsBold || !_foreground.CanBeBrightened());
}
bool TextAttribute::IsIntense() const noexcept
{
return WI_IsFlagSet(_attrs, CharacterAttributes::Intense);

View File

@@ -115,7 +115,6 @@ public:
return memcmp(this, &other, sizeof(TextAttribute)) != 0;
}
bool IsBold(const bool intenseIsBold) const noexcept;
bool IsLegacy() const noexcept;
bool IsIntense() const noexcept;
bool IsFaint() const noexcept;

View File

@@ -400,6 +400,17 @@ Microsoft::Console::ICU::unique_utext Microsoft::Console::ICU::UTextFromTextBuff
return ut;
}
Microsoft::Console::ICU::unique_uregex Microsoft::Console::ICU::CreateRegex(const std::wstring_view& pattern, uint32_t flags, UErrorCode* status) noexcept
{
#pragma warning(suppress : 26490) // Don't use reinterpret_cast (type.1).
const auto re = uregex_open(reinterpret_cast<const char16_t*>(pattern.data()), gsl::narrow_cast<int32_t>(pattern.size()), flags, nullptr, status);
// ICU describes the time unit as being dependent on CPU performance and "typically [in] the order of milliseconds",
// but this claim seems highly outdated already. On my CPU from 2021, a limit of 4096 equals roughly 600ms.
uregex_setTimeLimit(re, 4096, status);
uregex_setStackLimit(re, 4 * 1024 * 1024, status);
return unique_uregex{ re };
}
// Returns a half-open [beg,end) range given a text start and end position.
// This function is designed to be used with uregex_start64/uregex_end64.
til::point_span Microsoft::Console::ICU::BufferRangeFromMatch(UText* ut, URegularExpression* re)

View File

@@ -9,8 +9,10 @@ class TextBuffer;
namespace Microsoft::Console::ICU
{
using unique_uregex = wistd::unique_ptr<URegularExpression, wil::function_deleter<decltype(&uregex_close), &uregex_close>>;
using unique_utext = wil::unique_struct<UText, decltype(&utext_close), &utext_close>;
unique_utext UTextFromTextBuffer(const TextBuffer& textBuffer, til::CoordType rowBeg, til::CoordType rowEnd) noexcept;
unique_uregex CreateRegex(const std::wstring_view& pattern, uint32_t flags, UErrorCode* status) noexcept;
til::point_span BufferRangeFromMatch(UText* ut, URegularExpression* re);
}

View File

@@ -1,3 +1,3 @@
BUILD_PASS1_CONSUMES= \
onecore\windows\core\console\vcpkg|PASS1 \
onecore\windows\vcpkg|PASS1 \

View File

@@ -10,7 +10,6 @@
#include "../../types/inc/CodepointWidthDetector.hpp"
#include "../renderer/base/renderer.hpp"
#include "../types/inc/utils.hpp"
#include <til/regex.h>
#include "search.h"
// BODGY: Misdiagnosis in MSVC 17.11: Referencing global constants in the member
@@ -2062,6 +2061,14 @@ void TextBuffer::_ExpandTextRow(til::inclusive_rect& textRow) const
}
}
size_t TextBuffer::SpanLength(const til::point coordStart, const til::point coordEnd) const
{
const auto bufferSize = GetSize();
// The coords are inclusive, so to get the (inclusive) length we add 1.
const auto length = bufferSize.CompareInBounds(coordEnd, coordStart) + 1;
return gsl::narrow<size_t>(length);
}
// Routine Description:
// - Retrieves the plain text data between the specified coordinates.
// Arguments:
@@ -2279,7 +2286,7 @@ std::string TextBuffer::GenHTML(const CopyRequest& req,
fmt::format_to(std::back_inserter(htmlBuilder), FMT_COMPILE("color:{};"), fgHex);
fmt::format_to(std::back_inserter(htmlBuilder), FMT_COMPILE("background-color:{};"), bgHex);
if (attr.IsBold(isIntenseBold))
if (isIntenseBold && attr.IsIntense())
{
htmlBuilder += "font-weight:bold;";
}
@@ -2529,7 +2536,7 @@ std::string TextBuffer::GenRTF(const CopyRequest& req,
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\cf{}"), fgIdx);
fmt::format_to(std::back_inserter(contentBuilder), FMT_COMPILE("\\chshdng0\\chcbpat{}"), bgIdx);
if (attr.IsBold(isIntenseBold))
if (isIntenseBold && attr.IsIntense())
{
contentBuilder += "\\b";
}
@@ -2969,7 +2976,7 @@ void TextBuffer::_SerializeRow(const ROW& row, const til::CoordType startX, cons
// parameter and we'll calculate the position of the _end_ of those rows in
// the new buffer. The rows's new value is placed back into this parameter.
// Return Value:
// - S_OK if we successfully copied the contents to the new buffer; otherwise, an appropriate HRESULT.
// - S_OK if we successfully copied the contents to the new buffer, otherwise an appropriate HRESULT.
void TextBuffer::Reflow(TextBuffer& oldBuffer, TextBuffer& newBuffer, const Viewport* lastCharacterViewport, PositionInformation* positionInfo)
{
const auto& oldCursor = oldBuffer.GetCursor();
@@ -3354,7 +3361,7 @@ std::optional<std::vector<til::point_span>> TextBuffer::SearchText(const std::ws
}
UErrorCode status = U_ZERO_ERROR;
const auto re = til::ICU::CreateRegex(needle, icuFlags, &status);
const auto re = ICU::CreateRegex(needle, icuFlags, &status);
if (status > U_ZERO_ERROR)
{
return std::nullopt;

View File

@@ -199,6 +199,8 @@ public:
std::wstring GetCustomIdFromId(uint16_t id) const;
void CopyHyperlinkMaps(const TextBuffer& OtherBuffer);
size_t SpanLength(const til::point coordStart, const til::point coordEnd) const;
std::wstring GetPlainText(til::point start, til::point end) const;
struct CopyRequest

View File

@@ -573,7 +573,7 @@ namespace
TestCase{
// This triggers the cursor being walked forward w/ newlines to maintain
// distance from the last char in the buffer
L"SBCS, cursor at end of buffer; otherwise, same as previous test",
L"SBCS, cursor at end of buffer, otherwise same as previous test",
{
TestBuffer{
{ 6, 5 },

View File

@@ -1,3 +1,3 @@
BUILD_PASS1_CONSUMES= \
onecore\windows\core\console\vcpkg|PASS1 \
onecore\windows\vcpkg|PASS1 \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

View File

@@ -21,11 +21,6 @@
<DeploymentContent>true</DeploymentContent>
<Link>ProfileIcons\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Content>
<!-- Profile Generator Icons -->
<Content Include="$(OpenConsoleDir)src\cascadia\CascadiaPackage\ProfileGeneratorIcons\**\*">
<DeploymentContent>true</DeploymentContent>
<Link>ProfileGeneratorIcons\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Content>
<!-- Default Settings -->
<Content Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\defaults.json">
<DeploymentContent>true</DeploymentContent>

View File

@@ -7,7 +7,6 @@
<ProjectName>elevate-shim</ProjectName>
<TargetName>elevate-shim</TargetName>
<ConfigurationType>Application</ConfigurationType>
<VersionInfoFileDescription>Windows Terminal Administrator Launch Helper</VersionInfoFileDescription>
</PropertyGroup>
<Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />

View File

@@ -2,8 +2,8 @@
// Licensed under the MIT license.
#include "pch.h"
#include "../TerminalApp/CommandLinePaletteItem.h"
#include "../TerminalApp/CommandPalette.h"
#include "../TerminalApp/BasePaletteItem.h"
#include "CppWinrtTailored.h"
using namespace Microsoft::Console;
@@ -15,19 +15,6 @@ using namespace winrt::Microsoft::Terminal::Control;
namespace TerminalAppLocalTests
{
struct StringPaletteItem : winrt::implements<StringPaletteItem, winrt::TerminalApp::IPaletteItem, winrt::Windows::UI::Xaml::Data::INotifyPropertyChanged>, winrt::TerminalApp::implementation::BasePaletteItem<StringPaletteItem, winrt::TerminalApp::PaletteItemType::CommandLine>
{
StringPaletteItem(std::wstring_view value) :
_value{ value } {}
winrt::hstring Name() { return _value; }
winrt::hstring KeyChordText() { return {}; }
winrt::hstring Icon() { return {}; }
private:
winrt::hstring _value;
};
class FilteredCommandTests
{
BEGIN_TEST_CLASS(FilteredCommandTests)
@@ -41,81 +28,81 @@ namespace TerminalAppLocalTests
TEST_METHOD(VerifyCompareIgnoreCase);
};
static void _verifySegment(auto&& segments, uint32_t index, uint64_t start, uint64_t end)
{
const auto& segment{ segments.GetAt(index) };
VERIFY_ARE_EQUAL(segment.Start, start, NoThrowString().Format(L"segment %zu", index));
VERIFY_ARE_EQUAL(segment.End, end, NoThrowString().Format(L"segment %zu", index));
}
void FilteredCommandTests::VerifyHighlighting()
{
auto result = RunOnUIThread([]() {
const WEX::TestExecution::DisableVerifyExceptions disableExceptionsScope;
const auto paletteItem{ winrt::make<StringPaletteItem>(L"AAAAAABBBBBBCCC") };
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"AAAAAABBBBBBCCC") };
{
Log::Comment(L"Testing command name segmentation with no filter");
const auto segments = filteredCommand->NameHighlights();
VERIFY_IS_NULL(segments); // No matches = no segments
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
auto segments = filteredCommand->_computeHighlightedName().Segments();
VERIFY_ARE_EQUAL(segments.Size(), 1u);
VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"AAAAAABBBBBBCCC");
VERIFY_IS_FALSE(segments.GetAt(0).IsHighlighted());
}
{
Log::Comment(L"Testing command name segmentation with empty filter");
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"")));
const auto segments = filteredCommand->NameHighlights();
VERIFY_IS_NULL(segments); // No matches = no segments
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"";
auto segments = filteredCommand->_computeHighlightedName().Segments();
VERIFY_ARE_EQUAL(segments.Size(), 1u);
VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"AAAAAABBBBBBCCC");
VERIFY_IS_FALSE(segments.GetAt(0).IsHighlighted());
}
{
Log::Comment(L"Testing command name segmentation with filter equal to the string");
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"AAAAAABBBBBBCCC")));
const auto segments = filteredCommand->NameHighlights();
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"AAAAAABBBBBBCCC";
auto segments = filteredCommand->_computeHighlightedName().Segments();
VERIFY_ARE_EQUAL(segments.Size(), 1u);
_verifySegment(segments, 0, 0, 14); // one segment for the entire string
VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"AAAAAABBBBBBCCC");
VERIFY_IS_TRUE(segments.GetAt(0).IsHighlighted());
}
{
Log::Comment(L"Testing command name segmentation with filter with first character matching");
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"A")));
const auto segments = filteredCommand->NameHighlights();
VERIFY_ARE_EQUAL(segments.Size(), 1u); // only one bold segment
_verifySegment(segments, 0, 0, 0); // it only covers the first character
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"A";
auto segments = filteredCommand->_computeHighlightedName().Segments();
VERIFY_ARE_EQUAL(segments.Size(), 2u);
VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"A");
VERIFY_IS_TRUE(segments.GetAt(0).IsHighlighted());
VERIFY_ARE_EQUAL(segments.GetAt(1).TextSegment(), L"AAAAABBBBBBCCC");
VERIFY_IS_FALSE(segments.GetAt(1).IsHighlighted());
}
{
Log::Comment(L"Testing command name segmentation with filter with other case");
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"a")));
const auto segments = filteredCommand->NameHighlights();
VERIFY_ARE_EQUAL(segments.Size(), 1u); // only one bold segment
_verifySegment(segments, 0, 0, 0); // it only covers the first character
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"a";
auto segments = filteredCommand->_computeHighlightedName().Segments();
VERIFY_ARE_EQUAL(segments.Size(), 2u);
VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"A");
VERIFY_IS_TRUE(segments.GetAt(0).IsHighlighted());
VERIFY_ARE_EQUAL(segments.GetAt(1).TextSegment(), L"AAAAABBBBBBCCC");
VERIFY_IS_FALSE(segments.GetAt(1).IsHighlighted());
}
{
Log::Comment(L"Testing command name segmentation with filter matching several characters");
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"ab")));
const auto segments = filteredCommand->NameHighlights();
VERIFY_ARE_EQUAL(segments.Size(), 1u); // one bold segment
_verifySegment(segments, 0, 5, 6); // middle 'ab'
}
{
Log::Comment(L"Testing command name segmentation with filter matching several regions");
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"abcc")));
const auto segments = filteredCommand->NameHighlights();
VERIFY_ARE_EQUAL(segments.Size(), 2u); // two bold segments
_verifySegment(segments, 0, 5, 6); // middle 'ab'
_verifySegment(segments, 1, 12, 13); // start of 'cc'
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"ab";
auto segments = filteredCommand->_computeHighlightedName().Segments();
VERIFY_ARE_EQUAL(segments.Size(), 4u);
VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"A");
VERIFY_IS_TRUE(segments.GetAt(0).IsHighlighted());
VERIFY_ARE_EQUAL(segments.GetAt(1).TextSegment(), L"AAAAA");
VERIFY_IS_FALSE(segments.GetAt(1).IsHighlighted());
VERIFY_ARE_EQUAL(segments.GetAt(2).TextSegment(), L"B");
VERIFY_IS_TRUE(segments.GetAt(2).IsHighlighted());
VERIFY_ARE_EQUAL(segments.GetAt(3).TextSegment(), L"BBBBBCCC");
VERIFY_IS_FALSE(segments.GetAt(3).IsHighlighted());
}
{
Log::Comment(L"Testing command name segmentation with non matching filter");
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"abcd")));
const auto segments = filteredCommand->NameHighlights();
VERIFY_IS_NULL(segments); // No matches = no segments
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"abcd";
auto segments = filteredCommand->_computeHighlightedName().Segments();
VERIFY_ARE_EQUAL(segments.Size(), 1u);
VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"AAAAAABBBBBBCCC");
VERIFY_IS_FALSE(segments.GetAt(0).IsHighlighted());
}
});
@@ -125,38 +112,54 @@ namespace TerminalAppLocalTests
void FilteredCommandTests::VerifyWeight()
{
auto result = RunOnUIThread([]() {
const auto paletteItem{ winrt::make<StringPaletteItem>(L"AAAAAABBBBBBCCC") };
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
const auto weigh = [&](const wchar_t* str) {
std::shared_ptr<fzf::matcher::Pattern> pattern;
if (str)
{
pattern = std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(str));
}
filteredCommand->UpdateFilter(std::move(pattern));
return filteredCommand->Weight();
};
const auto null = weigh(nullptr);
const auto empty = weigh(L"");
const auto full = weigh(L"AAAAAABBBBBBCCC");
const auto firstChar = weigh(L"A");
const auto otherCase = weigh(L"a");
const auto severalChars = weigh(L"ab");
VERIFY_ARE_EQUAL(null, 0);
VERIFY_ARE_EQUAL(empty, 0);
VERIFY_IS_GREATER_THAN(full, 100);
VERIFY_IS_GREATER_THAN(firstChar, 0);
VERIFY_IS_LESS_THAN(firstChar, full);
VERIFY_IS_GREATER_THAN(otherCase, 0);
VERIFY_IS_LESS_THAN(otherCase, full);
VERIFY_IS_GREATER_THAN(severalChars, otherCase);
VERIFY_IS_LESS_THAN(severalChars, full);
const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"AAAAAABBBBBBCCC") };
{
Log::Comment(L"Testing weight of command with no filter");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
auto weight = filteredCommand->_computeWeight();
VERIFY_ARE_EQUAL(weight, 0);
}
{
Log::Comment(L"Testing weight of command with empty filter");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"";
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
auto weight = filteredCommand->_computeWeight();
VERIFY_ARE_EQUAL(weight, 0);
}
{
Log::Comment(L"Testing weight of command with filter equal to the string");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"AAAAAABBBBBBCCC";
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
auto weight = filteredCommand->_computeWeight();
VERIFY_ARE_EQUAL(weight, 30); // 1 point for the first char and 2 points for the 14 consequent ones + 1 point for the beginning of the word
}
{
Log::Comment(L"Testing weight of command with filter with first character matching");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"A";
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
auto weight = filteredCommand->_computeWeight();
VERIFY_ARE_EQUAL(weight, 2); // 1 point for the first char match + 1 point for the beginning of the word
}
{
Log::Comment(L"Testing weight of command with filter with other case");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"a";
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
auto weight = filteredCommand->_computeWeight();
VERIFY_ARE_EQUAL(weight, 2); // 1 point for the first char match + 1 point for the beginning of the word
}
{
Log::Comment(L"Testing weight of command with filter matching several characters");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->_Filter = L"ab";
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
auto weight = filteredCommand->_computeWeight();
VERIFY_ARE_EQUAL(weight, 3); // 1 point for the first char match + 1 point for the beginning of the word + 1 point for the match of "b"
}
});
VERIFY_SUCCEEDED(result);
@@ -165,8 +168,8 @@ namespace TerminalAppLocalTests
void FilteredCommandTests::VerifyCompare()
{
auto result = RunOnUIThread([]() {
const auto paletteItem{ winrt::make<StringPaletteItem>(L"AAAAAABBBBBBCCC") };
const auto paletteItem2{ winrt::make<StringPaletteItem>(L"BBBBBCCC") };
const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"AAAAAABBBBBBCCC") };
const auto paletteItem2{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"BBBBBCCC") };
{
Log::Comment(L"Testing comparison of commands with no filter");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
@@ -178,10 +181,14 @@ namespace TerminalAppLocalTests
{
Log::Comment(L"Testing comparison of commands with empty filter");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"")));
filteredCommand->_Filter = L"";
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
filteredCommand->_Weight = filteredCommand->_computeWeight();
const auto filteredCommand2 = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem2);
filteredCommand2->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"")));
filteredCommand2->_Filter = L"";
filteredCommand2->_HighlightedName = filteredCommand2->_computeHighlightedName();
filteredCommand2->_Weight = filteredCommand2->_computeWeight();
VERIFY_ARE_EQUAL(filteredCommand->Weight(), filteredCommand2->Weight());
VERIFY_IS_TRUE(winrt::TerminalApp::implementation::FilteredCommand::Compare(*filteredCommand, *filteredCommand2));
@@ -189,12 +196,16 @@ namespace TerminalAppLocalTests
{
Log::Comment(L"Testing comparison of commands with different weights");
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
filteredCommand->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"B")));
filteredCommand->_Filter = L"B";
filteredCommand->_HighlightedName = filteredCommand->_computeHighlightedName();
filteredCommand->_Weight = filteredCommand->_computeWeight();
const auto filteredCommand2 = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem2);
filteredCommand2->UpdateFilter(std::make_shared<fzf::matcher::Pattern>(fzf::matcher::ParsePattern(L"B")));
filteredCommand2->_Filter = L"B";
filteredCommand2->_HighlightedName = filteredCommand2->_computeHighlightedName();
filteredCommand2->_Weight = filteredCommand2->_computeWeight();
VERIFY_IS_LESS_THAN(filteredCommand->Weight(), filteredCommand2->Weight()); // Second command gets more points due to the beginning of the word
VERIFY_IS_TRUE(filteredCommand->Weight() < filteredCommand2->Weight()); // Second command gets more points due to the beginning of the word
VERIFY_IS_FALSE(winrt::TerminalApp::implementation::FilteredCommand::Compare(*filteredCommand, *filteredCommand2));
}
});
@@ -205,8 +216,8 @@ namespace TerminalAppLocalTests
void FilteredCommandTests::VerifyCompareIgnoreCase()
{
auto result = RunOnUIThread([]() {
const auto paletteItem{ winrt::make<StringPaletteItem>(L"a") };
const auto paletteItem2{ winrt::make<StringPaletteItem>(L"B") };
const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"a") };
const auto paletteItem2{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"B") };
{
const auto filteredCommand = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem);
const auto filteredCommand2 = winrt::make_self<winrt::TerminalApp::implementation::FilteredCommand>(paletteItem2);

View File

@@ -8,7 +8,7 @@
#include "../TerminalApp/MinMaxCloseControl.h"
#include "../TerminalApp/TabRowControl.h"
#include "../TerminalApp/ShortcutActionDispatch.h"
#include "../TerminalApp/Tab.h"
#include "../TerminalApp/TerminalTab.h"
#include "../TerminalApp/CommandPalette.h"
#include "../TerminalApp/ContentManager.h"
#include "CppWinrtTailored.h"
@@ -287,7 +287,7 @@ namespace TerminalAppLocalTests
NewTabArgs args{ newTerminalArgs };
ActionAndArgs newTabAction{ ShortcutAction::NewTab, args };
// push the arg onto the front
page->_startupActions.push_back(std::move(newTabAction));
page->_startupActions.Append(newTabAction);
Log::Comment(L"Added a single newTab action");
auto app = ::winrt::Windows::UI::Xaml::Application::Current();
@@ -307,7 +307,7 @@ namespace TerminalAppLocalTests
// reliably in the unit tests.
Log::Comment(L"Ensure we set the first tab as the selected one.");
auto tab = page->_tabs.GetAt(0);
auto tabImpl = page->_GetTabImpl(tab);
auto tabImpl = page->_GetTerminalTabImpl(tab);
page->_tabView.SelectedItem(tabImpl->TabViewItem());
page->_UpdatedSelectedTab(tab);
});
@@ -510,7 +510,7 @@ namespace TerminalAppLocalTests
result = RunOnUIThread([&page]() {
VERIFY_ARE_EQUAL(1u, page->_tabs.Size());
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(1, tab->GetLeafPaneCount());
});
VERIFY_SUCCEEDED(result);
@@ -520,7 +520,7 @@ namespace TerminalAppLocalTests
page->_SplitPane(nullptr, SplitDirection::Automatic, 0.5f, page->_MakePane(nullptr, page->_GetFocusedTab(), nullptr));
VERIFY_ARE_EQUAL(1u, page->_tabs.Size());
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, tab->GetLeafPaneCount());
});
VERIFY_SUCCEEDED(result);
@@ -538,7 +538,7 @@ namespace TerminalAppLocalTests
page->_SplitPane(nullptr, SplitDirection::Automatic, 0.5f, page->_MakePane(nullptr, page->_GetFocusedTab(), nullptr));
VERIFY_ARE_EQUAL(1u, page->_tabs.Size());
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(3,
tab->GetLeafPaneCount(),
L"We should successfully duplicate a pane hosting a deleted profile.");
@@ -706,7 +706,7 @@ namespace TerminalAppLocalTests
SplitPaneArgs args{ SplitType::Duplicate };
ActionEventArgs eventArgs{ args };
page->_HandleSplitPane(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_FALSE(firstTab->IsZoomed());
@@ -717,7 +717,7 @@ namespace TerminalAppLocalTests
result = RunOnUIThread([&page]() {
ActionEventArgs eventArgs{};
page->_HandleTogglePaneZoom(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_TRUE(firstTab->IsZoomed());
});
@@ -727,7 +727,7 @@ namespace TerminalAppLocalTests
result = RunOnUIThread([&page]() {
ActionEventArgs eventArgs{};
page->_HandleTogglePaneZoom(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_FALSE(firstTab->IsZoomed());
});
@@ -744,7 +744,7 @@ namespace TerminalAppLocalTests
SplitPaneArgs args{ SplitType::Duplicate };
ActionEventArgs eventArgs{ args };
page->_HandleSplitPane(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_FALSE(firstTab->IsZoomed());
@@ -758,7 +758,7 @@ namespace TerminalAppLocalTests
page->_HandleTogglePaneZoom(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_TRUE(firstTab->IsZoomed());
});
@@ -772,7 +772,7 @@ namespace TerminalAppLocalTests
page->_HandleMoveFocus(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_TRUE(firstTab->IsZoomed());
});
@@ -789,7 +789,7 @@ namespace TerminalAppLocalTests
SplitPaneArgs args{ SplitType::Duplicate };
ActionEventArgs eventArgs{ args };
page->_HandleSplitPane(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_FALSE(firstTab->IsZoomed());
@@ -803,7 +803,7 @@ namespace TerminalAppLocalTests
page->_HandleTogglePaneZoom(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
VERIFY_IS_TRUE(firstTab->IsZoomed());
});
@@ -816,7 +816,7 @@ namespace TerminalAppLocalTests
page->_HandleClosePane(nullptr, eventArgs);
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_IS_FALSE(firstTab->IsZoomed());
});
VERIFY_SUCCEEDED(result);
@@ -827,7 +827,7 @@ namespace TerminalAppLocalTests
Log::Comment(L"Check to ensure there's only one pane left.");
result = RunOnUIThread([&page]() {
auto firstTab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto firstTab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(1, firstTab->GetLeafPaneCount());
VERIFY_IS_FALSE(firstTab->IsZoomed());
});
@@ -850,7 +850,7 @@ namespace TerminalAppLocalTests
uint32_t firstId = 0, secondId = 0, thirdId = 0, fourthId = 0;
TestOnUIThread([&]() {
VERIFY_ARE_EQUAL(1u, page->_tabs.Size());
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
firstId = tab->_activePane->Id().value();
// We start with 1 tab, split vertically to get
// -------------------
@@ -876,7 +876,7 @@ namespace TerminalAppLocalTests
// | | |
// -------------------
page->_SplitPane(nullptr, SplitDirection::Down, 0.5f, page->_MakePane(nullptr, page->_GetFocusedTab(), nullptr));
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
// Split again to make the 3rd tab
thirdId = tab->_activePane->Id().value();
});
@@ -896,13 +896,13 @@ namespace TerminalAppLocalTests
// | | |
// -------------------
page->_SplitPane(nullptr, SplitDirection::Down, 0.5f, page->_MakePane(nullptr, page->_GetFocusedTab(), nullptr));
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
fourthId = tab->_activePane->Id().value();
});
Sleep(250);
TestOnUIThread([&]() {
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(4, tab->GetLeafPaneCount());
// just to be complete, make sure we actually have 4 different ids
VERIFY_ARE_NOT_EQUAL(firstId, fourthId);
@@ -936,7 +936,7 @@ namespace TerminalAppLocalTests
Sleep(250);
TestOnUIThread([&]() {
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(4, tab->GetLeafPaneCount());
// Our currently focused pane should be `4`
VERIFY_ARE_EQUAL(fourthId, tab->_activePane->Id().value());
@@ -967,7 +967,7 @@ namespace TerminalAppLocalTests
Sleep(250);
TestOnUIThread([&]() {
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(4, tab->GetLeafPaneCount());
// Our currently focused pane should be `4`
VERIFY_ARE_EQUAL(fourthId, tab->_activePane->Id().value());
@@ -998,7 +998,7 @@ namespace TerminalAppLocalTests
Sleep(250);
TestOnUIThread([&]() {
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(4, tab->GetLeafPaneCount());
// Our currently focused pane should be `4`
VERIFY_ARE_EQUAL(fourthId, tab->_activePane->Id().value());
@@ -1029,7 +1029,7 @@ namespace TerminalAppLocalTests
Sleep(250);
TestOnUIThread([&]() {
auto tab = page->_GetTabImpl(page->_tabs.GetAt(0));
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
VERIFY_ARE_EQUAL(4, tab->GetLeafPaneCount());
// Our currently focused pane should be `4`
VERIFY_ARE_EQUAL(fourthId, tab->_activePane->Id().value());
@@ -1174,16 +1174,16 @@ namespace TerminalAppLocalTests
Log::Comment(L"give alphabetical names to all switch tab actions");
TestOnUIThread([&page]() {
page->_GetTabImpl(page->_tabs.GetAt(0))->Title(L"a");
page->_GetTerminalTabImpl(page->_tabs.GetAt(0))->Title(L"a");
});
TestOnUIThread([&page]() {
page->_GetTabImpl(page->_tabs.GetAt(1))->Title(L"b");
page->_GetTerminalTabImpl(page->_tabs.GetAt(1))->Title(L"b");
});
TestOnUIThread([&page]() {
page->_GetTabImpl(page->_tabs.GetAt(2))->Title(L"c");
page->_GetTerminalTabImpl(page->_tabs.GetAt(2))->Title(L"c");
});
TestOnUIThread([&page]() {
page->_GetTabImpl(page->_tabs.GetAt(3))->Title(L"d");
page->_GetTerminalTabImpl(page->_tabs.GetAt(3))->Title(L"d");
});
TestOnUIThread([&page]() {

View File

@@ -21,7 +21,7 @@ static constexpr std::wstring_view VerbName{ L"WindowsTerminalOpenHere" };
// Arguments:
// - psiItemArray: a IShellItemArray which contains the item that's selected.
// Return Value:
// - S_OK if we successfully attempted to launch the Terminal; otherwise, a
// - S_OK if we successfully attempted to launch the Terminal, otherwise a
// failure from an earlier HRESULT.
HRESULT OpenTerminalHere::Invoke(IShellItemArray* psiItemArray,
IBindCtx* /*pBindContext*/)

View File

@@ -10,7 +10,6 @@
<SubSystem>Console</SubSystem>
<!-- suppress a bunch of Windows Universal properties from cppwinrt.props -->
<OpenConsoleUniversalApp>false</OpenConsoleUniversalApp>
<VersionInfoFileDescription>Windows Terminal Open Here Shell Extension</VersionInfoFileDescription>
</PropertyGroup>
<PropertyGroup Label="NuGet Dependencies">
<TerminalCppWinrt>true</TerminalCppWinrt>

View File

@@ -8,7 +8,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:TerminalApp"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mtu="using:Microsoft.Terminal.UI"
xmlns:mux="using:Microsoft.UI.Xaml.Controls"
x:Uid="AboutDialog"
DefaultButton="Close"
@@ -18,9 +17,6 @@
<StackPanel Orientation="Vertical">
<TextBlock IsTextSelectionEnabled="True">
<TextBlock.ContextFlyout>
<mtu:TextMenuFlyout />
</TextBlock.ContextFlyout>
<Run AutomationProperties.HeadingLevel="1"
Text="{x:Bind ApplicationDisplayName}" /> <LineBreak />
<Run x:Uid="AboutDialog_VersionLabel" />
@@ -28,22 +24,22 @@
</TextBlock>
<StackPanel Orientation="Vertical">
<StackPanel Padding="0,16,0,16"
<StackPanel Padding="0,4,0,4"
VerticalAlignment="Center"
Orientation="Horizontal"
Spacing="8"
Visibility="{x:Bind CheckingForUpdates, Mode=OneWay}">
<mux:ProgressRing Width="16"
Height="16"
IsActive="True"
IsIndeterminate="True" />
<TextBlock x:Uid="AboutDialog_CheckingForUpdatesLabel" />
<TextBlock x:Uid="AboutDialog_CheckingForUpdatesLabel"
Padding="4,0,0,0" />
</StackPanel>
<StackPanel Padding="0,16,0,16"
<StackPanel Padding="0,4,0,4"
VerticalAlignment="Center"
Orientation="Vertical"
Visibility="{x:Bind UpdatesAvailable, Mode=OneWay}">
<TextBlock>
<TextBlock IsTextSelectionEnabled="False">
<Run x:Uid="AboutDialog_UpdateAvailableLabel" />
</TextBlock>
<!-- <Button x:Uid="AboutDialog_InstallUpdateButton"
@@ -51,18 +47,16 @@
</StackPanel>
</StackPanel>
<StackPanel Margin="-12,0,0,0"
Orientation="Vertical">
<HyperlinkButton x:Uid="AboutDialog_SourceCodeLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2203152" />
<HyperlinkButton x:Uid="AboutDialog_DocumentationLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2125416" />
<HyperlinkButton x:Uid="AboutDialog_ReleaseNotesLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2125417" />
<HyperlinkButton x:Uid="AboutDialog_PrivacyPolicyLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2125418" />
<HyperlinkButton x:Uid="AboutDialog_ThirdPartyNoticesLink"
Click="_ThirdPartyNoticesOnClick" />
</StackPanel>
<HyperlinkButton x:Uid="AboutDialog_SourceCodeLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2203152" />
<HyperlinkButton x:Uid="AboutDialog_DocumentationLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2125416" />
<HyperlinkButton x:Uid="AboutDialog_ReleaseNotesLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2125417" />
<HyperlinkButton x:Uid="AboutDialog_PrivacyPolicyLink"
NavigateUri="https://go.microsoft.com/fwlink/?linkid=2125418" />
<HyperlinkButton x:Uid="AboutDialog_ThirdPartyNoticesLink"
Click="_ThirdPartyNoticesOnClick" />
</StackPanel>
</ContentDialog>

View File

@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "ActionPaletteItem.h"
#include <LibraryResources.h>
#include "ActionPaletteItem.g.cpp"
using namespace winrt;
using namespace winrt::TerminalApp;
using namespace winrt::Windows::UI::Core;
using namespace winrt::Windows::UI::Xaml;
using namespace winrt::Windows::System;
using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::Foundation::Collections;
using namespace winrt::Microsoft::Terminal::Settings::Model;
namespace winrt::TerminalApp::implementation
{
ActionPaletteItem::ActionPaletteItem(const Microsoft::Terminal::Settings::Model::Command& command, const winrt::hstring keyChordText) :
_Command(command)
{
Name(command.Name());
KeyChordText(keyChordText);
Icon(command.IconPath());
}
}

View File

@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
#include "PaletteItem.h"
#include "ActionPaletteItem.g.h"
namespace winrt::TerminalApp::implementation
{
struct ActionPaletteItem : ActionPaletteItemT<ActionPaletteItem, PaletteItem>
{
ActionPaletteItem() = default;
ActionPaletteItem(const Microsoft::Terminal::Settings::Model::Command& command, const winrt::hstring keyChordText);
WINRT_PROPERTY(Microsoft::Terminal::Settings::Model::Command, Command, nullptr);
private:
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _commandChangedRevoker;
};
}
namespace winrt::TerminalApp::factory_implementation
{
BASIC_FACTORY(ActionPaletteItem);
}

View File

@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "PaletteItem.idl";
namespace TerminalApp
{
[default_interface] runtimeclass ActionPaletteItem : PaletteItem
{
ActionPaletteItem(Microsoft.Terminal.Settings.Model.Command command, String keyChordText);
Microsoft.Terminal.Settings.Model.Command Command { get; };
}
}

View File

@@ -243,8 +243,6 @@
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
<ResourceDictionary Source="ms-resource:///Files/TerminalApp/HighlightedTextControlStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

Some files were not shown because too many files have changed in this diff Show More