Commit Graph

22843 Commits

Author SHA1 Message Date
Johannes Altmanninger
ef626cfdf9 uvar migration: clarify it's about 4.3 or higher 2026-05-11 10:41:14 +08:00
Johannes Altmanninger
30976d8970 uvar migration: recogize more historical defaults as such
During our one-time migration away from universal variables,
we create ~/.config/fish/conf.d/fish_frozen_theme.fish
if we think that the current theme is different from the default.

The default uvar-backed theme had changed over time, but existing
installations would not be upgraded.  Because of this, we have
a heuristic that assumes that values coinciding with historical
default values also stem from a default.  Some historical values are
missing. Add them.

There are more left, see 03b23dd1b6 (Update default colors,
2022-01-27).

Fixes #12725
2026-05-11 10:41:14 +08:00
Johannes Altmanninger
d601ceb55b fish_command_not_found: move non-interactive logic
In non-interactive shells we only ever use our simple command-not-found
handler; the fancy ones are only intended for interactive shells, see
537ab32dd9 (Add support for the Ubuntu 'command-no-found' handler,
which suggests a package to install in order to get a command.,
2008-01-15).

I'm not sure if this behavior difference is really a good idea,
but I guess we can avoid rocking the boat for now.

Make the implementation less surprising by moving it into the obvious
file. No behavior change intended.
2026-05-11 10:41:14 +08:00
Johannes Altmanninger
6e036740de fish_command_not_found: remove legacy event handler
We no longer emit the "fish_command_not_found" event ourselves,
so the event handlers are only useful to users who
1. run "emit fish_command_not_found"
2. copy the definition of "fish_command_not_found" to their config and run
   that with fish < 3.2.

Probably no one does 1; there are no matches in
https://github.com/search?utf8=%E2%9C%93&q=%22emit+fish_command_not_found%22+language%3Afish&type=code

Reason 2 is less relevant after 5 years.

For additional evidence, none of our specializations
("/usr/libexec/pk-command-not-found" etc.)  react to the event,
and no one has ever complained.

Stop registering any fish_command_not_found as event handler,
for consistency and simplicity.

While at it, remove the documentation on how to make it work for
version < 3.2.
2026-05-11 10:24:12 +08:00
Johannes Altmanninger
e25ebf1067 handle_command_not_found: extract constant 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
1f870b360a fish_command_not_found: deduplicate /etc/os-release regex 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
c1a6f6ddc8 fish_command_not_found: remove duplicate function definition 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
184f4f6571 share: remove redundant continuation lines escaping 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
3dc36f74bc Don't print greetings in interactive read in fake-interactive shell
If a user passes "-i" when running a script, they ought to expect
weird behavior i.e. fish might run the user's interactive-only
configuration which might print things to TTY etc.  But at least
for our part of the configuration, we can avoid depending on the
user-settable interactive bit.

__fish_config_interactive is already only called when we paint the
first prompt, either for a prompt (which implies we're an interactive
shell) or for builtin read (which does not imply anything about the
interactivity of the shell).

Only print greetings when not in interactive read. Notably, "status
is-interactive-read" is not overridable by the user.

This helps us get rid of more "status is-interactive" switches.
2026-05-11 10:21:56 +08:00
Johannes Altmanninger
9374410bb6 fish_git_prompt: remove checks for interactive bit
The "if status is-interactive" was added by ae593decfc (Replace
__fish_git_branch_prompt.fish with __fish_git_prompt.fish, 2012-06-20)
presumably to avoid repaints in noninteractive cases.  The repaints
have been removed in 76457bdc4e (fish_git_prompt: Remove repaint
from variable handlers, 2021-03-04) so this is no longer necessary.
2026-05-11 10:21:56 +08:00
Johannes Altmanninger
1e0ff8712d share: use "status is-*" instead of old-school "status --is-*" 2026-05-11 10:21:56 +08:00
Nahor
e697f960c8 windows build: disable lint checks
There is already a GitHub workflow doing lint checks so it is redundant
and wastes time (4+ min).
 
Moreover, other platforms do not do it, so when it fails, it gives
the appearance that there is a Windows specific build issue beyond
linting.

Closes #12740
2026-05-10 23:52:47 +02:00
Daniel Rainer
cab3bdabc4 l10n: update PO files 2026-05-10 15:18:40 +02:00
Fabian Boehm
5c6acdee09 string shorten: Don't produce output with --quiet
This would've printed stuff in case it didn't have to shorten (which
means it "failed" because the logic is "did something").

Fixes #12732
2026-05-10 11:16:41 +02:00
huaji2369
a9cc505d62 completions/waydroid:
add completions for adb/bugreport
add package name completions for app launch/remove
replace all -fr with -x
2026-05-09 21:55:20 -07:00
Nahor
6c6b53cdd8 check.sh: on Cygwin, only re-run the tests that mention ln
On Cygwin, check.sh was running all the tests twice, one with symlinks
enabled, and one without. But most tests do no use symlinks so
re-running those does not test anything new and it's just a major waste
of resources and time (and cygwin is quite slow already).
So only re-run the tests that use symlinks, i.e. that use `ln`.

Filter on mentions of `ln` and not `cygwin_nosymlink` because the latter
is only needed when a test would fail in one of the two scenarios, and
not all tests with symlinks do.
2026-05-09 20:38:50 -07:00
Remo Senekowitsch
f5ff9aac2b completions/dive: add image tags from podman 2026-05-09 20:20:11 -07:00
Remo Senekowitsch
0ddad4fcb1 completions/dive: use upstream completions for builtins 2026-05-09 20:20:11 -07:00
Justin Su
7d1604a116 docs/read: Clarify that --null cannot be used with --line
Fixes issue #12726
2026-05-09 20:04:33 -07:00
Peter Ammon
aa5ecd0efa Make the tmux-history-search2 test more reliable 2026-05-09 18:37:07 -07:00
David Adam
0fafff2c89 CMake: stop installing embedded files
Completions, functions, tools, and various ancillary files have been
shipped within the fish binary for some time. We don't need two copies
in packages, plus some of them are never read from the filesystem.
2026-05-10 02:06:04 +08:00
Johannes Altmanninger
1b18d08611 Fix zellij completions
Note that on some distros, this is shadowed by
/usr/share/fish/vendor_completions.d/zellij.fish.
2026-05-08 01:33:49 +08:00
Johannes Altmanninger
5a2e9f4f3c build_tools/release.sh: update milestones even when pushing fails 2026-05-08 01:33:49 +08:00
Johannes Altmanninger
c592b5d957 start new cycle
Created by ./build_tools/release.sh 4.7.1
2026-05-08 01:33:49 +08:00
Johannes Altmanninger
77285d46b8 Merge tag 4.7.1 2026-05-08 01:33:49 +08:00
Johannes Altmanninger
efb0223da1 Release 4.7.1
Created by ./build_tools/release.sh 4.7.1
4.7.1
2026-05-08 00:02:14 +08:00
Johannes Altmanninger
b6f30f11e4 webconfig: hack webconfig to fake interactive colors
Commit e2b18fc5b6 (config.fish: don't load default theme in
noninteractive shells, 2026-04-28) broke webconfig: since "fish_config
theme choose default" was removed from non-interactive shells,
webconfig won't know the current theme in interactive shells.

Fix this by adding secret knob that allows webconfig to have
noninteractive fish set the same colors as interactive fish again.

This assumes that plugins won't need the knob, i.e. won't need to
know the "current" theme.

Alternatively, webconfig could run "fish -i" but that could cause
issues if an "if status is-interactive" block in user-config does
something naughty such as writing to stdout even if it's not a terminal.

Alternatively, we could do

	fish -c '
		if test -z "$(__fish_theme_variables)"
			fish_config theme choose default
		end
		# can dump current theme now
	'

but that does not feel as reliable (what if the user explicitly does
"set -e" on all color variables or).

Fixes #12717
2026-05-08 00:01:25 +08:00
Remo Senekowitsch
4296e9bd75 completions/zellij: add upstream completions
Closes #12723
2026-05-07 17:52:21 +02:00
Remo Senekowitsch
894ca81464 completions/mise: add upstream completions
Part of #12723
2026-05-07 17:52:16 +02:00
Remo Senekowitsch
7c53bded3a completions/chezmoi: add upstream completions
Part of #12723
2026-05-07 17:52:00 +02:00
Remo Senekowitsch
163f25d516 completions/niri: add upstream completions
Part of #12723
2026-05-07 17:51:44 +02:00
Remo Senekowitsch
d8e73d2263 completions/just: use upstream completions
Closes #12722
2026-05-07 17:51:21 +02:00
Johannes Altmanninger
fb29c85a62 start new cycle
Created by ./build_tools/release.sh 4.7.0
2026-05-06 14:51:33 +08:00
Johannes Altmanninger
e071de3b68 Release 4.7.0
Created by ./build_tools/release.sh 4.7.0
4.7.0
2026-05-05 15:24:27 +08:00
Nahor
ed6fe3f315 tmux-history-search2: fix test on WSL or in console sessions
Those two do not use the "return symbol"

Closes #12704
2026-05-05 14:57:42 +08:00
Nahor
4f539dffaf cd: fix path when trying to cd out of the root directory
Part of #12704
2026-05-05 14:57:42 +08:00
Remo Senekowitsch
d885e0efd7 completions/date: add rfc-3339 option
Closes #12703
2026-05-05 14:57:23 +08:00
Johannes Altmanninger
330e897acc Update changelog 2026-05-05 14:55:56 +08:00
Peter Ammon
b638aa198f Make the tmux-history-search2.fish test pass reliably on macOS 2026-05-03 19:50:26 -07:00
Peter Ammon
fd44c23678 Suppress an annoying warning on nightly
Prior to this commit, running

> cargo +nightly bench --features benchmark --no-run

Reports:
warning: feature `test` is declared but not used
 --> src/lib.rs:1:58
  |
1 | #![cfg_attr(all(nightly, feature = "benchmark"), feature(test))]
  |                                                          ^^^^
  |
  = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default

Which is a false positive. Allow unused features in this cfg_attr.
2026-05-03 18:03:37 -07:00
David Adam
f84179f8fe RPM/Debian packaging: add pkg-config dependency
This is required by the pcre2 crate to find the system PCRE2 library.
2026-05-03 23:05:03 +08:00
Johannes Altmanninger
71d6ec4ab9 wcsfilecmp: make sure trailing slashes sort first
This command

	cd $(mktemp -d)
	mkdir a "a b"
	complete -C": "

prints

	a b/
	a/

which is wrong ordering.
Usually the trailing slash should not be compared.

Fix this by always sorting slashes first.  Not sure if this is correct
for middle slashes but I couldn't find a case where it matters.

Closes #12695
2026-05-03 20:04:21 +08:00
Johannes Altmanninger
683e4c8d15 wcsfilecmp: extract function, use shadowing 2026-05-03 20:04:21 +08:00
xtqqczze
d7cc3c7bb6 format: use 2-space indents in toml files
Closes #12699
2026-05-03 20:04:21 +08:00
Johannes Altmanninger
9370830733 Make profiling API a bit harder to misuse 2026-05-03 20:03:46 +08:00
Johannes Altmanninger
161f31f42b run_1_job: remove code clone for profiling 2026-05-03 20:03:46 +08:00
Johannes Altmanninger
5998421410 Remove obsolete Send/Sync impls for ParsedSource 2026-05-03 20:03:46 +08:00
David Adam
5b1e163f22 docs/function: add caution about shadowing builtins
See #3000, #12962
2026-05-02 15:14:33 +08:00
Johannes Altmanninger
7c5fc85d96 builtin commandline: fix unintuitive clone 2026-05-01 18:35:41 +08:00
Johannes Altmanninger
2f9f46b2a5 eval_node: extract function for getting exec counts 2026-05-01 18:35:41 +08:00