Commit Graph

19065 Commits

Author SHA1 Message Date
Johannes Altmanninger
cc93a6b073 Pull rsconf fix for rsconf::enable_feature and rsconf::link_libraries 2024-01-07 12:12:09 +01:00
Johannes Altmanninger
2f13279423 Remove obsolete tests 2024-01-07 12:12:09 +01:00
Johannes Altmanninger
1b7d4f3b90 Fix latent crash in test_wwrite_to_fd
For whatever reason this did not crash until we made it a proper Rust
unit test.
2024-01-07 12:12:09 +01:00
Johannes Altmanninger
3e3441429a Port wgettext wrapper from wutil.cpp
This introduces a string allocations on lookups of strings that are not
known at compile time; we should get rid of these allocations in future.
2024-01-07 12:12:09 +01:00
Johannes Altmanninger
cd19f00531 Port setenv_lock/unsetenv_lock 2024-01-07 12:12:09 +01:00
Johannes Altmanninger
d1e3de7c8a Remove some obsolete C++ FFI calls 2024-01-07 12:12:09 +01:00
Johannes Altmanninger
5d299d21a1 Remove some obsolete bridged C++ functions
Most of these were doubled and the C++ variant is obsolete.
2024-01-07 12:12:09 +01:00
Johannes Altmanninger
c758765503 Port shell_modes
The C++ one is still there but it's only used in dead code.
2024-01-07 12:12:09 +01:00
Johannes Altmanninger
6a64ba6638 Fix build on alpine
musl libc::pthread_t is a pointer so we need to tell Rust it's safe to send
across threads.

Fixes #10195
2024-01-07 02:46:41 +01:00
Johannes Altmanninger
3e31de295a Update alpine build config 2024-01-07 02:46:41 +01:00
Johannes Altmanninger
7f110ed4c0 Port fish_key_reader 2024-01-07 00:54:22 +01:00
ridiculousfish
90fde1a9cd Snapshot env when adding to history
[ja: this seems a little bit safer?]
2024-01-07 00:54:22 +01:00
Johannes Altmanninger
55fd43d86c Port reader 2024-01-07 00:54:22 +01:00
Johannes Altmanninger
1093c636e5 Add missing expect_prompt to test_sigint.py
Somehow the Rust port of reader requires this.
2024-01-07 00:54:22 +01:00
Johannes Altmanninger
d8ac0508f8 Stop requiring Send from debounce completion callbacks
Today, debounce-style work items are only created from the main thread.
The work to compute the result is done in a background thread but the
completion callback is called on the main thread again.

The completion callbacks used by the reader capture a shared reference to
ReaderData, which includes a Parser.  Neither of those types needs to be
sent across threads.

The debounce machinery moves the completion callback into a function object
that is moved to the background thread and back again.  Because of this
there is a Send requirement on the completion callback.

Since we already synchronize on MAIN_THREAD_QUEUE, we don't need Send from
the function object. Lift the requirement.
2024-01-07 00:54:22 +01:00
Johannes Altmanninger
3c12864436 docs: fix double space in example fish_greeting
Closes #10176
2024-01-06 15:26:20 +01:00
David Adam
094f10874b bump copyright year to 2024 2024-01-06 22:24:55 +08:00
Johannes Altmanninger
cfd1e760a4 Update sourcehut FreeBSD config 2024-01-06 14:28:09 +01:00
Johannes Altmanninger
f42b7d30b3 completions/ant: don't look at tokens from adjacent commands 2024-01-06 08:44:23 +01:00
Fabian Boehm
06de374ffd Log original exit code used when a builtin returns a negative exit code
Port of b91723dab6
2024-01-05 16:52:18 +01:00
Fabian Boehm
4286b049ca docs: Fix two formatting errors
sphinx *really* needs an empty line after a `::` code block starter
2024-01-05 16:49:49 +01:00
Fabian Boehm
3213883510 Add error messages where the errors are generated
This removes an awkward hack from ParseError::describe_with_prefix,
where it added errors for two error codes.

andor_in_pipeline was already there, so we just need bare_variable_assignment.
2024-01-04 18:07:40 +01:00
Asger Hautop Drewsen
b91723dab6 Log original exit code used when a builtin returns a negative exit code 2024-01-04 16:13:41 +01:00
Josef Litoš
ee837f254b feat: adb completion cleared of awk 2024-01-04 16:13:03 +01:00
Damien Picard
4f3e7ddef0 Completions: fix Blender completions when it prints to stderr
Some of the completions recently introduced called Blender itself to query some
arguments, and Blender sometimes prints messages to stderr. This output was not
filtered, resulting in the shell printing irrelevant messages during completion.
2024-01-04 16:11:51 +01:00
Nethum Lamahewage
a36ff7d143 history: fix deleting last entry 2024-01-04 16:10:08 +01:00
David Adam
c10d00599b completions/ninja: add --verbose option 2024-01-03 23:17:55 +08:00
Fabian Boehm
1fdbac3320 tests: Lengthen a timeout
This fails on ASAN a bunch now, let's see if it's just slower
2024-01-02 22:42:19 +01:00
Fabian Boehm
ff8563cfdb docs/set: Fix typo
Fixes #10185
2024-01-02 21:54:07 +01:00
Fabian Boehm
5a77db8353 fish_key_reader: Only name keys if they match the entire sequence
This would misname `\e\x7F` as "backspace":

bind -k backspace 'do something'
bind \e\x7F 'do something'

because it would check if there was any key *in there*.

This was probably meant for continuous mode, but it simply doesn't
work right. It's preferable to not give a key when one would work over
giving one when it's not correct.
2024-01-02 17:27:20 +01:00
Abdo Omar
744fa72d9c Update README.rst
windows 10 -> windows 10/11
2024-01-02 22:24:58 +08:00
David Adam
365027d55d drop obsolete headers 2024-01-02 01:59:02 +08:00
David Adam
3cdca4738a drop unused wildcard module
Some of the definitions in wildcard.h are still used in C++.
2024-01-02 01:59:02 +08:00
David Adam
118dfe776a drop unused path functions 2024-01-02 01:59:02 +08:00
Johannes Altmanninger
d8feb0bcd1 builtin bind: remove unused parameter
This file uses the questionable "self.somemethod(self.somefield)" pattern.
We should either set the functions free or stop passing redundant parameters.
Not sure.

For now fix one of them to avoid a string clone.
2024-01-01 18:40:34 +01:00
Johannes Altmanninger
971359876d Work in clippy lint 2024-01-01 18:40:34 +01:00
Johannes Altmanninger
69881f4251
Merge pull request #10180 from ridiculousfish/riir-input
Rewrite input machinery in Rust
2024-01-01 18:38:32 +01:00
David Adam
1b6374d2ce Merge branch 'Integration_3.7.0' 2024-01-02 00:08:49 +08:00
Fabian Boehm
6618ca17f2 set: Fix set -e without arguments
This didn't actually error out because we passed all of args.

It *might* be cleaner to pass a slice?
2024-01-01 16:21:08 +01:00
David Adam
0e4d088b11 Release 3.7.0 2024-01-01 23:15:17 +08:00
Fabian Boehm
20d36cd9a2 set: Remove a broken array read
Hardcode "--erase" as a hack, because "argv[-1]" is *not* a thing.

Introduced in aacc71e585.

Fixed in master by no longer being C++.
2024-01-01 15:13:23 +01:00
David Adam
be0ea9862c CHANGELOG: work on 3.7.0 2024-01-01 22:01:45 +08:00
ridiculousfish
8190e3419d Add remaining input FFI bits and port builtin_bind
This implements input and input_common FFI pieces in input_ffi.rs, and
simultaneously ports bind.rs. This was done as a single commit because
builtin_bind would have required a substantial amount of work to use the input
ffi.
2023-12-31 17:17:43 -08:00
ridiculousfish
7ffb62d1d9 Port input.cpp to input.rs
This is not yet adopted.
2023-12-31 15:45:08 -08:00
ridiculousfish
01b04c802e Port input_common.cpp to input_common.rs 2023-12-31 15:45:08 -08:00
ridiculousfish
55054a4bae Add keys to our curses Term structure
This will support rewriting the input machinery in Rust.

Note that while there are a lot of keys here, in practice this is very fast -
taking on the order of microseconds to populate.
2023-12-31 15:44:50 -08:00
Fabian Boehm
d6833edf54 CHANGELOG 2024-01-01 00:14:26 +01:00
Fabian Boehm
5c532ace5a CHANGELOG umask fix 2023-12-31 19:40:18 +01:00
Fabian Boehm
3b9b84101a umask: Correctly handle empty symbolic value
Simple return/echo confusion.

Fixes #10177

(cherry picked from commit b895cf49ca)
2023-12-31 19:39:38 +01:00
Fabian Boehm
b895cf49ca umask: Correctly handle empty symbolic value
Simple return/echo confusion.

Fixes #10177
2023-12-31 19:39:23 +01:00