mirror of
https://github.com/nushell/nushell.git
synced 2025-01-24 15:19:29 +01:00
fix: add missing metadata for ls_colors
(#4603)
* feat: add metadata to roll * chore: apply clippy * fix: apply clippy * fix: revert clippy
This commit is contained in:
parent
0c3ea636fb
commit
ed46f0ea17
@ -62,10 +62,12 @@ impl Command for RollDown {
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, ShellError> {
|
||||
let by: Option<usize> = call.get_flag(engine_state, stack, "by")?;
|
||||
let metadata = input.metadata();
|
||||
|
||||
let value = input.into_value(call.head);
|
||||
let rotated_value = vertical_rotate_value(value, by, VerticalDirection::Down)?;
|
||||
|
||||
Ok(rotated_value.into_pipeline_data())
|
||||
Ok(rotated_value.into_pipeline_data().set_metadata(metadata))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,12 +89,14 @@ impl Command for RollLeft {
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, ShellError> {
|
||||
let by: Option<usize> = call.get_flag(engine_state, stack, "by")?;
|
||||
let metadata = input.metadata();
|
||||
|
||||
let cells_only = call.has_flag("cells-only");
|
||||
let value = input.into_value(call.head);
|
||||
let rotated_value =
|
||||
horizontal_rotate_value(value, &by, cells_only, &HorizontalDirection::Left)?;
|
||||
|
||||
Ok(rotated_value.into_pipeline_data())
|
||||
Ok(rotated_value.into_pipeline_data().set_metadata(metadata))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,12 +89,14 @@ impl Command for RollRight {
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, ShellError> {
|
||||
let by: Option<usize> = call.get_flag(engine_state, stack, "by")?;
|
||||
let metadata = input.metadata();
|
||||
|
||||
let cells_only = call.has_flag("cells-only");
|
||||
let value = input.into_value(call.head);
|
||||
let rotated_value =
|
||||
horizontal_rotate_value(value, &by, cells_only, &HorizontalDirection::Right)?;
|
||||
|
||||
Ok(rotated_value.into_pipeline_data())
|
||||
Ok(rotated_value.into_pipeline_data().set_metadata(metadata))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,12 @@ impl Command for RollUp {
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, ShellError> {
|
||||
let by: Option<usize> = call.get_flag(engine_state, stack, "by")?;
|
||||
let metadata = input.metadata();
|
||||
|
||||
let value = input.into_value(call.head);
|
||||
let rotated_value = vertical_rotate_value(value, by, VerticalDirection::Up)?;
|
||||
|
||||
Ok(rotated_value.into_pipeline_data())
|
||||
Ok(rotated_value.into_pipeline_data().set_metadata(metadata))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user