mirror of
https://github.com/nushell/nushell.git
synced 2025-04-27 14:48:21 +02:00
sending off for JT to review
This commit is contained in:
parent
ca7ff37697
commit
95628bef16
@ -35,6 +35,11 @@ impl Command for Last {
|
|||||||
) -> Result<PipelineData, ShellError> {
|
) -> Result<PipelineData, ShellError> {
|
||||||
let rows: Option<i64> = call.opt(engine_state, stack, 0)?;
|
let rows: Option<i64> = call.opt(engine_state, stack, 0)?;
|
||||||
|
|
||||||
|
// This code works fine and does the correct
|
||||||
|
// calculation of the beginning_rows_to_skip
|
||||||
|
// but it can not currently be used because
|
||||||
|
// I am not able to clone the input
|
||||||
|
|
||||||
/*
|
/*
|
||||||
let vlength = length(input)?;
|
let vlength = length(input)?;
|
||||||
dbg!(vlength);
|
dbg!(vlength);
|
||||||
@ -54,6 +59,17 @@ impl Command for Last {
|
|||||||
dbg!(beginning_rows_to_skip);
|
dbg!(beginning_rows_to_skip);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// This code works fine if I am able to get this value
|
||||||
|
// So for now I am hard coding this number
|
||||||
|
|
||||||
|
// The above code successfully calculates this number
|
||||||
|
// and it all works if I was able to clone the input
|
||||||
|
|
||||||
|
// it seems being able to
|
||||||
|
// clone the input is important
|
||||||
|
|
||||||
|
// As we were able to do that prior to your changes...
|
||||||
|
|
||||||
let beginning_rows_to_skip = 2;
|
let beginning_rows_to_skip = 2;
|
||||||
|
|
||||||
match input {
|
match input {
|
||||||
|
Loading…
Reference in New Issue
Block a user