Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment to pgclirc pager section on default LESS #1395

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

andyscho
Copy link
Contributor

@andyscho andyscho commented Feb 24, 2023

Description

Add brief comment detailing the behavior in pgcli/main.py.

I also changed the example pager setting since it seemed misleading that the less options in the pager setting would be able to be used as if the LESS environment variable is not being set automatically.

Checklist

  • I've added this contribution to the changelog.rst.
  • I've added my name to the AUTHORS file (or it's already there).
  • I installed pre-commit hooks (pip install pre-commit && pre-commit install), and ran black on my code.
  • Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2023

Codecov Report

Base: 84.15% // Head: 79.63% // Decreases project coverage by -4.53% ⚠️

Coverage data is based on head (a9ef703) compared to base (6884c29).
Patch coverage: 51.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1395      +/-   ##
==========================================
- Coverage   84.15%   79.63%   -4.53%     
==========================================
  Files          21       25       +4     
  Lines        2720     2975     +255     
==========================================
+ Hits         2289     2369      +80     
- Misses        431      606     +175     
Impacted Files Coverage Δ
pgcli/magic.py 0.00% <0.00%> (ø)
pgcli/packages/parseutils/tables.py 97.67% <ø> (ø)
pgcli/packages/sqlcompletion.py 97.67% <ø> (ø)
pgcli/pgstyle.py 64.00% <ø> (ø)
pgcli/pgtoolbar.py 31.57% <0.00%> (+0.15%) ⬆️
pgcli/pyev.py 15.38% <15.38%> (ø)
pgcli/explain_output_formatter.py 46.15% <46.15%> (ø)
pgcli/key_bindings.py 52.94% <66.66%> (-0.19%) ⬇️
pgcli/pgbuffer.py 67.85% <66.66%> (+1.19%) ⬆️
pgcli/main.py 78.61% <76.47%> (+0.07%) ⬆️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@j-bennet
Copy link
Contributor

Thanks for the PR @andyscho ! While you're at it, you can also add a link to https://www.pgcli.com/pager for more info.

@andyscho andyscho force-pushed the add-comment-on-LESS-args branch from 0df732b to a9ef703 Compare February 25, 2023 17:10
@andyscho andyscho force-pushed the add-comment-on-LESS-args branch from a9ef703 to 6412595 Compare February 25, 2023 17:13
@andyscho
Copy link
Contributor Author

andyscho commented Feb 25, 2023

Adding the link to the pager page seems reasonable. I also made a PR to also add some info to it here.

I also updated this PR and its description since I think it's good to also change the example pager setting in the config.

I'm also not really opposed to changing the current behavior in main.py to something like "only set the LESS environment variable if the pager setting in the config is not set", but I don't have a strong opinion. It also seemed like it would be a bit sad to force users updating to a later version of pgcli to change their config to retain the less behavior they previously had in pgcli.

@j-bennet
Copy link
Contributor

I think it's fine as is, @andyscho. I'll go ahead and merge it. Thank you!

@j-bennet j-bennet merged commit 0a502ac into dbcli:main Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants