-
Notifications
You must be signed in to change notification settings - Fork 209
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
Port CLI to click #98
Conversation
Nice work! (I hope, am on holidays and while I had a look at the commits, I didn't actually run it). I'd like to merge this first into branch configobj (which you are happy to do if you want 😈 ), then fix up the docs and finally merge configobj into master and do a 0.3 release. My reasoning is this: a lot changed (default behaviour, config file format and dependencies) and I'd like to avoid the state where the online documentaion is either out of sync with current github master or released version/packages. Once the complete doc is in sphinx/on rtd the handy version number Also: before you put more time into refactoring config parsing, have a look at branch configobj (most of the old stuff will leave us). Regarding the invocation of How does the current version behave if a -a CAL and a -d CAL option are given? |
I wasn't sure whether configobj is even maintained anymore, found the port to Python 3 only recently (Michael Foord's site seems to be unmaintained). I assume you're using this variant? https://github.com/DiffSK/configobj/blob/master/README.md I'll have a look at the branch. What's the progress on that one?
Glad to hear that, the hackery to make this work would be really bad.
The validation happens with custom code. |
Quoting Markus Unterwaditzer (2014-08-13 23:23:09)
Yes, that's the one (and the one you get through pypi), looks well
The configobj part should be done, I'm working mostly on the doc there
|
I'm currently rebasing. |
somehow this escaped me, could you please file issues for these crashes? Quoting Markus Unterwaditzer (2014-08-14 13:50:20)
|
They're mostly fixed on my PC. |
And I had to remove the subcommand feature again... click has another issue i can't fix. |
if this means we're now depending on a released version of click again, Quoting Markus Unterwaditzer (2014-08-21 14:30:57)
|
There's currently no release that contains both fixes. We can't work around any of them, at least not without manually modifying argv. |
3cde457
to
7bea3b3
Compare
3.2 was released, i removed the workaround since we depend on that version anyway. |
Are there any tasks left for this? |
There are some problems with color names, urwid uses other color |
Maybe we could just use the functions in |
It looks like the current situation regarding the default command and options is rather messed up. With e.g. having As I said before, if there is no proper solution to this, I'm willing to scrap khal's abilitiy to run without any subcommands. |
Click has a very sharp differentiation between options for the whole group and options for subcommands, which means So:
That's because
That's because |
See also pallets/click#108 |
Ah, I didn't get that. I'll update the docs. |
The situation with default commands is really idiotic IMO. Not sure if we even should support it if it's that confusing. |
I have experimentally re-enabled -a/-d for calendar and agend (see 7e1fb34), but its rather ugly. I'm still undecided if we should remove the default command. |
The current situation is not optimal anyway, as |
2c86cbe
to
4ed1f4f
Compare
Coming back to this: If we should accept both I reverted coloring for now, we could add it later. |
I removed the global |
b636611
to
f5377d3
Compare
hmm, my last commit didn't really fix new, with
|
It's fixed now, see commit msg for explanation. |
Otherwise this seems to work fine now. If you rebase it on master I'll merge it (or feel free to do it yourself). |
And avoid random breakage if user has a "wrong" version of vdirsyncer installed.
Also remove default subcommand feature because of pallets/click#205
The -a option for the "new" command was set to multiple=False, which is why the callback would recieve a single calendar (as single string) instead of a tuple of calendars.
The |
Notes: