terminal icon indicating copy to clipboard operation
terminal copied to clipboard

New Tab Menu Customization

Open FWest98 opened this issue 3 years ago • 4 comments

Summary of the Pull Request

Implements an initial version of #1571 and the relevant spec, the only big thing missing now is the possibility to add actions, which depends on #6899.

References

Further upcoming spec: #12584

PR Checklist

  • [x] Closes #1571 (but maybe not fully?)
  • [x] CLA signed. If not, go over here and sign the CLA
  • [ ] Tests added/passed -- I was not able to run the relevant tests on my machine, so I was not able to add further tests either, unfortunately.
  • [ ] Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • [x] Schema updated.
  • [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Implemented according to instructions by @zadjii-msft. Mostly relatively straightforward, but some notable details:

  • Took some liberty in functionality to add multiple profiles at once, and while waiting for #12584, I added a special type of entry that represents all profiles generated by a given source. This works well for "all WSL profiles"-entries, but can also work for your own custom profiles when using the fragments functionality (like I do). This also allowed me to add some preparing work for more elaborate "multi-profile" entries, so future additions should be easier.
  • In accordance with the spec, the counting/indexing of profiles is based on their index in the json (so the index of the profile, not of the entry in the menu).
  • Resolving a profile name to an actual profile is done in a similar fashion as how currently the DefaultProfile field is populated: the CascadiaSettings constructor now has an extra _resolve function that will iterate over all entries and resolve the names to instances; this same function will compute all profile sets (the set of all profiles from source "x", and the set of all remaining profiles)
  • ~Fun~ fact: I spent two whole afternoons and evenings trying to add 2 classes (which turned out to be a trivial .vcxproj error), and then managed to finish the entire rest of it in another afternoon and evening...

Screenshot: afbeelding

Validation Steps Performed

A lot of manual testing; as mentioned above I was not able to run any tests so I could not add them for now. However, the logic is not too tricky so it should be relatively safe.

FWest98 avatar Aug 17 '22 01:08 FWest98

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view or the :scroll:action log for details.

Unrecognized words (7)

concretisations deserialisation Deserialise errorprone overriden tabmenu Westerman

To accept :heavy_check_mark: these unrecognized words as correct, run the following commands

... in a clone of the [email protected]:FWest98/OS-Windows_Terminal.git repository on the fw/profiles_dropdown branch (:information_source: how do I use this?):

update_files() {
perl -e '
my $new_expect_file=".github/actions/spelling/expect/8cf56971f61ef4c0d9d6fedd478821ea33f2d6c4.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
-H "Content-Type: application/json" \
"https://api.github.com/repos/microsoft/terminal/issues/comments/1217371576" > "$comment_json"
comment_body=$(mktemp)
jq -r ".body // empty" "$comment_json" | tr -d "\\r" > $comment_body
rm $comment_json

patch_add=$(perl -e '$/=undef; $_=<>; if (m{Unrecognized words[^<]*</summary>\n*```\n*([^<]*)```\n*</details>$}m) { print "$1" } elsif (m{Unrecognized words[^<]*\n\n((?:\w.*\n)+)\n}m) { print "$1" };' < "$comment_body")

update_files
rm $comment_body
git add -u

Available dictionaries could cover words not in the dictionary

This includes both expected items (2868) from .github/actions/spelling/expect/alphabet.txt .github/actions/spelling/expect/expect.txt .github/actions/spelling/expect/web.txt and unrecognized words (7)

cspell:filetypes/filetypes.txt (337) covers 36 of them cspell:django/django.txt (2342) covers 23 of them cspell:html/html.txt (542) covers 22 of them cspell:aws/aws.txt (1485) covers 20 of them cspell:fullstack/fullstack.txt (181) covers 19 of them

Consider adding them using (in .github/workflows/spelling2.yml):

      with:
        extra_dictionaries:
          cspell:filetypes/filetypes.txt
          cspell:django/django.txt
          cspell:html/html.txt
          cspell:aws/aws.txt
          cspell:fullstack/fullstack.txt

To stop checking additional dictionaries, add:

      with:
        check_extra_dictionaries: ''
Warnings (1)

See the :open_file_folder: files view or the :scroll:action log for details.

:information_source: Warnings Count
:information_source: limited-references 1

See :information_source: Event descriptions for more information.

:pencil2: Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

:warning: The command is written for posix shells. If it doesn't work for you, you can manually add (one word per line) / remove items to expect.txt and the excludes.txt files.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

:microscope: You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink:

:clamp: If the flagged items are false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it, try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

github-actions[bot] avatar Aug 17 '22 02:08 github-actions[bot]

On second thought, I only saw #12584 after I implemented my barebones ProfilesSourceEntry. I guess you prefer not to be stuck to this temporary API forever, so maybe it's better to remove that part for now. Or, if #12584 is finished, it should only take me a few hours to implement it as it stands now, so then we would have a more complete MR here.

Please let me know what you think is best!

FWest98 avatar Aug 17 '22 02:08 FWest98

Thoughts from the dome: I'm fucking jazzed to see this implemented. Definitely one of the biggest feature requests we've had, and I can't wait to see it land.

That being said - we're kinda putting the final wraps on 1.16 at the moment. This PR might take a little while to get merged while we focus on locking 1.16 down. Thanks for bearing with us!

zadjii-msft avatar Aug 17 '22 14:08 zadjii-msft

Incorporated all your feedback! If there's one reason to upgrade my PC, it would be this project... Easily takes 15-20min for a build after a change in .idl files.

I indeed removed the source item for now, it's easy to get it back by reverting bc628f68d0cf0048caf5e5b278506a3566b88494 and adapting it later. Hopefully it's nearly done now!

FWest98 avatar Sep 10 '22 23:09 FWest98

Hey @FWest98, Thanks for being patient. I've asked my team to let me have a crack at reviewing this one, even though it has two signoffs. I love this stuff. I just wanted to let you know that we're all pulling hard on a coming release, and apologize in advance if my review and inevitable merge slips a bit. FWIW: I'm so glad you've implemented this; it's gonna make a ton of people really happy. :)

DHowett avatar Oct 14 '22 23:10 DHowett

Commentary from the team-wide bug bash

blocking issues

  • [ ] Adding a hidden:true profile to a menu, then trying to open it causes a crash
  • [ ] Create a newTabMenu manually, with profiles that don't exist. Open the settings, and hit Save. This crashes 😨

Other notes

Not blocking - the team can totally just add this in post, before we ship 1.17

  • {
      "type": "folder",
      "name": "powershell source",
      "entries": [
         { "type": "profile" }
      ]
    }
    

    Looks like image

    That should probably be ignored.

  • {
      "type": "folder",
      "name": "powershell source",
      "entries": [
      ]
    }
    

    That should probably have a placeholder "" entry. There's more discussion about this in #12584 though, so we'll ideate on that for a while


Otherwise, I think we were all pretty dang delighted by this ☺️

zadjii-msft avatar Oct 25 '22 21:10 zadjii-msft

Moved screenshot from commit body

Screenshot: afbeelding

@FWest98 I'm 100% calling this "closes 1571"; we can file followups for specific future needs.

Thanks so much for doing this. I'm sorry we took more than two months to get this reviewed, but I'm so proud that we have contributors like you :smile:

DHowett avatar Oct 25 '22 22:10 DHowett

I believe source grouping was removed for later, so I pulled this bullet:

- Took some liberty in functionality to add multiple profiles at once,
  and while waiting for #12584, I added a special type of entry that
  represents all profiles generated by a given source. This works well
  for "all WSL profiles"-entries, but can also work for your own custom
  profiles when using the fragments functionality (like I do). This also
  allowed me to add some preparing work for more elaborate
  "multi-profile" entries, so future additions should be easier.

DHowett avatar Oct 25 '22 22:10 DHowett

Good to hear! Timing is good, almost at the end of my exam week so hopefully will have some time soon ™️ to work on this. If you think you can get the more extensive spec in #12584 finished sometime soon, I can probably include everything from that straightaway as well. Otherwise, I'll dust off my VS install after the weekend and see what I can do (still not upgraded my PC haha)

FWest98 avatar Oct 25 '22 22:10 FWest98

Something weird happened to me earlier today, but I think for expected reasons

image

    "newTabMenu":
     [
        { "type": "remainingProfiles" },
        {
            "type": "folder",
            "name": "WSL",
            "entries": [
                { "type": "profile", "profile": "Ubuntu 18.04" },
                { "type": "profile", "profile": "Ubuntu" },
                { "type": "profile", "profile": "Ubuntu 18.04.5 on Windows" },
                { "type": "profile", "profile": "Ubuntu 22.04.1 LTS" },
                { "type": "profile", "profile": "AlmaLinux-8" }
            ]
        }
    ],

But then we go down to my profiles:


            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": true,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl"
            },
            {
                "guid": "{51855cb2-8cce-5362-8f54-464b92b32386}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc"
            },

Something to note. I didn't expect this when I was editing my menu, but looking at my settings, like, yea, that makes sense.

zadjii-msft avatar Nov 04 '22 12:11 zadjii-msft

Hey @FWest98, we'd love to get this into the coming release! Would you mind having one of us jump in and help out? Totally fine if you'd rather not (or if you'd like to keep it an all-you effort.) Just wanted to make sure before we did :smile:

DHowett avatar Nov 17 '22 23:11 DHowett

What's the release timeline like? Then I think I can better make the call here based on my planning :)

FWest98 avatar Nov 17 '22 23:11 FWest98

@FWest98 That is a good question 😆

We don't really have a hard release date for 1.17 set at the moment. We've got the holidays coming up, so we've got no plans to try and release (and deal with hotfixes) till the new year.

That being said, I'd rather have this in closer to the start of December, so that we've got some time to iterate on whatever bugs we might find, and knock out implementing the matching bits of #12584 for 1.17 too.

Does that seem reasonable?

zadjii-msft avatar Nov 18 '22 19:11 zadjii-msft

Perfect! I will probably be able to brew something up before then and incorporate the remainder of the spec! If it doesn’t work out, I’ll let you know as soon as possible!

FWest98 avatar Nov 18 '22 20:11 FWest98

Took me much less time than expected; got all the requested changes implemented, as well as the full spec from #12584. Some notes:

  • I did not change to an interface format for the entries; I don't have the time to rework that much of the code
  • I renamed matchProfile to plural matchProfiles, since that's clearer to the user (it's multiple profiles to match), and it's in line with the phrasing of remainingProfiles.
  • I realised the matching profiles is quite useless when matching on command line or name, since there will typically be only one match. Only the source matching seems to actually be useful. So we might want to consider supporting regexes straightaway.
  • The semantics of having a matchProfiles entry with multiple parameters set is not defined in the spec. As a consequence of the implementation, it now behaves as a disjunction; but I can imagine a conjunction might be preferable from a semantic standpoint.
  • I made sure that the folder collapse for allowEmpty: false is done recursively; so if a folder with allowEmpty: false contains a folder with allowEmpty: false, and when that nested folder is empty, then the parent folder will also be considered empty (if there are no other entries, of course). A folder is also empty when the only entry it has is a collection that is empty. (or any combination of these conditions)
  • Lastly, invalid/not-found profiles are ignored and will not render, and will also be ignored when determining whether a folder is empty or not.

So, @zadjii-msft @DHowett, this is ready for another round of review :D

FWest98 avatar Nov 24 '22 01:11 FWest98

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view or the :scroll:action log for details.

Unrecognized words (104)
aabbcc
abbcc
ABORTIFHUNG
allocs
applets
backported
bbf
bgra
bitsets
caculate
clsids
codepoints
COLORREFs
colorschemes
consoleuwp
Copys
crisman
CUsers
ddae
DECARM
DECCARA
DECERA
DECFRA
DECRARA
DECSACE
DECSERA
DECXCPR
deserializers
dff
DPIs
DWORDs
eacbeb
entrypoints
exeuwp
fcc
fde
fef
finsh
fontinfo
frontends
Fullscreens
Geddy
GETKEYSTATE
gitmodules
hicon
IFolder
inbetween
ISoftware
IWIC
Jsons
lbl
lci
MAPVIRTUALKEY
noexcepts
Nop
NOTIMEOUTIFNOTHUNG
NTME
nto
nullopts
OEMs
otepad
Pdbs
pids
popups
ptrs
Qaabbcc
Qxxxxxxxxxxxxxxx
reallocs
rgbs
rosetta
roundtrips
runfuzz
runtest
screenshots
scrollbars
SFolder
subfolders
tabmenu
targetting
Tdd
teminal
terminalinput
terminalrenderdata
texttests
TODOs
toolbars
traceviewpp
tsgr
tvpp
UINTs
unittests
versionf
VKKEYSCAN
vsconfig
wchars
websites
websockets
wic
wincodec
windowsshell
wstrings
xamls
ZYXWVU
ZYXWVUTd
Previously acknowledged words that are now absent abcde abcdef ABCDEFG ABCDEFGH abcdefghijklmnopqrstuvwxyz ACTIVEBORDER ACTIVECAPTION addressof alloc antialias api APPICON applet apps architected argc args argv asm attr autogenerated AVI backend backport baz bcrypt bgcolor BGRA bitset blog bmp BRK bsearch buf bugfix byref bytearray callee cassert cbegin cctype CDATA cdecl cend cerr Cfg charset chcp checkbox checkboxes chrono cjk climits clocale clsid cmath Cmdlet cmdline cmp codebase codepoint colorref colorscheme combobox compat concat config conint constexpr CONTEXTMENU coord copymode cout cpp crbegin cref crend Crisman csharp CSIDL csproj Csr cstdarg cstddef cstdio cstdlib cstr cstring csv ctime ctor Ctx ctype curated cwchar cwctype cwd cxx cygwin CYRL DATAVIEW DATAW decls declspec decltype declval Dedupe deduplicate deduplicated deiconify deletable delims deps deque deref deserialization deserialize deserialized deserializer deserializing dest Devops DFF Dirs dll dllexport dllimport DOCTYPE doubleclick downlevel dpi dropdown DROPDOWNLIST dst dtor dword elif elseif endian endif endl endlocal ENQ enqueuing entrypoint enum envvar eol errorlevel ETB ETX exe executables expr failfast fallthrough fclose fcntl fgetc fgetwc fileno filepath filesystem FILETYPE finalizer FINDSTR FONTINFO fontlist forceinline foreach fprintf freopen frontend fstream fullscreen func gcy getchar getline GETSTATE GETTEXT getwriter github gitlab globals gmail Google GPUs grayscale grep gui hardcoded hardcodes hfile HICON HIGHLIGHTTEXT HINSTANCE HLS HMENU HMONITOR horiz HOTFIX hpp HRSRC hsv html http hxx icacls ico IData IDictionary IDispatch IEnumerable ifdef ifndef ifstream IList imagemagick Imatch impl ini inl INotify inout inplace intellisense interop interoperability iomanip iostream iot ipconfig IRender IState isupper iswdigit iswspace IWeb jpeg jpg json jsonc kbd keybinding keymap LATN LBound LEFTSHIFT len lhs linkpath Linq linux listbox localhost lowercased LPBYTE LPCOLORREF LPCSTR LPCWSTR LPDWORD LPINT LPPOINT LPRECT LPVOID lru ltrim ltype mailto malloc MAXLENGTH memcmp memcpy memmove memset MENUITEM Mersenne metadata mimetype mingw mkdir monospaced monostate mousewheel msbuild msdn MSGS msvcrt mui Mul multiline mutex mutexes namespace namespaced nano nbsp NDEBUG NEQ Nls NOCOLOR nodiscard noexcept NOHELP noinline noreturn nothrow notin NOTNULL novtable nowait NPM npos nuget nullopt nullptr nuspec NVR oauth oem ostream ostringstream outfile Outof OUTOFMEMORY params PBOOL PBYTE PCHAR pdb pdbonly PDWORD PHANDLE pid placeholders plist plugin png popd POPF popup posix pragma prebuilt precomp prefilled PRELOAD PREMULTIPLIED printf Progman proj psd PSHORT psm ptr ptrdiff PULONG pushd putchar putwchar PVOID PWCHAR PWORD pwsh qsort queryable Qxxxxxx rawinput rbegin rdbuf Readline readme readonly READWRITE realloc redirector refactor refactoring refcount regex resizable retval rgb rgba rhs RMENU rng roundtrip rtf Rtl rtrim runtests rvalue SAFECAST screenshot Scrollable scrollbar Scroller sdk searchbox selectany SERIALIZERS setfill setlocal setlocale setmode SETPOS SETTITLE setw SHANDLE SHGFP SHRT sizeof sprintf srand src sre ssh sstream standalone stdcall stderr stdexcept stdin STDIO stdout stoi stol stoul strikethrough stringstream strlen strtok structs STX subfolder submenu subspan substr svg swprintf symlink sys targetnametoken targetsize telnet telnetd templated testapp textbox threadpool tif tmux todo tokenized tokenizing toolbar tooltip toplevel towlower towupper transcoder truetype ttf TVPP typechecking typedef typeid typeinfo typename typeof ubuntu UCHAR ucs Uid uint uintptr ulong uncomment undef Unescape Unfocus unicode UNICODESTRING uninit uninstall unittest unpause upvote uri url urlencoded USASCII username userprofile ushort utf utils uuid uuidof vals Vcount vcxproj versioning Virtualizing VPATH vsnprintf vsprintf wav wchar WClass wcout wcschr wcscmp wcscpy wcslen wcsrchr wcstod wcstoul website websocket WEOF whitelisting Wiki Wikipedia WINDIR WINDOWFRAME WINDOWTEXT workflow WORKITEM wostream wprintf wsmatch wss wstring wstringstream www xaml xargs xml xmlns xor XPosition xsd xsize xterm xvalue YAML yml YPosition YSize zsh :arrow_right:
Some files were automatically ignored

These sample patterns would exclude them:

^\Qdoc/reference/windows-terminal-logo.ans\E$

You should consider adding them to:

.github/actions/spelling/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept :heavy_check_mark: these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands

... in a clone of the [email protected]:FWest98/OS-Windows_Terminal.git repository on the fw/profiles_dropdown branch (:information_source: how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.21/apply.pl' |
perl - 'https://github.com/microsoft/terminal/actions/runs/3594813827/attempts/1'
Errors (2)

See the :open_file_folder: files view or the :scroll:action log for details.

:x: Errors Count
:x: check-file-path 19
:information_source: minified-file 1

See :x: Event descriptions for more information.

:pencil2: Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

:warning: The command is written for posix shells. If it doesn't work for you, you can manually add (one word per line) / remove items to expect.txt and the excludes.txt files.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

:microscope: You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink:

:clamp: If the flagged items are false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it, try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

github-actions[bot] avatar Dec 01 '22 17:12 github-actions[bot]

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view or the :scroll:action log for details.

Unrecognized words (1)

NTME

Previously acknowledged words that are now absent Hirots WEOF :arrow_right:
To accept :heavy_check_mark: these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands

... in a clone of the [email protected]:FWest98/OS-Windows_Terminal.git repository on the fw/profiles_dropdown branch (:information_source: how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.21/apply.pl' |
perl - 'https://github.com/microsoft/terminal/actions/runs/3632690038/attempts/1'
:pencil2: Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

:warning: The command is written for posix shells. If it doesn't work for you, you can manually add (one word per line) / remove items to expect.txt and the excludes.txt files.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

:microscope: You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink:

If the flagged items are :exploding_head: false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it, try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

github-actions[bot] avatar Dec 06 '22 19:12 github-actions[bot]

  • The semantics of having a matchProfiles entry with multiple parameters set is not defined in the spec. As a consequence of the implementation, it now behaves as a disjunction; but I can imagine a conjunction might be preferable from a semantic standpoint.

Whoops, you're right, I didn't ever move https://github.com/microsoft/terminal/pull/12584#discussion_r937059973 into the spec itself.

on command line or name, since there will typically be only one match. Only the source matching seems to actually be useful. So we might want to consider supporting regexes straightaway.

That's a great point. I was probably the biggest proponent of regexes for matching on all my "commandline": "cmd /k #work ...." profiles. We've probably got a monthish before we ship 1.17 so we can noodle on that and ship it in a followup if we want. FWIW, I think the source matching is probably what most people were looking for, or at least, will be the most immediately valuable.

zadjii-msft avatar Dec 06 '22 19:12 zadjii-msft

FWIW on the topic of regex, we should get this one in first and then iterate :smile:

DHowett avatar Dec 06 '22 19:12 DHowett

FWIW on the topic of regex, we should get this one in first and then iterate 😄

ABSOLUTELY. I want to get this in this week for sure

zadjii-msft avatar Dec 06 '22 19:12 zadjii-msft

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

ghost avatar Dec 09 '22 22:12 ghost

:tada:Windows Terminal Preview v1.17.1023 has been released which incorporates this pull request.:tada:

Handy links:

ghost avatar Jan 24 '23 18:01 ghost