mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 13:26:01 +02:00
feat: Use Raw Text to save if pipeline data is ExternalStream (#7082)
if not value type or Value as String in nushell, save will use raw type
This commit is contained in:
@ -121,6 +121,11 @@ impl Command for Save {
|
||||
|
||||
let ext = if raw {
|
||||
None
|
||||
// if is extern stream , in other words , not value
|
||||
} else if let PipelineData::ExternalStream { .. } = input {
|
||||
None
|
||||
} else if let PipelineData::Value(Value::String { .. }, ..) = input {
|
||||
None
|
||||
} else {
|
||||
path.extension()
|
||||
.map(|name| name.to_string_lossy().to_string())
|
||||
|
Reference in New Issue
Block a user