Commit Graph

5658 Commits

Author SHA1 Message Date
Johannes Altmanninger
28e8f45828 fish_config theme choose: correct error message for standalone builds 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
ac8ef4da9e fish_config: don't redo __fish_bin_dir computation
__fish_bin_dir is already computed exactly like this.
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
52241712b4 fish_vi_key_bindings: hack to prevent error when overriding fish_vi_cursor
As discovered in https://matrix.to/#/!YLTeaulxSDauOOxBoR:matrix.org/$BFAjMPXBA9UczLT8h-7XpiyGUDv0Cz5g6ijbgdEVl_w
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
b82920dc26 fish_delta: share logic between standalone and installed builds 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
f72ebca1e4 fish_delta: fix spurious output in standalone builds 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
40d772fde3 share: share logic between standalone and installed builds 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
d4837f9ef1 fish_config prompt choose: reset mode prompt and load it like right prompt
Fixes #11937
2025-10-15 12:00:24 +02:00
Alan Wu
b44209e14e Nim sample prompt: Don't print replace_one mode twice
Previously, it showed `[R]` twice when  `fish_bind_mode` is `replace_one`:

```console
┬─[user@hostname:~]─[00:00:01 PM][R]
─[R]
╰─>$ 
```

Closes #11942
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
531269bb84 fish_config theme {choose,save}: share logic between standalone and installed builds 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
80faf5e805 fish_config theme show: load fish_config's internal functions too
To be used in the next commit.
The comment seems incorrect.
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
0d5fd181be tests/fish_config: share logic between standalone and installed builds 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
8c279b854d fish_config theme {choose,save}: explode color list
Easier to cross-reference and update this way.
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
f1f95c6867 fish_config theme {choose,save}: use early return 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
ecedd8caed fish_config theme: share logic between standalone and installed mode 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
ce5b5ec053 fish_config prompt {choose,save}: delete code clone
The "choose" one did not define fish_prompt unconditionally but that
looks like a bug.
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
37e0a5ae8d fish_config prompt save: don't define right prompt unnecessarily
If no "fish_right_prompt" is defined, then we also don't need to
define and save an empty one.  We can do nothing, which seems cleaner.
It's also what "fish_config prompt choose" does.  Git blame shows no
explicit reason for for this inconsistency.

Probably the implicit reason is that when both styles where introduced
(both in 69074c1591 (fish_config: Remove right prompt in `choose` and
`save`, 2021-09-26)), that was before the "fish_config prompt choose:
make right prompt hack less weird" commit, so the "prompt choose"
code path didn't know whether the prompt existed until after checking,
hence "--erase" was more suitable.. but that inconsistency is gone.
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
5792df9738 fish_config prompt: share logic between standalone and installed mode 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
a216cfdd2f fish_{config,update_completions}: extract function for standalone builds 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
f72b833e38 fish_config theme save: reset prompts in standalone builds too 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
45a3f4f1d6 fish_config prompt {choose,save}: remove dead code
Introduced by dd0d45f88f (fish_config prompt: remove dead code,
2025-09-28).
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
3aab119e5b fish_config prompt save: extract loop 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
0a1ca206fa fish_config prompt save: use early return 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
028e05fff1 fish_config prompt choose: improve right prompt hack
Rather than first sourcing the prompt, and then erasing the right
prompt unless the prompt file defined the right prompt, start by
erasing the right prompt.  This is simpler (needs no conditional).
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
dabd956216 fish_config prompt show: make indentation more helpful 2025-10-15 12:00:24 +02:00
Johannes Altmanninger
441f90fb55 __fish_data_list_files: fix for installed builds
This is only used in test code where bad output is ignored.
To be tested by a following commit.
2025-10-15 12:00:24 +02:00
Johannes Altmanninger
48bdf24964 __fish_data_with_file: better variable name 2025-10-14 12:37:26 +02:00
Johannes Altmanninger
fed2714e30 Rename abstraction for standalone/installed data files 2025-10-14 12:02:08 +02:00
Johannes Altmanninger
f03113d048 __fish_cache_put: fix for BusyBox stat
On alpine, tests/checks/check-completions fails with

	stat: can't read file system information for '%u:%g': No such file or directory
2025-10-12 07:17:48 +02:00
Johannes Altmanninger
6c48e214ca tests/checks/check-completions: fix for embed-data builds 2025-10-12 07:17:48 +02:00
Johannes Altmanninger
189a2e90dd __fish_print_commands: remove code clone
Also, use it for help completions also on embed-data builds.
2025-10-12 07:11:35 +02:00
Johannes Altmanninger
9b44138917 __fish_print_commands: fix environment variable injection 2025-10-12 07:08:24 +02:00
Johannes Altmanninger
d0aaa8d809 create_manpage_completions: fix deprecation warning
Fixes #11930
2025-10-11 17:54:09 +02:00
Johannes Altmanninger
b3a295959d webconfig: remove obsolete macOS workaround
As mentioned in #11926 our "fish_config" workaround for macOS
10.12.5 or later has been fixed in macOS 10.12.6 according to
https://andrewjaffe.net/blog/2017/05/python_bug_hunt/, I think we
can assume all users have upgraded to that patch version Remove
the workaround.
2025-10-11 17:54:09 +02:00
Nahor
65332eaacc Add test for fish_config in browser modified
In particular
- test that it will return an error if the URL is invalid
- that the main page matches the index.html in git
- that "Enter" key will exit

Part of #11907
2025-10-11 17:54:09 +02:00
Nahor
6415dfbd35 Ensure different network ports in fish_config
- Windows allows port reuse under certain conditions. In fish_config
case, this allows the signal socket to use the same port as http (e.g.
when using MINGW python). This can cause some browsers to access the
signal socket rather than the http one (e.g. when connecting using
IPv4/"127.0.0.1" instead of IPv6/"::1").
- This is also more efficient since we already know that all ports up to
and including the http one are not available

Fixes #11805

Part of #11907
2025-10-11 17:54:09 +02:00
Johannes Altmanninger
f7d730390c Rename process id -> process ID 2025-10-11 11:47:34 +02:00
Daniel Rainer
5ade4a037e style: replace black with ruff for Python formatting
Ruff's default format is very similar to black's, so there are only a
few changes made to our Python code. They are all contained in this
commit. The primary benefit of this change is that ruff's performance is
about an order of magnitude better, reducing runtime on this repo down
to under 20ms on my machine, compared to over 150ms with black, and even
more if any changes are performed by black.

Closes #11894

Closes #11918
2025-10-09 18:12:03 +02:00
Fabian Boehm
eddb26d490 completions/ssh: Don't read ":" from historical hosts
Fixes #11917
2025-10-09 17:14:09 +02:00
Johannes Altmanninger
15065255e9 fish_config: fix regression "theme show" not showing custom themes
This regressed in 6f0532460a5~2..6f0532460a5 (fish_config: fix for
non-embedded builds, 2025-09-28).

Fixes #11903
2025-10-07 21:54:26 +02:00
Xiretza
b7fabb11ac Make command run by __fish_echo output to TTY for color detection
Without this, e.g. Alt-L shows the directory entries one per line and
without colors.

Closes #11888
2025-10-06 13:39:30 +02:00
Jesse Harwin
b5c17d4743 completions/bind: bug fixes, cleanup, and complete multiple functions
Revamped and renamed the __fish_bind_test2 function. Now has a
more explicit name, `__fish_bind_has_keys`  and allows for multiple
functions after the key-combo, doesn't offer function names after an
argument with a parameter (e.g. -M MODE).

Logic on the function is now more concise.

Closes #11864
2025-10-05 15:16:41 +02:00
Jesse Harwin
66ca7ac6d0 completions/bind: removed the unused __fish_bind_test1 function 2025-10-05 15:16:41 +02:00
Johannes Altmanninger
e97a616ffa completions/bind: don't suggest key names if --function-names is given
This combination makes no sense and should be an error.  (Also the
short options and --key-names were missing, so this was quite
inconsistent.)

See #11864
2025-10-05 15:16:41 +02:00
Ilya Grigoriev
061517cd14 completion/set: fix bug preventing showing history or fish_killring
Previously, `set -S fish_kill<TAB>` did not list `fish_killring`. This
was because `$1` wasn't sufficiently escaped, and so instead of
referring to a regex capture group, it was always empty.

Closes #11880
2025-10-05 15:16:41 +02:00
Johannes Altmanninger
c2e2fd6432 fish_add_path: remove extra argument to printf 2025-10-05 15:16:41 +02:00
Daniel Rainer
83af5c91bd printf: remove all uses of length modifiers
Length modifiers are useless. This simplifies the code a bit, results in
more consistency, and allows removing a few PO messages which only
differed in the use of length modifiers.

Closes #11878
2025-10-05 15:16:41 +02:00
Étienne Deparis
8adc598e90 web_config: Support long options separated with = from their value
Closes #11861
2025-10-03 20:18:38 +02:00
Étienne Deparis
c884c08257 web_config: Use None as default for underline style
Underline is no more a boolean and should be one of the accepted style,
or None. By keeping False as default value, web_config was generating
wrong --underline=False settings

Part of #11861
2025-10-03 20:18:38 +02:00
Fabian Boehm
97acc12d62 Fix scp completions
Introduced when __fish_mktemp_relative was.

Fixes #11860
2025-10-02 18:20:41 +02:00
Johannes Altmanninger
508ae410a6 builtin commandline: fix completion description 2025-09-30 11:47:26 +02:00