kieselsteini / cgo

A terminal based gopher client - Please also look at: https://github.com/kieselsteini/delve for a better client
Other
109 stars 15 forks source link

Add verbose config option #16

Closed vascocosta closed 5 years ago

vascocosta commented 5 years ago

Hello and thanks for developing this amazing gopher client for all command line minimalists.

In its current state this client is just about perfect for me, with one small exception: me and some people I know that also use cgo would like to have a simple config option to make output less verbose, which is especially useful when the terminal has limited vertical real estate.

To this end I've committed a simple change on my local fork which adds a config option called verbose which the user can set to either true/on or false/off. Depending on the value, cgo will either display or hide messages like "downloading..." "executing..." which although useful might clutter the display. The default value is set to true, meaning this is opt-in.

You can see an illustration of verbose true on the left and verbose false on the right here:

https://i.imgur.com/3KvONWw.png

Feel free to accept/modify this pull request into your repo's master branch if you find this could be a useful option to add to this great client.

Thanks!

kieselsteini commented 5 years ago

Hello thank you for contributing. I've changed the base branch to develop as I want the master to reflect "stable" versions :) Are you going to add the new option into the man page as well or should I add this?

Thanks, Sebastian

kieselsteini commented 5 years ago

Added some documentation, adjusted the the config file and used a function for checking the value instead of strcasecmp (there might be some more "bool" options in future).

vascocosta commented 5 years ago

Thanks!

Good idea creating that function. Actually I realised it was a bool and thought about creating a macro or function for it as well, but then I wanted to leave that up to you for better integration with what you have in mind for future options.