-
Notifications
You must be signed in to change notification settings - Fork 846
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
Add haddock --open
flag. #1396
#2015
Conversation
The behaviour of the flag is pretty close to this short description by @mgsloan.
The flag is not very smart about figuring out the right haddock location when called with a single target. For example, running I was a bit surprised by the behaviour of the command with non-project, non-snapshot targets. For example, when I run |
b63e03d
to
3d7b46f
Compare
When I run this I get
I think there is an errant use of |
You're right! I didn't notice because xdg-open strips out the quotes automatically.
As I've noted above, the global project doesn't have it's own haddock index file. (This issue is related). So where I would open Would you prefer a different behaviour for a call like Aside: Not being able to simply call
Good point, I hadn't thought about that. |
3d7b46f
to
ff32ff5
Compare
I've fixed this in combination with a rebase. |
Thanks for fixing! What do you think of having Then, we can also have One reason I like this is that latter is that later on we can further overload it with opening the docs for a particular module, like Sorry for the design thrashing, not saying we necessarily need to go this way. But to me it seems like a rather nice way to do it! |
I think these are very good ideas. The problem is that I'm not sure when I'll get around to implementing them. I think this PR as it stands is already useful although it certainly has some warts. Would you consider merging the PR as is and tracking these ideas for improvement in a separate issue? |
Sure. I still don't think there should be logic for the global project, but I'll fix it. |
I've fixed the logic to not special case the global project. The global project really has very little that is special about it, it is just a default. Local projects could also have no packages, and run into this same condition. I've fixed the special casing of global project: 420f86f I've opened up an issue about the CLI enhancement: #2025 |
No description provided.