Fabian Boehm
72a32f1a12
Rewrite "builtin" builtin in Rust
...
This is very simple and basically a subset of type.
2023-04-16 11:30:31 +02:00
Fabian Boehm
b65a53a2a6
Rewrite "command" builtin in Rust
...
This is basically a subset of type, so we might as well.
To be clear this is `command -s` and friends, if you do `command grep` that's
handled as a keyword.
One issue here is that we can't get "one path or not" because I don't
know how to translate a maybe_t? Do we need to make it a shared_ptr instead?
2023-04-16 11:27:08 +02:00
Fabian Boehm
662a4740e2
Rewrite the type builtin in rust
2023-04-16 11:27:08 +02:00
Fabian Boehm
7c37b681b2
Expose out_is_redirected to rust
2023-04-16 11:27:08 +02:00
ridiculousfish
15c8f08458
Eliminate to_rust_string_vec
...
This can just use wcstring_list_ffi_t now.
2023-04-15 18:15:37 -07:00
ridiculousfish
dee969bf3a
Introduce wcstring_list_ffi_t
...
wcstring_list_ffi_t is an autocxx-friendly type for passing lists of
strings from C++ to Rust.
2023-04-15 17:53:52 -07:00
Johannes Altmanninger
9983c32a57
Port over builtin exit codes
...
They used to live in common.h but they are mostly used by builtins so I
grudgingly accept the early move.
2023-04-11 09:29:28 +02:00
ridiculousfish
a487b1ecf2
Revert "Revert "Implement builtin_printf in Rust""
...
This reverts commit 9f7e6a6cd1
.
Add additional fixes from code review.
2023-04-06 15:54:09 -07:00
ridiculousfish
9f7e6a6cd1
Revert "Implement builtin_printf in Rust"
...
This reverts PR #9666 . This had outstanding review comments and should
not have been committed.
2023-03-27 22:03:30 -07:00
ridiculousfish
3eb6f2ac74
Implement builtin_printf in Rust
...
This implements builtin_printf in Rust.
2023-03-26 17:40:24 -07:00
Victor Song
ca494778e4
builtins: Port realpath
to Rust
2023-03-12 19:50:35 -07:00
Victor Song
77fe9933e2
builtins: Rewrite pwd
in Rust
...
Closes #9625 .
2023-03-12 15:18:15 -05:00
Clemens Wasser
17c1fa9d64
Port bg builtin to Rust ( #9621 )
...
* bg: Port bg builtin to Rust
2023-02-28 16:42:12 -06:00
Clemens Wasser
6f5be9bae4
block: Port block builtin to Rust
...
Closes #9612 .
2023-02-26 14:16:55 -06:00
Neeraj Jaiswal
f52569a800
abbr: port abbreviation and abbr builtin to rust
2023-02-25 12:24:58 +01:00
Neeraj Jaiswal
3b60bc1de0
contains: port contains builtin to rust
2023-02-22 18:32:27 +01:00
Fabian Boehm
4fd1458d85
Port random to rust
2023-02-19 21:01:46 +01:00
Xiretza
698db6c2a7
builtins: make io_streams_t methods publicly accessible
2023-02-18 18:53:50 +01:00
Neeraj Jaiswal
1adfce18ee
builtins: port return/exit to rust
2023-02-18 18:53:40 +01:00
Xiretza
5a76c7d3b1
Port emit builtin to rust
2023-02-11 15:04:57 +01:00
Xiretza
3ed86fae1c
Port parse_help_only_cmd_opts to Rust
...
This is duplicated for now, since a `&mut [&wstr]` can't be passed over FFI.
2023-02-11 15:04:57 +01:00
Xiretza
a16e2ecb1b
Port echo builtin to Rust
2023-02-07 22:25:47 +01:00
Xiretza
4b85c2f6db
builtin: propagate status from Rust builtins
...
The return type of `builtin_run_rust()` reflects that of C++ builtins.
2023-02-07 22:25:47 +01:00
Johannes Altmanninger
7347c90d1e
builtins.rs: correct error message on unknown option
2023-02-05 12:02:48 +01:00
ridiculousfish
76adfed0e7
Implement builtin_wait in Rust
...
This implements builtin_wait in Rust.
2023-02-02 19:34:48 -07:00