Skip to content

Commit b5cdf8b

Browse files
committed
fix: path escapes in macOS
1 parent a82d502 commit b5cdf8b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

org-logseq.el

+9
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ The type can be 'url, 'draw and 'page, denoting the link type."
7676
(cons 'draw link))
7777
(t (cons 'page link)))))))
7878

79+
(defun org-logseq-grep-query (page-or-id)
80+
"Return grep result for searching PAGE-OR-ID in `org-logseq-dir'."
81+
(let ((type (car page-or-id))
82+
(query (cdr page-or-id)))
83+
(format (pcase type
84+
('page "grep -niR \"^#+\\(TITLE\\|ALIAS\\): *%s\" %s --exclude-dir=.git" )
85+
('id "grep -niR \":id: *%s\" %s --exclude-dir=.git"))
86+
query (shell-quote-argument org-logseq-dir))))
87+
7988
(defun org-logseq-grep-query (page-or-id)
8089
"Return grep result for searching PAGE-OR-ID in `org-logseq-dir'."
8190
(let ((type (car page-or-id))

0 commit comments

Comments
 (0)