Skip to content

Input frequently alternates between pager and prompt #508

@dradtke

Description

@dradtke

In some scenarios, it seems like input intended for the pager is instead read by the usql prompt.

When I first start up usql and query enough data to activate the pager, I can scroll through the results and exit the pager by simply pressing q. This is the expected behavior.

However, when I then run a different query that also uses the pager, pressing q instead shows the usql prompt, with the q press read:

=> q

Pressing q a second time then successfully quits the pager, but there is still the lingering input at the prompt.

This isn't specific to q, though it's the most common scenario for me. If I run the query again, pressing j repeatedly will alternate between scrolling the pager down one row, and adding another j at the prompt. Input seems to jump back and forth between the two, until I successfully get the pager to read a q.

My PAGER environment variable is not set, so usql is using whatever the default pager is (presumably less).

Tested with usql 0.19.14 on Ubuntu 22.04.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions