nushell/crates/nu-cli/src
Stefan Holderbach 45fe3be83e
Further cleanup of Span::test_data usage + span fixes (#7595)
# Description

Inspired by #7592

For brevity use `Value::test_{string,int,float,bool}`

Includes fixes to commands that were abusing `Span::test_data` in their
implementation. Now the call span is used where possible or the explicit
`Span::unknonw` is used.

## Command fixes
- Fix abuse of `Span::test_data()` in `query_xml`
- Fix abuse of `Span::test_data()` in `term size`
- Fix abuse of `Span::test_data()` in `seq date`
- Fix two abuses of `Span::test_data` in `nu-cli`
- Change `Span::test_data` to `Span::unknown` in `keybindings listen`
- Add proper call span to `registry query`
- Fix span use in `nu_plugin_query`
- Fix span assignment in `select`
- Use `Span::unknown` instead of `test_data` in more places

## Other
- Use `Value::test_int`/`test_float()` consistently
- More `test_string` and `test_bool`
- Fix unused imports


# User-Facing Changes

Some commands may now provide more helpful spans for downstream use in
errors
2022-12-24 07:41:57 -06:00
..
completions let case_insensitive option work for variable completion as well (#7539) 2022-12-22 08:50:59 -06:00
menus Reduced LOC by replacing several instances of Value::Int {}, Value::Float{}, Value::Bool {}, and Value::String {} with Value::int(), Value::float(), Value::boolean() and Value::string() (#7412) 2022-12-09 11:37:51 -05: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 Add FILE_PWD environment variable when running 'nu script.nu' (#7424) 2022-12-10 19:23:44 +02:00
lib.rs Split merging of parser delta and stack environment (#6005) 2022-07-14 17:09:27 +03:00
nu_highlight.rs Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
print.rs Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
prompt.rs Add support to render right prompt on last line of the prompt (#6781) 2022-10-23 16:18:26 +02:00
prompt_update.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
reedline_config.rs Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00
repl.rs Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00
syntax_highlight.rs Add "fall-through" signatures (#7527) 2022-12-22 00:33:26 +02:00
util.rs Fix streaming page missing newline (#7466) 2022-12-14 16:45:37 +13:00
validation.rs Add an alias denylist for expansions (#4871) 2022-03-19 08:03:57 +13:00