def echo_via_pager(*args, **kwargs):
    """Display pager only if it does not fit in one terminal screen.

    NOTE: The feature is available only on ``less``-based pager.
    """
    try:
        restore = 'LESS' not in os.environ
        os.environ.setdefault('LESS', '-iXFR')
        click.echo_via_pager(*args, **kwargs)
    finally:
        if restore:
            os.environ.pop('LESS', None)
def echo_via_pager ( * args , ** kwargs ) : try : restore = 'LESS' not in os . environ os . environ . setdefault ( 'LESS' , '-iXFR' ) click . echo_via_pager ( * args , ** kwargs ) finally : if restore : os . environ . pop ( 'LESS' , None )
Display pager only if it does not fit in one terminal screen.

    NOTE: The feature is available only on ``less``-based pager.