fish-shell/src
Henrik Hørlück Berg 20be990fd9 Port builtins/string to Rust
- Add test to verify piped string replace exit code

Ensure fields parsing error messages are the same.

Note: C++ relied upon the value of the parsed value even when `errno` was set,
that is defined behaviour we should not rely on, and cannot easilt be replicated from Rust.
Therefore the Rust version will change the following error behaviour from:

```shell
> string split --fields=a "" abc
string split: Invalid fields value 'a'
> string split --fields=1a "" abc
string split: 1a: invalid integer
```

To:

```shell
> string split --fields=a "" abc
string split: a: invalid integer
> string split --fields=1a "" abc
string split: 1a: invalid integer
```
2023-07-27 22:00:03 -07:00
..
builtins Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
widecharwidth Upgrade widechar_width to Unicode 15 2022-09-26 17:17:17 +02:00
abbrs.h Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
ast.cpp Port AST to Rust 2023-04-16 17:46:56 +02:00
ast.h Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
autoload.cpp Implement (but do not yet adopt) fish function store in Rust 2023-07-23 17:18:36 -07:00
autoload.h Implement (but do not yet adopt) fish function store in Rust 2023-07-23 17:18:36 -07:00
builtin.cpp Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
builtin.h Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
callback.h Add and use type-erased RAII callback wrapper for ffi 2023-04-29 11:02:59 -05:00
color.cpp Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
color.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
common.cpp drop ported C++ functions 2023-07-14 20:48:56 +08:00
common.h drop ported C++ functions 2023-07-14 20:48:56 +08:00
complete.cpp Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
complete.h Implement (but do not yet adopt) fish function store in Rust 2023-07-23 17:18:36 -07:00
enum_map.h enum_map stuff to enum_map.h 2021-10-01 03:39:43 -07:00
enum_set.h Remove enum_iter_t 2023-01-14 12:58:20 -08:00
env_universal_common.cpp Implement (but do not yet adopt) Environment in Rust 2023-05-07 15:15:56 -07:00
env_universal_common.h Implement (but do not yet adopt) Environment in Rust 2023-05-07 15:15:56 -07:00
env.cpp Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
env.h Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
event.cpp Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
event.h Reimplement environment and the environment stack in Rust 2023-05-07 15:15:56 -07:00
exec.cpp Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
exec.h Port builtins/argparse to Rust 2023-06-19 13:45:54 -07:00
expand.cpp Integrate threads.rs w/ legacy C++ code 2023-04-29 11:02:59 -05:00
expand.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
fallback.cpp drop unused functions and configure checks 2023-07-14 20:48:56 +08:00
fallback.h drop unused functions and configure checks 2023-07-14 20:48:56 +08:00
fds.cpp New wcs2zstring to explicitly convert to zero-terminated strings 2023-04-02 15:17:06 +02:00
fds.h Port fd_monitor (and its needed components) 2023-02-19 15:42:03 -06:00
ffi_baggage.h Port AST to Rust 2023-04-16 17:46:56 +02:00
ffi.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
fish_indent_common.cpp Port AST to Rust 2023-04-16 17:46:56 +02:00
fish_indent_common.h Port AST to Rust 2023-04-16 17:46:56 +02:00
fish_indent.cpp Clean up feature flags API 2023-07-11 12:05:38 -07:00
fish_key_reader.cpp Rewrite and adopt print_help in Rust 2023-06-01 23:17:13 +08:00
fish_test_helper.cpp Initial Rust commit 2023-02-02 19:34:47 -07:00
fish_tests.cpp Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
fish_version.cpp Fix build 2021-09-21 18:33:14 -07:00
fish_version.h
fish.cpp Return a falsey status if the last -c command has a parse error 2023-07-12 18:06:34 +02:00
flog.cpp Initial Rust commit 2023-02-02 19:34:47 -07:00
flog.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
function.cpp Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
function.h Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
future_feature_flags.h Clean up feature flags API 2023-07-11 12:05:38 -07:00
global_safety.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
highlight.cpp Adopt the new output.rs 2023-06-17 12:14:42 -07:00
highlight.h clang-format C++ files 2023-04-19 22:43:36 +02:00
history_file.cpp history_file.cpp: remove an unused variable 2022-10-26 16:09:02 +02:00
history_file.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
history.cpp Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
history.h Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
input_common.cpp Simplify logic for special input functions "and" & "or" 2023-07-04 18:42:11 +02:00
input_common.h history pager: delete selected history entry with Shift-Delete 2023-07-04 18:42:11 +02:00
input.cpp add comment regarding importance of unused describe_char function 2023-07-14 20:48:56 +08:00
input.h clang-format C++ files 2023-04-19 22:43:36 +02:00
io.cpp Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
io.h Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
iothread.h Add and use type-erased RAII callback wrapper for ffi 2023-04-29 11:02:59 -05:00
kill.cpp Port killring 2023-06-04 12:18:19 -07:00
kill.h Port killring 2023-06-04 12:18:19 -07:00
lru.h Reimplement autosuggestion-triggered completion loading 2022-06-19 15:15:17 -07:00
maybe.h Replace maybe_t::missing_or_empty with a more Rust-friendly helper 2023-04-21 13:57:29 +02:00
null_terminated_array.cpp Reimplement owning_null_terminated_array in Rust 2023-05-07 15:15:56 -07:00
null_terminated_array.h Reimplement owning_null_terminated_array in Rust 2023-05-07 15:15:56 -07:00
operation_context.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
operation_context.h Port job_group to rust (#9608) 2023-02-25 16:42:45 -06:00
output.cpp Adopt the new output.rs 2023-06-17 12:14:42 -07:00
output.h Adopt the new output.rs 2023-06-17 12:14:42 -07:00
pager.cpp history pager: delete selected history entry with Shift-Delete 2023-07-04 18:42:11 +02:00
pager.h history pager: delete selected history entry with Shift-Delete 2023-07-04 18:42:11 +02:00
parse_constants.h Don't leak ParseErrorList FFI crutch type into Rust 2023-04-19 01:03:16 +02:00
parse_execution.cpp Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
parse_execution.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
parse_tree.h Port AST to Rust 2023-04-16 17:46:56 +02:00
parse_util.cpp Rename kw() to keyword() also in C++ 2023-04-19 22:43:36 +02:00
parse_util.h Port parse_util_compute_indents 2023-04-19 10:35:22 +02:00
parser_keywords.cpp IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
parser_keywords.h Remove unused functions, members (and a variable) 2022-04-09 10:10:44 -07:00
parser.cpp Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
parser.h Adopt the new function store and rewrite builtin_function 2023-07-23 17:18:36 -07:00
path.cpp drop ported C++ functions 2023-07-14 20:48:56 +08:00
path.h drop ported C++ functions 2023-07-14 20:48:56 +08:00
postfork.cpp Port job_group to rust (#9608) 2023-02-25 16:42:45 -06:00
postfork.h Mark Dup2List as a struct, not a class 2023-02-11 12:13:51 -08:00
proc.cpp drop unused functions and configure checks 2023-07-14 20:48:56 +08:00
proc.h drop unused functions and configure checks 2023-07-14 20:48:56 +08:00
reader.cpp history pager: delete selected history entry with Shift-Delete 2023-07-04 18:42:11 +02:00
reader.h Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
redirection.h redirection.rs: don't leak FFI type into Rust code 2023-04-16 17:21:54 +02:00
rustffi.cpp Initial Rust commit 2023-02-02 19:34:47 -07:00
screen.cpp Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
screen.h Port builtins/string to Rust 2023-07-27 22:00:03 -07:00
signals.cpp Adopt the new Rust signal implementation 2023-04-30 16:22:57 -07:00
signals.h Adopt the new Rust signal implementation 2023-04-30 16:22:57 -07:00
termsize.h Adopt the new termsize 2023-03-19 16:13:41 -07:00
tokenizer.h Port tokenizer.cpp to Rust 2023-02-09 00:37:22 +01:00
topic_monitor.h Initial Rust commit 2023-02-02 19:34:47 -07:00
utf8.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
utf8.h Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
util.h Port util.cpp to Rust 2023-02-03 18:55:06 +01:00
wait_handle.h Rewrite wait handles and wait handle store in Rust 2023-03-18 18:53:04 -07:00
wcstringutil.cpp clang-format C++ files 2023-04-19 22:43:36 +02:00
wcstringutil.h clang-format C++ files 2023-04-19 22:43:36 +02:00
wgetopt.cpp Use actual enum names in wgetopt 2022-12-11 10:26:39 -08:00
wgetopt.h Untangle some pointers in wgetopt 2022-12-04 14:48:20 -08:00
wildcard.cpp wildcard: Remove useless access() call for trailing slash 2023-07-14 20:20:34 +02:00
wildcard.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
wutil.cpp drop unused functions and configure checks 2023-07-14 20:48:56 +08:00
wutil.h drop unused functions and configure checks 2023-07-14 20:48:56 +08:00