Commit Graph

18499 Commits

Author SHA1 Message Date
Johannes Altmanninger
bc246d87b2 Add closed issues and PRs to 3.8 changelog
I used below script to list all GitHub issues and PRs that are not yet
mentioned in the changelog. It's almost empty now.

While at it, curate the "notable" section and move some entries around,
notably from "interactive improvements"  to "bindings".

```shell
ms="fish next-3.x"
{
    gh issue list --state closed --milestone "$ms" -L 500
    gh pr list --state all --search "milestone:\"$ms\"" -L 500
} | sort -n | while IFS='
' read line; do
    set -- $line
    grep -qE '\W'$1 CHANGELOG.rst ||
    echo https://github.com/fish-shell/fish-shell/issues/$1 "$line"
done
```
2024-03-17 11:41:32 +01:00
Johannes Altmanninger
cd71359c42 completions/git: complete files iff last token is not a fixupish
Closes #10371
2024-03-16 10:45:57 +01:00
Simon Junod
60ef93b85b Fixed typo in French translations
Closes #10372
2024-03-16 10:45:57 +01:00
Johannes Altmanninger
068f92ce7e Changelog update 2024-03-16 10:31:01 +01:00
Johannes Altmanninger
2972407b9e builtin read: minor code cleanup 2024-03-16 10:31:01 +01:00
Johannes Altmanninger
62d1720605 completions/htop: fix --sort-key completions 2024-03-16 10:31:01 +01:00
fortifiedhill
8678ad8ca0 Update htop completions
Added and updated completions and updated htop link.
2024-03-16 09:00:42 +01:00
Xiretza
8271021fb6 Add completions for dmidecode 2024-03-16 08:57:43 +01:00
The0x539
b8d1dc93d6 ast: Replace can_parse with static dispatch 2024-03-16 08:39:27 +01:00
Andrew Neth
08220c2189
builtin/test: refactor the Token enum to be more granular (#10357)
* builtin/test: Split Token enum into 2-level hierarchy

* builtin/test: Rearrange the Token enum hierarchy

* builtin/test: Separate Token into Unary and Binary

* builtin/test: import IsOkAnd polyfill

* builtin/test: Rename enum variants one more time
2024-03-15 23:24:44 -05:00
Fabian Boehm
360342bb9e pexpect: Check for signalstatus being none
This would happen if e.g. the child shell did `exit 1` before an
`expect()`.
2024-03-12 22:04:23 +01:00
Fabian Boehm
0aa2426552 completions/wg-quick: Complete files after the subcommand
Fixes #10366
2024-03-12 17:32:51 +01:00
Fabian Boehm
a64a50db47 reader: Use our isatty overload
Removes an annoying use of unsafe
2024-03-10 20:47:26 +01:00
Fabian Boehm
ffc4372cad History: Change an assert into return None
I was able to trigger this by flipping around the history pager.

Since the only applicable caller here already stops if it gets None,
just don't assert.
2024-03-10 16:55:43 +01:00
Fabian Boehm
d3a66b2d96 translations: Remove tmpdir from location
This avoids changing the location every time you run fish_xgettext.
2024-03-10 16:40:58 +01:00
Fabian Boehm
074b96640d pager: Make search text translatable 2024-03-10 16:38:05 +01:00
Fabian Boehm
706b85d474 More german
These aren't *good*, but they are there and should be generally understandable.

I want to try to get 100% of src/ translated - that's ~440 messages.
2024-03-10 16:31:45 +01:00
Fabian Boehm
00c68145b8 fmt
I still hate this
2024-03-10 16:17:40 +01:00
Fabian Boehm
46b4ab92e5 Regenerate translations
Also add some more german
2024-03-10 16:15:16 +01:00
Fabian Boehm
25e170141c Fix some translated strings 2024-03-10 16:15:15 +01:00
Johannes Altmanninger
d8d491741b edit_command_buffer: preserve external editor's cursor position
Unless the editor changed to a different file for some reason.

Note that the Kakoune integration uses -always to export the cursor even if
the user temporarily suppressed hooks - possibly a "fish_indent" hook.
2024-03-10 11:08:12 +01:00
Johannes Altmanninger
5fa743337c edit_command_buffer: also detect aliases with arguments
For example

    complete my-vim --wraps 'vim -x'
2024-03-10 11:06:38 +01:00
Mahmoud Al-Qudsi
3f6b009870 Only update env_universal self.last_read_file on success
I don't think the existing logic is correct, as the comment says, our internal
state is only matched if we *actually* wrote out the file. But if we ran into an
error, it doesn't match, does it?
2024-03-10 09:49:54 +01:00
Johannes Altmanninger
94477f3029 Fix commandline -C regression handling negative offsets 2024-03-10 09:46:16 +01:00
Fabian Boehm
947883c842 commandline: Fix setting cursor
Fixes #10358
2024-03-10 09:27:56 +01:00
Mahmoud Al-Qudsi
7c173c4b45 Fix formatting of new test 2024-03-09 22:06:33 -06:00
Mahmoud Al-Qudsi
4e95a3713e Add test asserting stdlib uses O_CLOEXEC 2024-03-09 22:05:23 -06:00
Bartłomiej Maryńczak
d5cde80447
Use Result for write_to_fd return value (#10308) 2024-03-09 21:29:50 -06:00
Mahmoud Al-Qudsi
e6687dc61f Make open_temporary_file() fallible again
I was under the apparently mistaken impression that `FLOG!(error, ...)`
triggered an abort when I committed 58a6eb6e45.
2024-03-09 21:21:29 -06:00
amiyzku
bb6b3101ff
Shortened some which.fish completions. (#10347)
* Shortened some which.fish completions.

* improve descriptions for which command options
2024-03-09 20:52:55 -06:00
RomainGiraud
f8757d154c
Fix scp completion for WSL (with ssh.exe) (#10290)
* Fix scp completion for WSL (with ssh.exe)

* Be more explicit
2024-03-09 15:39:57 -06:00
Mahmoud Al-Qudsi
6d30363090 Simplify control flow in env_universal_common::save() 2024-03-09 15:21:47 -06:00
Mahmoud Al-Qudsi
58a6eb6e45 Convert fish_mkstemp_cloexec() to return an OwnedFd 2024-03-09 15:21:47 -06:00
The0x539
cfe9881eaa Suppress unknown_lints lint
This is to prevent stable from complaining about nightly-only lints.

Closes #10354
2024-03-09 13:49:25 +01:00
The0x539
6c0381c335 Suppress assigning_clones and incompatible_msrv
The incompatible_msrv one is a false positive because we have polyfills for
is_some_and() and is_ok_or() which are Rust 1.74. I'm not yet sure how to
communicate that to Clippy.
2024-03-09 13:49:25 +01:00
The0x539
4296c49a06 Remove unnecessary scoped #[allow] attributes 2024-03-09 13:49:25 +01:00
The0x539
4c3e814a50 Address clippy lints 2024-03-09 13:49:25 +01:00
Fabian Boehm
6869b14fb5 docs: Add fish_should_add_to_history to commands list 2024-03-09 12:09:00 +01:00
Fabian Boehm
b03e727531 Remove unnecessary formatting 2024-03-09 12:06:24 +01:00
Fabian Boehm
f7cc1743c6
Allow deciding if a command should be saved to history (#10302)
Call fish_should_add_to_history to see if a command should be saved

If it returns 0, it will be saved, if it returns anything else, it
will be ephemeral.

It gets the right-trimmed text as the argument.

If it doesn't exist, we do the historical behavior of checking for a
leading space.

That means you can now turn that off by defining a
`fish_should_add_to_history` that just doesn't check it.

documentation based on #9298
2024-03-09 12:04:16 +01:00
Fabian Boehm
d91ad2976c Make fish_xgettext sorta work with rust
This is absolutely disgusting code, but it works out okay-ish.

The problem is xgettext has no rust support (it's stuck in review
limbo). So we use cargo-expand to extract all invocations of
gettext, and massage all that to generate a
messages.pot ourselves.

We also assume any string constant could be translated.
2024-03-09 11:48:29 +01:00
Fabian Boehm
97e7e730e1 Clean up two awkward wgettext_fmt invocations 2024-03-09 11:48:29 +01:00
Johannes Altmanninger
836ee93617 Vi bindings: Control-N to accept autosuggestion
One of the things that keep me from using Vi mode is that it doesn't define an
insert-mode shortcut to accept autosuggestions. Let's use Control-N because
that Vim key is the closest equivalent.

Closes #10339
2024-03-09 11:03:57 +01:00
QianChenglong
b3c610feff add completion for mycli
Closes #10309
2024-03-09 10:28:03 +01:00
Felix Luciano Salomon
90b9bce174 Added completion for ollama
Closes #10327
2024-03-09 10:28:03 +01:00
The0x539
1de7ebcf68 Simplify shared-from-this pattern 2024-03-09 10:09:03 +01:00
Peter Collingbourne
e5f83cd9a7 Fix logic for relocatable directory trees
The existing logic did not work because:

- Path::new("/foo/bar").ends_with("/bar") does not return true.
- PathBuf::shrink_to() only (potentially) reallocates the backing
  storage, and won't have an effect on the stored value.
2024-03-09 09:38:48 +01:00
Next Alone
a1d44a92be
fix: #10184 causes adb file completion failures (#10349)
Signed-off-by: NextAlone <12210746+NextAlone@users.noreply.github.com>
2024-03-08 21:56:37 -06:00
Johannes Altmanninger
6eddaa37af Revert "feat: adb completion cleared of awk"
It's broken,  see https://github.com/fish-shell/fish-shell/pull/10184
and doesn't really help I don't think.

This reverts commit ee837f254b.
2024-03-08 07:33:18 +01:00
John
b75e5ee823
remove repetitive words (#10348)
Signed-off-by: hishope <csqiye@126.com>
2024-03-07 18:35:41 -06:00