[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/urgrep bfab29d1d7 014/115: Add support for searches sta
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/urgrep bfab29d1d7 014/115: Add support for searches starting with "-" |
|
Date: |
Wed, 10 May 2023 03:00:38 -0400 (EDT) |
branch: externals/urgrep
commit bfab29d1d7d478a1aaa68c00586d1b615daeaeea
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Add support for searches starting with "-"
---
urgrep-tests.el | 16 ++++++++--------
urgrep.el | 14 ++++++++------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/urgrep-tests.el b/urgrep-tests.el
index a56ef0c367..03812cc424 100644
--- a/urgrep-tests.el
+++ b/urgrep-tests.el
@@ -30,25 +30,25 @@
(let ((tool (assoc "ag" urgrep-tools))
(common-args "ag --color-path 35 --color-match 1\\;31 "))
(should (equal (urgrep-command "foo" :tool tool)
- (concat common-args "-Q --group foo")))
+ (concat common-args "-Q --group -- foo")))
(should (equal (urgrep-command "foo" :tool tool :group nil)
- (concat common-args "-Q --nogroup foo")))
+ (concat common-args "-Q --nogroup -- foo")))
(should (equal (urgrep-command "foo" :tool tool :regexp t)
- (concat common-args "--group foo")))
+ (concat common-args "--group -- foo")))
(should (equal (urgrep-command "foo" :tool tool :context 3)
- (concat common-args "-C3 -Q --group foo")))))
+ (concat common-args "-C3 -Q --group -- foo")))))
(ert-deftest urgrep-tests-command-git-grep ()
(let ((tool (assoc "git-grep" urgrep-tools))
(common-args "git -c color.grep.filename\\=magenta grep -n
--recurse-submodules --color "))
(should (equal (urgrep-command "foo" :tool tool)
- (concat common-args "-F --heading --break foo")))
+ (concat common-args "-F --heading --break -e foo")))
(should (equal (urgrep-command "foo" :tool tool :group nil)
- (concat common-args "-F foo")))
+ (concat common-args "-F -e foo")))
(should (equal (urgrep-command "foo" :tool tool :regexp t)
- (concat common-args "--heading --break foo")))
+ (concat common-args "--heading --break -e foo")))
(should (equal (urgrep-command "foo" :tool tool :context 3)
- (concat common-args "-C3 -F --heading --break foo")))))
+ (concat common-args "-C3 -F --heading --break -e foo")))))
(ert-deftest urgrep-tests-command-grep ()
(let ((tool (assoc "grep" urgrep-tools)))
diff --git a/urgrep.el b/urgrep.el
index 0536a7372a..074b30479e 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -81,7 +81,8 @@
(defvar urgrep-tools
`(("ag"
(executable-name "ag")
- (always-arguments ("--color-path" "35" "--color-match" "1;31"))
+ (pre-arguments ("--color-path" "35" "--color-match" "1;31"))
+ (post-arguments ("--"))
(group-arguments ((t ("--group"))
(nil ("--nogroup"))))
(regexp-arguments ((nil ("-Q"))))
@@ -89,8 +90,9 @@
("git-grep"
(executable-name "git")
(vc-backend "Git")
- (always-arguments ("-c" "color.grep.filename=magenta" "grep" "-n"
- "--recurse-submodules" "--color"))
+ (pre-arguments ("-c" "color.grep.filename=magenta" "grep" "-n"
+ "--recurse-submodules" "--color"))
+ (post-arguments ("-e"))
(group-arguments ((t ("--heading" "--break"))))
(regexp-arguments ((nil ("-F"))))
(context-arguments "-C%d"))
@@ -133,8 +135,8 @@
(if cmd-fun
(apply cmd-fun query rest)
(let ((executable (urgrep-get-property tool 'executable-name))
- (always-args (or (urgrep-get-property tool 'always-arguments) '()))
- (arguments '()))
+ (pre-args (or (urgrep-get-property tool 'pre-arguments) '()))
+ (arguments (or (urgrep-get-property tool 'post-arguments) '())))
;; Fill in group arguments. XXX: Maybe figure out a more flexible way
to
;; do this?
(when-let ((x (urgrep-get-property-assoc tool 'group-arguments group)))
@@ -151,7 +153,7 @@
;; FIXME: Inside compile and dired buffers, `shell-quote-argument'
;; doesn't handle TRAMP right...
(mapconcat #'shell-quote-argument
- (append `(,executable) always-args arguments `(,query))
+ (append `(,executable) pre-args arguments `(,query))
" ")))))
- [elpa] externals/urgrep 9e1f4da53b 070/115: Reorder keyword arguments to be more logical, (continued)
- [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, 2023/05/10
- [elpa] externals/urgrep bfab29d1d7 014/115: Add support for searches starting with "-",
ELPA Syncer <=
- [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
- [elpa] externals/urgrep 7823d384e6 115/115: Add .elpaignore, ELPA Syncer, 2023/05/10