Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more: implement arguments -n/--lines and --number #4914

Merged

Conversation

Ideflop
Copy link
Contributor

@Ideflop Ideflop commented May 29, 2023

Related to #2320

The match option assigns a value to the lines variable based on the provided options.
It prioritizes the value obtained from the --lines option over the --number option.

If a value of 0 is given for lines, it will fallback to using the terminal size.

Comment on lines 561 to 562
execute!(stdout, MoveUp(1)).unwrap();
stdout.write_all("\n\r...back 1 page\n".as_bytes()).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe handle the errors ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use the ? operator to propagate the Err result as a UResult.

@sylvestre sylvestre merged commit e8effd0 into uutils:main Jun 2, 2023
@Ideflop Ideflop deleted the more_implement_arguments_lines_and_number branch June 4, 2023 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants