nushell/crates/nu-cli/src
JT eaec480f42
Improve empty pipelines (#7383)
# Description

This fix changes pipelines to allow them to actually be empty. Mapping
over empty pipelines gives empty pipelines. Empty pipelines immediately
return `None` when iterated.

This removes a some of where `Span::new(0, 0)` was coming from, though
there are other cases where we still use it.

# User-Facing Changes

None

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2022-12-08 07:31:57 +13:00
..
completions Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
menus add signature information when get help on one command (#7079) 2022-11-20 07:22:42 -06:00
commands.rs Remove perf flag to streamline logging configuration (#6834) 2022-10-21 10:20:21 -05:00
config_files.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
eval_file.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
lib.rs Split merging of parser delta and stack environment (#6005) 2022-07-14 17:09:27 +03:00
nu_highlight.rs feat: add search terms to category of strings (#5723) 2022-06-06 08:47:09 -05:00
print.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
prompt_update.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
prompt.rs Add support to render right prompt on last line of the prompt (#6781) 2022-10-23 16:18:26 +02:00
reedline_config.rs Split blocks and closures (#7075) 2022-11-10 21:21:49 +13:00
repl.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
syntax_highlight.rs Protocol: debug_assert!() Span to reflect a valid slice (#6806) 2022-12-03 11:44:12 +02:00
util.rs Protocol: debug_assert!() Span to reflect a valid slice (#6806) 2022-12-03 11:44:12 +02:00
validation.rs Add an alias denylist for expansions (#4871) 2022-03-19 08:03:57 +13:00