[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/shell-command+ 384494b821 2/2: Use 'shell-quote-argumen
From: |
ELPA Syncer |
Subject: |
[elpa] externals/shell-command+ 384494b821 2/2: Use 'shell-quote-argument' where applicable (grep, man) |
Date: |
Sat, 11 Mar 2023 08:59:39 -0500 (EST) |
branch: externals/shell-command+
commit 384494b82105e15d8d15bf27219f215c2981e537
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Use 'shell-quote-argument' where applicable (grep, man)
---
shell-command+.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/shell-command+.el b/shell-command+.el
index e91e7d07c3..58ada358b9 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -242,11 +242,10 @@ prefix the command with \"../../../../\" or \"....\".")
"Convert COMMAND into a `grep' call."
(grep-compute-defaults)
(pcase-let ((`(,cmd . ,args) (shell-command+-tokenize command t)))
- (grep (mapconcat #'identity
- (cons (replace-regexp-in-string
- (concat "\\`" grep-program) cmd grep-command)
- args)
- " "))))
+ (grep (concat
+ (replace-regexp-in-string
+ (concat "\\`" grep-program) cmd grep-command)
+ (mapconcat #'shell-quote-argument args " ")))))
(defun shell-command+-cmd-find (command)
"Convert COMMAND into a `find-dired' call."
@@ -261,7 +260,7 @@ prefix the command with \"../../../../\" or \"....\".")
(defun shell-command+-cmd-man (command)
"Convert COMMAND into a `man' call."
(pcase-let ((`(,_ . ,args) (shell-command+-tokenize command)))
- (man (mapconcat #'identity args " "))))
+ (man (mapconcat #'shell-quote-argument args " "))))
(declare-function Info-menu "info" (menu-item &optional fork))
(defun shell-command+-cmd-info (command)