nushell/crates/nu-command/src
Ian Manske 83720a9f30
Make the same file error more likely to appear (#12601)
# Description
When saving to a file we currently try to check if the data source in
the pipeline metadata is the same as the file we are saving to. If so,
we create an error, since reading and writing to a file at the same time
is currently not supported/handled gracefully. However, there are still
a few instances where this error is not properly triggered, and so this
PR attempts to reduce these cases. Inspired by #12599.

# Tests + Formatting
Added a few tests.

# After Submitting
Some commands still do not properly preserve metadata (e.g., `str trim`)
and so prevent us from detecting this error.
2024-04-22 01:12:13 +00:00
..
bytes Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
charting Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
conversions use abbreviated string instead of debug string for DatetimeParseErrors (#12517) 2024-04-16 23:19:03 +02:00
database Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
date use abbreviated string instead of debug string for DatetimeParseErrors (#12517) 2024-04-16 23:19:03 +02:00
debug Remove the Value::Block case (#12582) 2024-04-21 07:03:33 +02:00
env Remove the Value::Block case (#12582) 2024-04-21 07:03:33 +02:00
experimental Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
filesystem Make the same file error more likely to appear (#12601) 2024-04-22 01:12:13 +00:00
filters Make the same file error more likely to appear (#12601) 2024-04-22 01:12:13 +00:00
formats Remove the Value::Block case (#12582) 2024-04-21 07:03:33 +02:00
generators Small refactor in cal (#12604) 2024-04-21 10:41:26 +02:00
hash Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
help Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
math Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
misc Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
network Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
path Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
platform Return value instead of stream from kill (#12480) 2024-04-12 10:44:27 -05:00
random Range refactor (#12405) 2024-04-06 09:04:56 -05:00
removed Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
shells Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
stor Fix typo in help stor import (#12442) 2024-04-07 08:09:24 -05:00
strings add search_term "str extract" to parse command (#12600) 2024-04-21 07:01:42 +02:00
system Fix circular source causing Nushell to crash (#12262) 2024-04-19 09:38:08 +03:00
viewers Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
default_context.rs add ability to set metadata (#12564) 2024-04-19 09:03:59 +08:00
example_test.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
lib.rs Initial --params implementation (#12249) 2024-03-24 15:40:21 -05:00
progress_bar.rs remove cp-old (#11622) 2024-01-24 07:38:15 +08:00
sort_utils.rs Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00