Commit graph

19629 commits

Author SHA1 Message Date
Thayne McCombs
7ea2ab4ebb fix[completions]: Add set-timeout to bootctl
(cherry picked from commit 33dd823f45)
2025-01-04 20:18:12 +08:00
Johannes Altmanninger
e6e647092d Fix off-by-one error in Vi-style upcase-word at commandline end
cursor_selection_mode=inclusive means the commandline position is
bounded by the last character. Fix a loop that fails to account
for this.

Fixes d51f669647 (Vi mode: avoid placing cursor beyond last character,
2024-02-14).

This change looks very odd because if the commandline is like

	echo foo.

it makes us try to uppercase the trailing period even though that's
not part of word range.  Hopefully this is harmless.

Note that there seem to be more issues remaining, for example Vi-mode
paste leaves the cursor in an out-of-bounds odd position.

Fixes #10952
Closes #10953

Reported-by: Lzu Tao <taolzu@gmail.com>

(cherry picked from commit 69f0d960cf)
2025-01-04 20:17:32 +08:00
Fabian Boehm
5845a3f7ad __fish_complete_subcommand: Just complete -C for a given commandline
Fixes #10980.

This would, if a commandline was given, still revert to checking
the *real* commandline if it was empty.

Unfortunately, in those cases, it could have found a command and tried
to complete it.

If a commandline is given, that is what needs to be completed.

(note this means this is basically useless in completions that use it
like `sudo` and could just be replaced with `complete -C"$commandline"`)

(cherry picked from commit d5efef1cc5)
2025-01-03 19:35:14 +01:00
Alexei Mikhailov
ff8a879e80 completions/exercism: use generate script
Exercism ships with it's own completions and a generation script, so let's use
that one instead.

(cherry picked from commit 9b26fff278)
2025-01-02 21:57:57 +08:00
Klaus Hipp
6749a44d0f Update code completions
(cherry picked from commit 2b46d97c68)
2025-01-02 14:12:00 +08:00
EmilyGraceSeville7cf
550a076fa3 feat(completion) support batsh command
(cherry picked from commit 1bda6043c8)
2025-01-02 09:16:26 +08:00
EmilyGraceSeville7cf
c28659a045 feat(completion): support folderify command
(cherry picked from commit d8d5913159)
2025-01-02 09:16:26 +08:00
Benjamin Kellermann
d2608588fc add completion for btrbk (#10752)
* add completion for btrbk

completions for btrbk https://github.com/digint/btrbk/

* change indent + spaces

(cherry picked from commit 2ac1523e54)
2025-01-02 09:16:26 +08:00
Ilya Grigoriev
dd333cdc82 completions/tmux: add skeleton "Windows and Panes" bindings (#10854)
These are quite mechanical, but include all the commands (as of tmux
3.5a) in the "Windows and Panes" section of `man tmux`. For these
commands, I included the target-pane/session/client/window flags and the
-F formatstring flags (but not the less generic flags specific to
individual commands).

Nice completion is implemented for those flags where the helper
functions were already implemented previously.

After this, tmux pane<tab> will hopefully be useful.

A few TODOs mention low-hanging fruit for somebody who better
understands fish's `complete` command syntax (or a future me).

Another piece of low-hanging fruit would be completion for all the
target-window flags. This PR merely lists them.

(cherry picked from commit b1064ac3a0)
2025-01-02 09:14:37 +08:00
Fabian Boehm
57a7920e15 CHANGELOG since 4.0b1 2024-12-31 14:35:55 +01:00
Grant Hutchins
2f99a82700
Improve documentation for string escape
Before, it unnecessarily stated that there are three `--style` options, when
there are actually four.

I also align the default `--style=script` argument to the beginning of the line
to match the other options visually for easier scanning.
2024-12-29 13:49:05 -08:00
Fabian Boehm
5f76fc3e41 Add status buildinfo (#10896)
This can be used to get some information on how fish was built - the
version, the build system, the operating system and architecture, the
features.

(cherry picked from commit 6f9ca42a30)
2024-12-29 13:37:29 +01:00
Joan Bruguera Micó
c0a2b55efd
Create new base directories with mode 0700
If base directories (e.g. $HOME/.config/fish) need to be created,
create them with mode 0700 (i.e. restricted to the owner).
This both keeps the behavior of old fish versions (e.g. 3.7.1) and is
compliant with the XDG Base Directory Specification.

See: https://specifications.freedesktop.org/basedir-spec/0.8/#referencing
2024-12-28 12:14:14 -08:00
Fabian Boehm
f75912d205 Create release-with-debug cargo profile, hook it up with cmake
Fixes #10959

(cherry picked from commit 66b80041cc)
2024-12-28 16:04:18 +01:00
Kid
701853fdd3 docs: Distinguish documents in sidebar
(cherry picked from commit a579abb81b)
2024-12-28 08:42:59 +01:00
Dmitry Gerasimov
ea2c53ca85
completions/dnf: Fix completions for DNF5 (#9862)
Since DNF5 there's no implicit \n in repoquery output. For DNF4 this change
leaves blank lines in the output, but they are ignored anyway.
2024-12-26 12:02:22 -08:00
phanium
06105e9207 Fix alt-e cursor position restore on Vim <= 8 (#10946)
Cherry-picked from commit 94dfe1b053
2024-12-26 06:40:41 +01:00
David Adam
e858322749 Debian packaging: add some missing runtime dependencies
(cherry picked from commit eade6a5672)
2024-12-26 13:37:30 +08:00
David Adam
bd2ddda9a4 update CMake requirement
find_rust uses LIST(POP_BACK), which was added in 3.15.

(cherry picked from commit 044cea1bf3)
2024-12-26 13:37:30 +08:00
David Adam
6db110916b Debian packaging: reformat dependencies
(cherry picked from commit 74b1247461)
2024-12-26 13:37:30 +08:00
Fabian Boehm
d707a516d2 docs: Use grid in the CSS (#10942)
Instead of hardcoded 230px margin.

This also makes the ToC only take up a third of the screen when
narrow, and lets you scroll the rest.

Without, you'd have to scroll past the *entire* ToC, which is awkward

Remaining issue is the search box up top. Since this disables the one
in the sidebar once the window gets too narrow, that one is important,
and it isn't *great*

(cherry picked from commit 9b8793a2df)
2024-12-25 14:50:29 +01:00
Fabian Boehm
aed52049ab Remove SIGUNUSED
It is, as the name implies, unused - it became SIGSYS, which we
already check.

Since it is entirely undefined on some architectures it causes a build
failure there, see discussion in #10633
2024-12-23 17:01:04 +01:00
Johannes Altmanninger
5fed900b94 Temporary workaround for BSD WEXITSTATUS libc bug
The libc crate has a bug on BSD where WEXITSTATUS is not an 8-bit
value, causing assertion failures.

Any libc higher than our 0.2.155 would increase our MSRV, see libc
commit 5ddbdc29f (Bump MSRV to 1.71, 2024-01-07), so we want to
woraround this anyway.  It's probably not worth using a patched
version of libc since it's just one line.

While at it, tighten some types I guess.

Upstream fix: https://github.com/rust-lang/libc/pull/4213

Closes #10919

Cherry-picked from c1b460525c
2024-12-23 14:43:37 +01:00
Johannes Altmanninger
70ba81e5b3 Provide old implementation of cancel-commandline as fallback
__fish_cancel_commandline was unused (even before) and has some issues
on multiline commandlines. Make it use the previously active logic.

Closes #10935

Cherry-picked from 5de6f4bb3d
2024-12-23 14:43:33 +01:00
Johannes Altmanninger
f237fb7b9f Changelog: move over the bits that apply to this branch
This seems more logical, especially since these need not be mentioned
in the "final" 4.0.  When we merge the integration branch back into
master, we can combine changelog additions, so it won't be lost
from master.
2024-12-23 14:32:30 +01:00
Fabian Boehm
7069f3fe40
Allow installable builds to be installed into a specific path (#10923)
* Pass path to install()

It was dirty that it would re-get $HOME there anyway.

* Import wcs2osstring

* Allow installable builds to use a relocatable tree

If you give a path to `--install`, it will install fish into a
relocatable tree there, so

PATH/share/fish contains the datafiles
PATH/bin/fish contains the fish executable
PATH/etc/fish is sysconf

I am absolutely not sold on that last one - the way I always used
sysconfdir is that it is always /etc. This would be easy to fix but
should probably also be fixed for "regular" relocatable builds (no
idea who uses them).

An attempt at #10916

* Move install path into "install/" subdir

* Disable --install harder if not installable
2024-12-22 18:13:29 +01:00
Johannes Altmanninger
1e7de063bd Fix regression of builtin read not exiting on ctrl-c
Commit 8bf8b10f68 (Extended & human-friendly keys, 2024-03-30) stopped
ctrl-c from exiting without a motivation. Unfortunately this was
only noticeable on terminals that speak the kitty keyboard protocol,
which is probably no one had noticed so far.

Closes #10928
2024-12-21 05:54:52 +01:00
David Adam
541f8b47bf Revert "Add completions for dust"
This reverts commit 27c7578760.

dust generates its own completions (which are shipped in the wrong spot
in the Debian packages, but which are also more up-to-date).

Closes #10922.
2024-12-19 19:49:01 +08:00
David Adam
6eec2db292 fish.spec: update dependencies for the terminfo database
RH/Fedora and openSUSE use different package names.

Closes #10920.
2024-12-19 14:48:01 +08:00
Johannes Altmanninger
039011bc81 Make full autosuggestions case-correcting again
Fixes ca21872d14 (Clean up the accept-autosuggestion code path a
little bit, 2024-11-14).
Fixes #10915
2024-12-18 19:02:27 +01:00
metamuffin
9abec243a4
Completions for mksquashfs (#10909) 2024-12-18 10:36:30 -06:00
Fabian Boehm
f89e26b06e installable: Reword $HOME error 2024-12-18 17:26:25 +01:00
David Adam
80d53b129f macOS codesigning: use stable Rust
The apple-codesign crate has a fairly aggressive MSRV policy, and the
compiler itself still targets 10.12 which is well below the minimum
version of macOS for aarch64. Just use stable.
2024-12-18 23:38:13 +08:00
Ilya Grigoriev
7162822486 rclone.fish: assume a recent version if the version cannot be parsed
The version of rclone is set during compilation and could be any crazy string depending on the packager, whether it's a dev build, etc. If it cannot be parsed, let's assume a recent version.

Follows up on cc8fa0f7
2024-12-18 15:31:51 +01:00
David Adam
7c2a379674 RPM/Debian packaging: add find dependency
Closes #10913
2024-12-18 11:04:41 +08:00
Klaus Hipp
25534bf657 Add tex-fmt completions 2024-12-18 02:21:57 +08:00
David Adam
687001f8b7 Merge branch 'Integration_4.0.0'
This merge throws away a commit from master which was a duplicate of one on
Integration_4.0.0, and just allows the history to remain mostly-linear.
2024-12-17 23:54:00 +08:00
David Adam
e6fea730e2 Update Cargo.lock with version number bump from Cargo.toml 2024-12-17 23:48:48 +08:00
Fabian Boehm
b56bb80a14 tests/version: Update for "-beta"
We used to call our beta versions "...b1", but cargo doesn't like
that.

So we need to adjust the regex here.
2024-12-17 16:44:34 +01:00
Fabian Boehm
5fc47f37a6 Update Cargo.lock
This includes the crate version, so any build would otherwise claim
it's "dirty"
2024-12-17 16:44:10 +01:00
David Adam
8557c3c48c Release 4.0b1 2024-12-17 22:51:11 +08:00
David Adam
c54dfa12c1 CHANGELOG: work on 4.0.0 2024-12-17 22:23:32 +08:00
Klaus Hipp
67fa71a94d
Update zed completions (#10907)
Add uninstall option.
2024-12-16 19:42:57 -06:00
Johannes Altmanninger
0275c5e803 Swap variable overrides and time in not statement
This is allowed

	time a=b echo 123

but -- due to an oversight in 3de95038b0 (Make "time" a job prefix,
2019-12-21) -- this is not allowed:

	not time a=b echo 123

Instead, this one one works:

	not a=b time echo 123

which is weird because without the "not" this would run "/bin/time".

It seems wrong that "not" is not like the others. Swap the order
for consistency.

Note that unlike "not", "time" currently needs to come before variable
assignments, so "a=b time true" is disallowed. This matches zsh. POSIX
shells call "/bin/time" here. Since it's ambiguous, erroring out seems
fine. It's weird that we're inconsistent with not here but I guess
"command not" is not expected to have subtly different behavior.

Closes #10890
2024-12-16 06:33:47 +01:00
Johannes Altmanninger
8fd0399ed3 Remove runaway kw_builtin in not statement definition
This was added accidentally in 971d257e67 (Port AST to Rust,
2023-04-02).  It does not seem to be causing an observable effect
(although I didn't try hard).
2024-12-16 06:33:47 +01:00
Johannes Altmanninger
ac951427af Fix alt-l on multiline tokens
This would invoke test with extra arguments.
2024-12-16 06:33:47 +01:00
Fabian Boehm
95f4c9c07e One more FreeBSD-only-in-CI 2024-12-15 17:38:37 +01:00
Fabian Boehm
8add30e3bf pexpects: Disable exit on CI Darwin/FreeBSD 2024-12-15 17:33:12 +01:00
Fabian Boehm
cb3fbd3a5c pexpects: Disable 2 only on CI
As the comment says
2024-12-15 17:32:47 +01:00
Fabian Boehm
9b9663ea44 CHANGELOG: We need a C compiler even for the main binary
Not just libc.c, but also the rsconf tests.
2024-12-15 17:15:35 +01:00