-
Notifications
You must be signed in to change notification settings - Fork 157
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
Allow to cycle through settings #250
Comments
Toggle takes extra arguments to cycle between. |
Let me know if the docs need clarification (needed to double check that bit was in there). |
I guess so. I had tested it like this before reporting, but it fails:
Am I misunderstanding the concept? |
Does the toggle command work outside of chain? |
Not for |
toggle works by looking at the current value and from that figuring out the next value. The problem with proxy_url is that it normalises the urls when set so we don't get a match
however seems to be a separate issue clearing the proxy_url |
Confirmed. Despite this, how can the third state be "proxy off" ? I tried several variants of escaped "emptiness". |
I think that's a bug in implementation of the proxy_url variable. I can't get it to work with a simple |
Works just fine with normalized strings now. Thanks. Maybe we should have a way to "name" proxies in order to display that name in the UI (and ditch my approach of putting a hash tag into the URL for that purpose). |
=> just like toggle, but with multiple settings
Use case:
@cbind !xx = chain 'cycle proxy_url http://127.0.0.1:8123#polipo http://127.0.0.1:8118#privoxy ""' 'reload'
The above should switch to polipo upon first invocation, to privoxy upon second and to no proxy (note the
""
) upon third. (On the fourth, back to polipo and so on ...; also reload upon every invocation)Any way to achieve this in current master?
The text was updated successfully, but these errors were encountered: