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

page cylc help output #2704

Merged
merged 3 commits into from
Jul 6, 2018
Merged

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Jun 25, 2018

@oliver-sanders oliver-sanders added this to the soon milestone Jun 25, 2018
@oliver-sanders oliver-sanders self-assigned this Jun 25, 2018
Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

This works so long as $PAGER is defined, which it isn't in my current VM. So I guess it isn't universally defined. Can you default to less (and fall back to more?)?

bin/cylc Outdated
@@ -65,6 +65,14 @@ init_cylc() {
}

help_util() {
if [[ -z $PAGER ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use this syntax to satisfy set -u.

if [[ -z "${PAGER:-}" ]]; then

bin/cylc Outdated
@@ -65,6 +65,14 @@ init_cylc() {
}

help_util() {
if [[ -z $PAGER ]]; then
help_util2 $@
Copy link
Contributor

Choose a reason for hiding this comment

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

Always quote "$@".

@oliver-sanders oliver-sanders modified the milestones: soon, next release Jun 26, 2018
@oliver-sanders
Copy link
Member Author

Now a one liner! Have defaulted to less, do we need to fallback to more?

export PAGER='vi -'

@matthewrmshin matthewrmshin merged commit 2d25e72 into cylc:master Jul 6, 2018
@oliver-sanders oliver-sanders deleted the cylc-help-pager branch July 11, 2018 13:24
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.

3 participants