Commit Graph

10 Commits

Author SHA1 Message Date
Johannes Altmanninger
b1e681030b Add OSC 133 prompt end marker
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
2025-11-19 17:13:58 +01:00
Johannes Altmanninger
55b3b6af79 __fish_anypython: remove hardcoded list of minor versions
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
2025-11-19 16:40:57 +01:00
seg6
4ef1f993a1 share: functions: __fish_anypython: update Python 3 version list
Signed-off-by: seg6 <hi@seg6.space>

Part of #12044
2025-11-16 11:21:18 +01:00
Johannes Altmanninger
a53db72564 Mark private functions that don't need localization
See the next commit.

Part of #11833
2025-09-30 11:47:26 +02:00
Fabian Boehm
677e4ff698 anypython: Add more versions 2024-01-27 18:47:38 +01:00
ridiculousfish
6742d11a0e __fish_anypython: do not automatically run python3 on macOS
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.
2022-12-27 11:48:58 -08:00
Fabian Homborg
ea0a0991a1 anypython: Try supported numbered python3 versions
In case someone doesn't even have a `python3` symlink.
2020-05-10 22:49:25 +02:00
Fabian Homborg
c392a05db0 functions/__fish_anypython: Also try python{3,2}.7
NetBSD!!!!! *shakes fist*
2019-06-25 19:40:22 +02:00
Fabian Homborg
c2970f9618 Reformat all files
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.
2019-05-05 12:09:25 +02:00
Fabian Homborg
9b1fb6938e Add __fish_anypython helper function
This just finds the first usable python and echos it, so it can then
be used.

We have a few places where we use it and I'm about to add some more.
2019-03-09 18:04:21 +01:00