question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Results are appearing in a new window

See original GitHub issue

Description

The result opens in a new window rather than the current window. So every time I run a query I have to close the new window(press q) to get back to writing queries. Please see attached screencast. The results used to show in the current window but after a system update a couple of months ago it started showing results in a new window.

Your environment

python 3.6.3 screencast_11-27-2017_03_42_40-pm

Tried it in bash and zsh. Tried using fresh bashrc. Tried a different terminal emulator.

  • OS: Arch Linux (4.13.12-1-ARCH)
  • pgcli version: 1.8.1
  • pip freeze output:
backports.csv==1.0.5
cli-helpers==0.2.3
click==6.7
configobj==5.0.6
humanize==0.5.1
pgcli==1.8.1
pgspecial==1.9.0
prompt-toolkit==1.0.15
psycopg2==2.7.3.2
Pygments==2.2.0
setproctitle==1.1.10
six==1.11.0
sqlparse==0.2.4
terminaltables==3.1.0
wcwidth==0.1.7

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

12reactions
amjithcommented, Nov 27, 2017

Yup. That is the pager. @lutzhorn was right on the money. The good news is you can configure that pager to do what the pgcli demo does. Looks like you’re using the latest version of pgcli. If you open up your config file (~/.config/pgcli/config) you’ll see a line that is commented out: https://github.com/dbcli/pgcli/blob/master/pgcli/pgclirc#L79

Just uncomment the line and restart pgcli and viola.

If that line doesn’t exist in your config file just copy that line into the config file and uncomment it, and you’ll be good to go.

Older versions of pgcli used to enforce that config option, but it is generally frowned upon to mess with a user’s environment vars. So we decided to make it an option.

I hope that helps.

1reaction
j-bennetcommented, Nov 30, 2017

@vjpr It’s just that pgcli and mycli stopped overriding less options if those are already set in the environment, because that was intrusive. Now LESS is only set if it’s unset. For more information, see here:

http://www.mycli.net/pager

But it’s possible to use export LESS="-XFR", or override the pager in pgclirc like @amjith mentioned above, to get the same behavior as before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Open a New Window to Display Results Each Time ...
Click to add a tick next to “Open each selected result in a new browser window.” 3. Click or tap “Save” and then...
Read more >
"Open links from search results in a new tab or window" option
going into the Settings screen, but my home pc, the same pc that won't open links from search results in a new tab,...
Read more >
How to set Google Search Results open in New Window or ...
How to set Google Search Results open in New Window or New Tab · 1. Start Firefox · 2. Click on Tools Open...
Read more >
result display in the new window - javascript - Stack Overflow
i have created a button which calculates sum value . after calculation i want to display my result in the new window like...
Read more >
How to Have Google Always Open Search Results in a New Tab
Step 2: Scroll to the section reading Where results open and put a check on the new browser window option under it. Google...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found