branch: master
commit a6cd18916be10214c7badf174279a0fb1e68a11e
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    counsel.el (counsel-linux-apps-list): Skip spaces around =
    
    The spec says to ignore the spaces around "=".
    
    
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
    
    Fixes #446
---
 counsel.el |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index cea7f4e..499fb48 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1834,14 +1834,14 @@ An extra action allows to switch to the process buffer."
         (insert-file-contents (expand-file-name file 
"/usr/share/applications"))
         (let (name comment exec)
           (goto-char (point-min))
-          (if (re-search-forward "^Name=\\(.*\\)$" nil t)
+          (if (re-search-forward "^Name *= *\\(.*\\)$" nil t)
               (setq name (match-string 1))
             (error "File %s has no Name" file))
           (goto-char (point-min))
-          (when (re-search-forward "^Comment=\\(.*\\)$" nil t)
+          (when (re-search-forward "^Comment *= *\\(.*\\)$" nil t)
             (setq comment (match-string 1)))
           (goto-char (point-min))
-          (when (re-search-forward "^Exec=\\(.*\\)$" nil t)
+          (when (re-search-forward "^Exec *= *\\(.*\\)$" nil t)
             (setq exec (match-string 1)))
           (if (and exec (not (equal exec "")))
               (add-to-list

Reply via email to