[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/urgrep c7a3cc5b30 015/115: Be less aggressive with shel
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/urgrep c7a3cc5b30 015/115: Be less aggressive with shell-quoting on MS Windows |
|
Date: |
Wed, 10 May 2023 03:00:38 -0400 (EDT) |
branch: externals/urgrep
commit c7a3cc5b30cdca7a9e96409b6fbcf0094c5d2cad
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Be less aggressive with shell-quoting on MS Windows
---
urgrep.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/urgrep.el b/urgrep.el
index 074b30479e..242afd1c0f 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -128,6 +128,16 @@
(string= vc-backend-name tool-vc-backend)))
(cl-return tool))))))
+(defun urgrep--maybe-shell-quote-argument (argument)
+ "Quote ARGUMENT if needed for passing to an inferior shell.
+This works as `shell-quote-argument', but avoids quoting unnecessarily
+for MS shells."
+ (if (and (or (eq system-type 'ms-dos)
+ (and (eq system-type 'windows-nt) (w32-shell-dos-semantics)))
+ (not (string-match "[^-0-9a-zA-Z_./=]" argument)))
+ argument
+ (shell-quote-argument argument)))
+
(cl-defun urgrep-command (query &rest rest &key tool (group t) regexp
(context 0))
(let* ((tool (or tool (urgrep-get-tool)))
@@ -152,7 +162,7 @@
(setq arguments (append (list context-arg) arguments)))
;; FIXME: Inside compile and dired buffers, `shell-quote-argument'
;; doesn't handle TRAMP right...
- (mapconcat #'shell-quote-argument
+ (mapconcat #'urgrep--maybe-shell-quote-argument
(append `(,executable) pre-args arguments `(,query))
" ")))))
- [elpa] externals/urgrep f354b44121 059/115: Always filter filenames in 'urgrep-filter', (continued)
- [elpa] externals/urgrep f354b44121 059/115: Always filter filenames in 'urgrep-filter', ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 9e1f4da53b 070/115: Reorder keyword arguments to be more logical, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 0687d9e867 073/115: Update copyright, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep ce07e97d37 088/115: Allow ANSI escapes for matches to end just after a newline, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep dbb2c2caeb 095/115: Wrap some docstring lines with "\", ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 9949a5b296 094/115: Use connection-local variables for caching the tool to use for each host, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 569c52f504 083/115: Allow overriding EMACS during tests, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep d479dc5ad6 104/115: Remove unnecessary/wrong Git grep color settings, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep d0012b9fcb 112/115: Tweak tests so they only work around Emacs bug#58265 on older versions, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 392e4bcb98 008/115: Don't inherit from compilation-minor-mode to avoid its menu, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep c7a3cc5b30 015/115: Be less aggressive with shell-quoting on MS Windows,
ELPA Syncer <=
- [elpa] externals/urgrep bfab29d1d7 014/115: Add support for searches starting with "-", ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 814ad5c60d 038/115: Update tests to work on MS Windows, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 86c36492b9 064/115: Include a description of how to enable wgrep support in the README, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 7453367e6d 065/115: Avoid false-positives when looking for context lines in results, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 593d209a31 067/115: Search in untracked files with git grep, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 1c08b41324 078/115: s/TRAMP/Tramp/g, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 6df13a8dee 071/115: Add support for urgrep command in Eshell, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 11e1f7474e 079/115: Add CI configuration, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep a7d87da8b5 096/115: Slight improvements to docstrings for defcustoms, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 1172efb5a2 107/115: Don't allow using an unknown tool in `urgrep-command`, ELPA Syncer, 2023/05/10