[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/urgrep 8c6e3d5ba2 101/115: Ensure we get exactly the co
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/urgrep 8c6e3d5ba2 101/115: Ensure we get exactly the colors we want |
|
Date: |
Wed, 10 May 2023 03:00:49 -0400 (EDT) |
branch: externals/urgrep
commit 8c6e3d5ba2407cdef33a268ae5d539e7241bfc63
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Ensure we get exactly the colors we want
---
urgrep-tests.el | 24 ++++++++++++++++--------
urgrep.el | 31 ++++++++++++++++++++++---------
2 files changed, 38 insertions(+), 17 deletions(-)
diff --git a/urgrep-tests.el b/urgrep-tests.el
index 016b826f4c..6e4c58f90a 100644
--- a/urgrep-tests.el
+++ b/urgrep-tests.el
@@ -155,9 +155,10 @@ joined to compare against COMMAND."
(ert-deftest urgrep-tests/command/ripgrep ()
(let ((tool (assq 'ripgrep urgrep-tools))
- (common-args '("rg" "--color" "always" "--colors" "path:fg:magenta"
- "--colors" "match:fg:red" "--colors"
- "match:style:bold")))
+ (common-args '("rg" "--color=always" "--colors=path:none"
+ "--colors=path:fg:magenta" "--colors=line:none"
+ "--colors=column:none" "--colors=match:none"
+ "--colors=match:fg:red" "--colors=match:style:bold")))
;; String/case
(urgrep-tests/check-command
(urgrep-command "foo" :tool tool)
@@ -219,11 +220,12 @@ joined to compare against COMMAND."
;; Color
(urgrep-tests/check-command
(urgrep-command "foo" :tool tool :color nil)
- (append '("rg" "--color" "never" "--heading" "-i" "-F" "--" "foo")))))
+ (append '("rg" "--color=never" "--heading" "-i" "-F" "--" "foo")))))
(ert-deftest urgrep-tests/command/ag ()
(let ((tool (assq 'ag urgrep-tools))
- (common-args '("ag" "--color-path" "35" "--color-match" "1;31")))
+ (common-args '("ag" "--color" "--color-path=35" "--color-line="
+ "--color-match=1;31")))
;; String/case
(urgrep-tests/check-command
(urgrep-command "foo" :tool tool)
@@ -290,8 +292,9 @@ joined to compare against COMMAND."
(ert-deftest urgrep-tests/command/ack ()
(let ((tool (assq 'ack urgrep-tools))
- (common-args '("ack" "--color-filename" "magenta" "--color-match"
- "bold red")))
+ (common-args '("ack" "--color" "--color-filename=magenta"
+ "--color-lineno=clear" "--color-colno=clear"
+ "--color-match=bold red")))
;; String/case
(urgrep-tests/check-command
(urgrep-command "foo" :tool tool)
@@ -359,7 +362,12 @@ joined to compare against COMMAND."
(ert-deftest urgrep-tests/command/git-grep ()
(let ((tool (assq 'git-grep urgrep-tools))
(common-args '("git" "--no-pager" "-c" "color.grep.filename=magenta"
- "-c" "color.grep.match=bold red" "grep" "--color"
+ "-c" "color.grep.match=bold red" "-c"
+ "color.grep.context=" "-c" "color.grep.function="
+ "-c" "color.grep.lineNumber=" "-c" "color.grep.column="
+ "-c" "color.grep.matchContext=" "-c"
+ "color.grep.matchSelected=" "-c" "color.grep.selected="
+ "-c" "color.grep.separator=" "grep" "--color"
"--no-index" "--exclude-standard" "-n"))
(group-args '("--heading" "--break")))
;; String/case
diff --git a/urgrep.el b/urgrep.el
index a1f9bb7088..f8545af147 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -301,10 +301,12 @@ See also `grep-process-setup'."
(group-arguments ('nil '("--no-heading"))
(_ '("--heading")))
(context-arguments . ,urgrep--context-arguments)
- (color-arguments ('nil '("--color" "never"))
- (_ '("--color" "always" "--colors" "path:fg:magenta"
- "--colors" "match:fg:red" "--colors"
- "match:style:bold"))))
+ (color-arguments ('nil '("--color=never"))
+ (_ '("--color=always" "--colors=path:none"
+ "--colors=path:fg:magenta"
+ "--colors=line:none" "--colors=column:none"
+ "--colors=match:none" "--colors=match:fg:red"
+ "--colors=match:style:bold"))))
(ag
(executable-name . "ag")
(regexp-syntax pcre)
@@ -320,7 +322,8 @@ See also `grep-process-setup'."
(_ '("--group")))
(context-arguments . ,urgrep--context-arguments)
(color-arguments ('nil '("--nocolor"))
- (_ '("--color-path" "35" "--color-match" "1;31"))))
+ (_ '("--color" "--color-path=35" "--color-line="
+ "--color-match=1;31"))))
(ack
(executable-name . "ack")
(regexp-syntax pcre)
@@ -335,8 +338,9 @@ See also `grep-process-setup'."
(_ '("--group")))
(context-arguments . ,urgrep--context-arguments)
(color-arguments ('nil '("--nocolor"))
- (_ '("--color-filename" "magenta" "--color-match"
- "bold red"))))
+ (_ '("--color" "--color-filename=magenta"
+ "--color-lineno=clear" "--color-colno=clear"
+ "--color-match=bold red"))))
(git-grep
(executable-name . "git")
;; XXX: Since we use --no-index, maybe it would make sense to allow using
@@ -360,8 +364,17 @@ See also `grep-process-setup'."
;; subcommand and turning colors on/off happens *after*, so
;; `color-arguments' needs to include the subcommand "grep".
(color-arguments ('nil '("grep" "--no-color"))
- (_ '("-c" "color.grep.filename=magenta" "-c"
- "color.grep.match=bold red" "grep" "--color"))))
+ (_ '("-c" "color.grep.filename=magenta"
+ "-c" "color.grep.match=bold red"
+ "-c" "color.grep.context="
+ "-c" "color.grep.function="
+ "-c" "color.grep.lineNumber="
+ "-c" "color.grep.column="
+ "-c" "color.grep.matchContext="
+ "-c" "color.grep.matchSelected="
+ "-c" "color.grep.selected="
+ "-c" "color.grep.separator="
+ "grep" "--color"))))
(grep
(executable-name . "grep")
(regexp-syntax bre ere pcre)
- [elpa] externals/urgrep 4fec944d51 016/115: Fix output of git-grep and grep on Linux, (continued)
- [elpa] externals/urgrep 4fec944d51 016/115: Fix output of git-grep and grep on Linux, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep f2ac6d6b02 011/115: Fix getting vc backend, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 3fb6b95f21 026/115: Add support for smart case-folding, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep a405b9c459 031/115: Add ability to toggle case-sensitivity for the current search, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 74f38b1021 037/115: Add ability to filter the files to be searched, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 8065bb9f5e 039/115: Update requirements and fix failing MS Windows test, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep b0dbe7c6c1 046/115: Update heading, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep e9e70552db 057/115: Use 'format-prompt' if available, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 6f5813ba78 062/115: Add support for wgrep; resolves #2, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 69e45bad3c 069/115: Fix unit tests for git-grep, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 8c6e3d5ba2 101/115: Ensure we get exactly the colors we want,
ELPA Syncer <=
- [elpa] externals/urgrep 2523b6ed4e 108/115: Improve line wrapping slightly, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep e70773d86b 035/115: Refactor urgrep-process-setup so tools can define their own process-setup, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep fdd8dd54e6 044/115: Provide more details in the README, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 3052b8c191 049/115: Use #' read syntax for functions, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 582896b5af 050/115: Use dotted pairs for alist for each tool, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep c38b33878f 053/115: Autoloading 'urgrep-setup-hook' really shouldn't be necessary..., ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep a12bd677f7 056/115: Fix 'mouse-face' symbol, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 3370860a1b 043/115: Add support for toggling color output, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep c97985820d 048/115: Minor typographical fixes, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 136b1845d7 020/115: Add support for various regexp syntaxes, defaulting to BRE, ELPA Syncer, 2023/05/10