Bash: extract pager handling to component.