mirror of
https://github.com/nushell/nushell
synced 2025-01-15 14:44:14 +00:00
sending off for JT to review
This commit is contained in:
parent
ca7ff37697
commit
95628bef16
1 changed files with 16 additions and 0 deletions
|
@ -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 a new issue