Skip to content

feat(print): support STACKIT_PAGER environment variable - #1757

Open
amirthn6533 wants to merge 1 commit into
stackitcloud:mainfrom
amirthn6533:feat/1755-support-stackit-pager-env
Open

amirthn6533 wants to merge 1 commit into
stackitcloud:mainfrom
amirthn6533:feat/1755-support-stackit-pager-env

Conversation

@amirthn6533

Copy link
Copy Markdown

Summary

Closes #1755

This PR introduces support for the STACKIT_PAGER environment variable to configure the pager command specifically for the STACKIT CLI.

Changes

  • Updated PagerDisplay in internal/pkg/print/print.go to check STACKIT_PAGER first.
    • If STACKIT_PAGER is set, it is used as the pager command (taking precedence over the global PAGER).
    • If STACKIT_PAGER is unset, it falls back to PAGER.
    • If neither is set, it preserves the default less -F -S -w -R -K.
  • Added unit tests in internal/pkg/print/print_test.go (TestPagerDisplay_StackitPager) verifying precedence and fallback behavior.

Note: As a Computer Science graduate from Technical University of Sofia living in Sofia, Bulgaria, I actively follow Schwarz Digits & STACKIT's infrastructure engineering work and have applied for engineering positions at Schwarz Digits Bulgaria. Very happy to contribute to the STACKIT CLI!

Closes stackitcloud#1755

Signed-off-by: Amir Tahani <amirthn653381@gmail.com>
@amirthn6533
amirthn6533 requested a review from a team as a code owner November 18, 2026 21:12
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.

Allow to specify pager for STACKIT cli only

1 participant