Skip to content

Commit

Permalink
counsel.el (counsel-linux-apps-list): Skip spaces around =
Browse files Browse the repository at this point in the history
  • Loading branch information
abo-abo committed Mar 18, 2016
1 parent e6f92fd commit a6cd189
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions counsel.el
Expand Up @@ -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
Expand Down

2 comments on commit a6cd189

@tumashu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abo-abo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file to parse is too trivial to justify adding a dependency.

Please sign in to comment.