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

cli: pager functionality #3468

Open
oliver-sanders opened this issue Dec 18, 2019 · 11 comments
Open

cli: pager functionality #3468

oliver-sanders opened this issue Dec 18, 2019 · 11 comments
Labels
Milestone

Comments

@oliver-sanders
Copy link
Member

The old pager functionality wasn't migrated to the new Python API in #3413.

All help pages should be paged e.g. cylc --help, cylc run --help, etc.

This may be slightly tricky now that the CLI has migrated away from Bash, the nice easy help | ${PAGER:-less} solution might not be an option any more.

Using a native shell pager would be preferable so users can set their favorite pager in the conventional way.

Pull requests welcome!

@oliver-sanders oliver-sanders added this to the cylc-8.0.0 milestone Dec 18, 2019
@kinow
Copy link
Member

kinow commented Dec 18, 2019

Click mentions something about pager method. I wonder if that can be used with cylc-flow commands now?

http://click.palletsprojects.com/en/5.x/utils/

(it looks like there is some colorama integration too...)

@oliver-sanders
Copy link
Member Author

Good spot!

@hjoliver
Copy link
Member

As I recall paging wasn't working (or wasn't implemented) in sub-commands anyway, before the click PR. Was it only working in the top level cylc --help? Pretty sure I tested that quite recently.

@oliver-sanders
Copy link
Member Author

It worked fine but only for cylc help SUBCMD not cylc SUBCMD --help.

@hjoliver
Copy link
Member

Ah, that explains it! I guess I never use cylc help SUBCMD, only cylc SUBCMD --help.

@hjoliver
Copy link
Member

(I don't think cylc help SUBCMD conforms to standard practice, does it?)

@kinow
Copy link
Member

kinow commented Dec 18, 2019

(I don't think cylc help SUBCMD conforms to standard practice, does it?)

I think most programs with subcommands I've seen work the other way as you said above, cylc SUBCMD --help or cylc SUBCMD help.

@oliver-sanders
Copy link
Member Author

e.g. git help remote and git remote --help.

@kinow
Copy link
Member

kinow commented Dec 18, 2019

Oh, good example, didn't know git allowed it.

@hjoliver
Copy link
Member

Still, we'll want paging for the "more standard" 😁 cylc SUBCMD --help as well.

@oliver-sanders
Copy link
Member Author

Attempt after #3525.

@oliver-sanders oliver-sanders modified the milestones: cylc-8.0.0, 8.x Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants