Broken password-store-url

Pierre Neidhardt ambrevar at gmail.com
Fri Feb 9 10:11:27 CET 2018


password-store-url does not seem to work.
From the code, it seems that it's getting the first line (i.e. the
password), then checks if it's a URL.

	(defun password-store-url (entry)
	  "Browse URL stored in ENTRY.
	
	This will only browse URLs that start with http:// or http:// to
	avoid sending a password to the browser."
	  (interactive (list (password-store--completing-read)))
	  (let ((url (password-store-get entry)))
	    (if (or (string-prefix-p "http://" url)
	            (string-prefix-p "https://" url))
	        (browse-url url)
	      (error "%s" "String does not look like a URL"))))

I guess the right thing to

- skip the first line,
- then find the first URL like `ffap-next-url' does.

Besides there is a typo in the docstring:

-	This will only browse URLs that start with http:// or http:// to
+	This will only browse URLs that start with http:// or https:// to

But I guess this could be removed altogether by referring to the
"next-url" function instead.

-- 
Pierre Neidhardt

Events are not affected, they develop.
		-- Sri Aurobindo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20180209/2e99834d/attachment.asc>


More information about the Password-Store mailing list