Comments (10)
@weisjohn How do you feel about this implementation?
I added a new configuration: "display_lists_in_pager" and defaulted it to true. If enabled, any command that lists bulk results (gitlab projects
or gitlab snippets
) will display results in the system pager or "less." All results are returned at all times whether this configuration is true or false. The understanding being that if you choose not to use the pager you could spew hundreds of results on the screen.
I really felt there was no good way to allow a user to set a 'results per page' value and page through them. Thoughts?
I will polish this implementation and await your thoughts. I haven't merged it into master or tagged it yet. Thanks.
from gitlab-cli.
@drewblessing that sounds awesome to me, I love the idea of sending it to less
or whatever system pager is available. I don't know if you can determine if stdout is being redirected, but if you can, then I wouldn't send it to less
in that case...
from gitlab-cli.
Hmm. I'm not sure if I can do that. Are you envisioning a case where someone might call this tool from another script or automated tool? In that case, it may require them setting that configuration to false.
With that in mind, it may also be a good idea to tie this configuration setting in with the other instances where I use the system pager - viewing snippets for example.
from gitlab-cli.
yeah, that's precisely the case that I'm using it for, but if setting display_lists_in_pager
to false will cause the output to not go through less
than that's fine.
from gitlab-cli.
yes, that will completely bypass less
. In anticipation of also using this configuration with other purposes in the future, I've renamed it display_results_in_pager
.
I tagged the changes as v1.1.0.pre. If you have an opportunity would you like to test these changes for me?
from gitlab-cli.
Looks great! I tried both options and it works perfectly! Thanks for doing this!
from gitlab-cli.
Glad to hear that. I am backtracking slightly on the default configuration here. To maintain original functionality I'm going to default this new configuration to false
. I felt maintaining was important.
Also, I added some flags to allow you to override the paging on a one time basis. For example:
gitlab projects --nopager
or gitlab projects --pager
from gitlab-cli.
Tagged and released in v1.1.0.
from gitlab-cli.
Thanks again @weisjohn. I appreciate your input.
from gitlab-cli.
You're welcome! Thanks for soliciting it / being open to it!
from gitlab-cli.
Related Issues (20)
- Add group support
- Make docs more visually friendly
- Add ability to configure output level
- Implement noecho or echo false for password input
- Update task descriptions so they're consistent.
- Remove [] from all required params
- Allow adding project with namespace name or id
- Similar project HOT 4
- Config Location HOT 2
- Merge request support?
- Same install; one works the other doesn't HOT 2
- Error "Could not find X command" HOT 6
- "405 Method Not Allowed" on User session creation HOT 1
- Is it able to send merge request ? HOT 1
- Have the gem and git repo use the same name
- Add support for modern GitLab versions HOT 1
- Getting error on latest OSX HOT 1
- Update json dependency version
- Add remote to current project HOT 2
- Push, List, Mark issues completed from command line
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlab-cli.