iTerm2 displays commands in other UI widgets such as in Command History
(View → Toolbelt → Command History). This needs prompt end marker
so the terminal can distinguish prompt from the command line.
Closes#11837
We always use python3 but don't use, say python3.999 until we update
our hardcoded list. This is inconsistent (we're careful about the
latter but not the former). Fix this by always picking the highest
minor version (>= 3.5+) there is. This also reduces maintenance work.
Note that NetBSD is the only OS we know about that doesn't provide
the python3 symlink OOTB. In future, the NetBSD package should
add a patch to replace "python3" in __fish_anypython.fish
with the correct path. Downstream discussion is at
https://mail-index.netbsd.org/pkgsrc-users/2025/11/17/msg042205.html
macOS ships with a stub `/usr/bin/python3` which by default opens a
dialog to install the command line tools. As we run `python3` initially
at launch, this causes the dialog to appear on first run of fish, if the
command line tools are not installed.
Fix this by detecting the case of `/usr/bin/python3` on Darwin without
the command line tools installed, and do not offer that as a viable
python.
This runs build_tools/style.fish, which runs clang-format on C++, fish_indent on fish and (new) black on python.
If anything is wrong with the formatting, we should fix the tools, but automated formatting is worth it.