Skip to content

Commit

Permalink
Merge pull request #153 from sometimesfood/ensure-docset-installed
Browse files Browse the repository at this point in the history
Add `helm-dash-ensure-docset-installed`
  • Loading branch information
kidd committed May 31, 2017
2 parents f07a77b + b01e4ae commit 9a23012
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions helm-dash.el
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,16 @@ If doesn't exist, it asks to create it."

(defalias 'helm-dash-update-docset 'helm-dash-install-docset)

(defun helm-dash-docset-installed-p (docset)
"Return true if DOCSET is installed."
(member docset (helm-dash-installed-docsets)))

;;;###autoload
(defun helm-dash-ensure-docset-installed (docset)
"Install DOCSET if it is not currently installed."
(unless (helm-dash-docset-installed-p docset)
(helm-dash-install-docset docset)))

(defun helm-dash-docset-folder-name (tar-output)
"Return the name of the folder where the docset has been extracted.
The argument TAR-OUTPUT should be an string with the output of a tar command."
Expand Down

0 comments on commit 9a23012

Please sign in to comment.