guumaster / hostctl

Your dev tool to manage /etc/hosts like a pro!
http://guumaster.github.io/hostctl
MIT License
1.05k stars 45 forks source link

Minimal Output #30

Closed smhmd closed 4 years ago

smhmd commented 4 years ago

Is your feature request related to a problem? Please describe. I use /etc/hosts to block websites during work and it exceeds 20,000 lines. When listing profiles, it all gets outputted.

Describe the solution you'd like I would love there to be a minified output flag (through persistent configuration? hostctl config minimal)

Describe alternatives you've considered outputting to /dev/null, but I want to see enabled/disabled profiles.

guumaster commented 4 years ago

We can add a -q to silence output.

Also I'm thinking about a config file so users can tweat default behavior

smhmd commented 4 years ago

Great. I also think a command for on/off profiles could be useful.

$ hostctl list -m
awesome on
meh off
splendid on

This is much easily scripted as I want to make a dmenu script for turning profiles on and off.

smhmd commented 4 years ago

effectively, hostctl list --raw -c profile,status | uniq.

smhmd commented 4 years ago

just an idea, not really a feature request: How about hostctl toggle along side enable and disable?

guumaster commented 4 years ago
hostctl list -m

What would be the meaning of -m? menu? not sure I get it.

The toggle idea could be useful. Or even some kind of "only" to turn all off and switch to one specific profile.

smhmd commented 4 years ago

the -m is for minimal.

Or even some kind of "only" to turn all off and switch to one specific profile.

I agree. Different modes for enabling/disabling can be very handy.

I suggested toggle just to ease with the cognitive load and make use of commands from history.

Another mere suggestion and not a feature request is having hostctl list --on/hostctl list --off to list only on or off profiles.

guumaster commented 4 years ago

This issue ended up on this features:

Thanks for your contribution @smhmd!