Skip to content
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

Cannot remove docsets containing a space. #5

Closed
mhoogendoorn opened this issue Mar 7, 2016 · 3 comments
Closed

Cannot remove docsets containing a space. #5

mhoogendoorn opened this issue Mar 7, 2016 · 3 comments

Comments

@mhoogendoorn
Copy link

I installed the .Net Framework documentation:

$ dasht-docsets
NET Framework

They did not include FSharp documentation, so I tried to remove them:

$ dasht-docsets-remove
Removable docsets (2):

        NET, Framework

echo Remove NET docset [y/N] ?...
echo Remove Framework docset [y/N] ?...

The space in the NET Framework.docset directory seems to be the culprit.

@mhoogendoorn
Copy link
Author

If in dasht-docset-remove I add:

IFS="
"

right before the set -- $(dasht-docsets "$@") it does work since the output of dasht-docset only gets split on newlines, not on spaces/tabs. The "Removable docsets" line is still incorrect as the sed still replaces spaces by a comma followed by a space, but the correct docset can now be deleted.

--edit
It removes the docset, but not the corresponding .tgz as that is named NET_Framework.tgz.

@sunaku
Copy link
Owner

sunaku commented Mar 7, 2016

Thanks for your report and suggestion! 👍

I'm wondering where that space came from in the first place, because the installer shows that an underscore is used between "NET" and "Framework". Did the tarball extract out to a folder named with a space instead of underscore?

Update: confirmed, the tarball extracted to a folder name with a space instead of underscore. 😱

$ dasht-docsets-install net
--2016-03-07 10:30:58--  https://kapeli.com/docset_links
Resolving kapeli.com (kapeli.com)... 23.92.22.81
Connecting to kapeli.com (kapeli.com)|23.92.22.81|:443... connected.
HTTP request sent, awaiting response... 304 Not Modified
File ‘/home/sunny/.local/share/dasht/docsets/docset_links’ not modified on server. Omitting download.

Installable docsets (2):

        MarionetteJS, NET_Framework

sunaku added a commit that referenced this issue Mar 8, 2016
Docset tarballs downloaded by dasht-docset-install(1) have no spaces in
their names, so use the same naming scheme for their extracted folders.

Thanks to Martijn Hoogendoorn (@mhoogendoorn) for reporting that such
naming mismatches occur and for suggesting a potential fix in issue #5.
sunaku added a commit that referenced this issue Mar 8, 2016
Docset tarballs downloaded by dasht-docset-install(1) have no spaces in
their names, so use the same naming scheme for their extracted folders.

Thanks to Martijn Hoogendoorn (@mhoogendoorn) for reporting that such
naming mismatches occur and for suggesting a potential fix in issue #5.
sunaku added a commit that referenced this issue Mar 8, 2016
Docset tarballs downloaded by dasht-docset-install(1) have no spaces in
their names, so use the same naming scheme for their extracted folders.

Thanks to Martijn Hoogendoorn (@mhoogendoorn) for reporting that such
naming mismatches occur and for suggesting a potential fix in issue #5.
@sunaku
Copy link
Owner

sunaku commented Mar 8, 2016

Fixed now in master branch at commit b73f37c. 🎁

I decided to avoid spaces in the first place by introducing a new dasht-docsets-extract(1) script.

@sunaku sunaku closed this as completed Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants