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.

stderr swallowed when using visidata as pager

See original GitHub issue

Description

When using visidata as pager, stderr is swallowed.

There are a few tickets about similar issues (#1200, #1275) but after reading those tickets I don’t know that there is a solution that works.

Interestingly, litecli works properly! Here are my configs and some examples:

pgcli config:

[main]
pager = kw /usr/local/bin/vd -f csv
table_format = csv
less_chatty = True
prompt = '> '

litecli config:

[main]
multi_line = False
pager = kw /usr/local/bin/vd
table_format = tsv
less_chatty = True

kw is “kitty window” that opens the output in a split, as you can see in the screenshots:

Visidata works as pager:

Screen Shot 2022-03-21 at 4 17 18 PM

But stderr swallowed:

Screen Shot 2022-03-21 at 4 17 28 PM

Visidata works as pager in litecli:

Screen Shot 2022-03-21 at 4 51 13 PM

But stderr is not swallowed:

Screen Shot 2022-03-21 at 4 51 55 PM

For some reason using Visidata only works as a pager in pgcli with csv format and not tsv (like I have set with litecli). If set to tsv, the pager seems to be ignored.

Running on Mac Big Sur 11.6.4 and pgcli version Version: 3.4.1.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
amjithcommented, May 23, 2022

I’m able to reproduce the issue. I’ll take a deeper look into why this is happening. Sorry about the issue.

0reactions
kbdcommented, Sep 15, 2022

I think it would be nice if stderr wasn’t read by Visidata though, and instead just printed out in the command line.

Given that litecli works the right way – it prints the error inline (see original screenshot) – why can’t pgcli?

Read more comments on GitHub >

github_iconTop Results From Across the Web

pgcli silently fails if there's an error · Issue #1275
Hm, I was hoping that it's a pager issue; I'm using pspg and I have ... I have a suspicion that stderr is...
Read more >
New(ish) command line tools
As an alternative allowing the use of any shell command/pipeline on the results ... shipped with macOS has a bug and might just...
Read more >
Awesome Stars - Source for https://arbal.github.io
timescale/timescaledb - An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension. taosdata/ ...
Read more >
Computer Science
themis - Multilanguage framework for making typical encryption schemes easy to use: data at rest, authenticated data exchange, transport ...
Read more >
Untitled
... 0001-fix-t1-extension-with-Python-3.10.patch PyX-0.15.tar.gz PyX.spec manual-pythonpath.patch ... cscope-7-fscanner-swallow-function-as-parameters.patch ...
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