zsh-users
 help / color / mirror / code / Atom feed
* zsh 4.6.2-test-2
@ 2018-12-19 20:54 Peter Stephenson
  2018-12-19 20:55 ` zsh 5.6.2-test-2 Peter Stephenson
  2018-12-21  5:40 ` zsh 4.6.2-test-2 Sebastian Gniazdowski
  0 siblings, 2 replies; 12+ messages in thread
From: Peter Stephenson @ 2018-12-19 20:54 UTC (permalink / raw)
  To: Zsh Users' List

I've uploaded a test version of zsh to

http://www.zsh.org/pub/development/

Not much particularly likely to be amiss.  However, unless everyone is
prepared to swear blind within a day or so that it's OK it'll probably
be the new year before I get a chance to make a release.

pws



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 5.6.2-test-2
  2018-12-19 20:54 zsh 4.6.2-test-2 Peter Stephenson
@ 2018-12-19 20:55 ` Peter Stephenson
  2018-12-21  5:40 ` zsh 4.6.2-test-2 Sebastian Gniazdowski
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Stephenson @ 2018-12-19 20:55 UTC (permalink / raw)
  To: Zsh Users' List

On Wed, 2018-12-19 at 20:54 +0000, Peter Stephenson wrote:
> I've uploaded a test version of zsh to
> 
> http://www.zsh.org/pub/development/

Obviously, when I said "4" I meant "5".

pws



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2018-12-19 20:54 zsh 4.6.2-test-2 Peter Stephenson
  2018-12-19 20:55 ` zsh 5.6.2-test-2 Peter Stephenson
@ 2018-12-21  5:40 ` Sebastian Gniazdowski
  2018-12-22  2:55   ` Sebastian Gniazdowski
  2018-12-22  9:32   ` Sebastian Gniazdowski
  1 sibling, 2 replies; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-12-21  5:40 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users' List

Could this wait for the (todays?) patch where zle_highlight is used
only when it is set to other than default value?
This would fix rather most certainly a bug. This would allow to add
X04zlehighlight tests.

BTW. I've submitted an issue to iTerm2, there are people that know
much about terminals, and it yielded a few interesting facts:
https://gitlab.com/gnachman/iterm2/issues/7221

On Wed, 19 Dec 2018 at 21:56, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
>
> I've uploaded a test version of zsh to
>
> http://www.zsh.org/pub/development/
>
> Not much particularly likely to be amiss.  However, unless everyone is
> prepared to swear blind within a day or so that it's OK it'll probably
> be the new year before I get a chance to make a release.
>
> pws
>
>


-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2018-12-21  5:40 ` zsh 4.6.2-test-2 Sebastian Gniazdowski
@ 2018-12-22  2:55   ` Sebastian Gniazdowski
  2018-12-30 18:20     ` Peter Stephenson
  2018-12-22  9:32   ` Sebastian Gniazdowski
  1 sibling, 1 reply; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-12-22  2:55 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users' List

[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]

I've found time and wrote the patch (it's the file zle_highlight_fix.patch.txt).

With the patch, zle_highlight will be used when user customizes it. If
it's in default state, then termcap will be called for color > 7.

The allows to use zle_highlight entries ( fg_start_code:"code" ... )
for 256-color sequences. This allows to commit the new zle tests,
X04zlehighlight. They're testing region_highlight. The tests are:

0:basic region_highlight with 8 colors
0:basic region_highlight with true-color (hex-triplets)
0:basic region_highlight with near-color (hex-triplets at input)
0:overlapping region_highlight with 8 colors
0:overlapping region_highlight with true-color
0:overlapping region_highlight with near-color (hex-triplets at input)

I can see multiple new tests being added.

On Fri, 21 Dec 2018 at 06:40, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> Could this wait for the (todays?) patch where zle_highlight is used
> only when it is set to other than default value?
> This would fix rather most certainly a bug. This would allow to add
> X04zlehighlight tests.
>
> BTW. I've submitted an issue to iTerm2, there are people that know
> much about terminals, and it yielded a few interesting facts:
> https://gitlab.com/gnachman/iterm2/issues/7221
>
> On Wed, 19 Dec 2018 at 21:56, Peter Stephenson
> <p.w.stephenson@ntlworld.com> wrote:
> >
> > I've uploaded a test version of zsh to
> >
> > http://www.zsh.org/pub/development/
> >
> > Not much particularly likely to be amiss.  However, unless everyone is
> > prepared to swear blind within a day or so that it's OK it'll probably
> > be the new year before I get a chance to make a release.
> >
> > pws
> >
> >
>
>
> --
> Sebastian Gniazdowski
> News: https://twitter.com/ZdharmaI
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> Blog: http://zdharma.org



-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

[-- Attachment #2: zle_highlight_fix.patch.txt --]
[-- Type: text/plain, Size: 4531 bytes --]

From 785447bde15f3a6fe0035f70ae48e9688f5bffb9 Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Sat, 8 Dec 2018 22:42:49 +0100
Subject: [PATCH] Instead of using termcap, 256-colours are based on
 zle_highlight entries
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Following code snippet performs the conversion of colour number to the
code to be emitted to terminal (the example shows both foreground and
background color handling – this depends on `fg_bg' value):
    ...
    strcpy(colseq_buf, fg_bg_sequences[fg_bg].start);
    ...
    } else if (colour > 7 && colour <= 255) {
        ptr += sprintf(ptr, "8;5;%d", colour);
    ...
---
 Src/prompt.c | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/Src/prompt.c b/Src/prompt.c
index 568bfc2a9..135aca942 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -1764,7 +1764,12 @@ output_colour(int colour, int fg_bg, int use_tc, int truecol, char *buf)
 	/* length of hex triplet always 7, don't need sprintf to count */
 	atrlen += buf ? sprintf(ptr, "#%02x%02x%02x", colour >> 16,
 		(colour >> 8) & 0xff, colour & 0xff) : 7;
-    /* colour should only be > 7 if using termcap but let's be safe */
+    /* colour should only be > 7 if using termcap but let's be safe. Update:
+     * currently other places in code don't always imply that colour > 7 =>
+     * using-termcap - if zle_highlight will be non-default, then it will be
+     * used instead of termcap even for colour > 7. Here this just emits the
+     * color number, so it works fine for both zle_highlight and tercap cases
+     */
     } else if (use_tc || colour > 7) {
 	char digbuf[DIGBUFSIZE];
 	sprintf(digbuf, "%d", colour);
@@ -1995,6 +2000,7 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
     char *ptr;
     int do_free, is_prompt = (flags & TSC_PROMPT) ? 1 : 0;
     int colour, tc, def, use_termcap, use_truecolor;
+    int is_default_zle_highlight = 1;
 
     if (fg_bg == COL_SEQ_FG) {
 	colour = txtchangeget(atr, TXT_ATTR_FG_COL);
@@ -2010,6 +2016,15 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
 	use_termcap = txtchangeisset(atr, TXT_ATTR_BG_TERMCAP);
     }
 
+    /* Test if current zle_highlight settings are customized, or
+     * the typical "standard" codes */
+    if (0 != strcmp(fg_bg_sequences[fg_bg].start, fg_bg == COL_SEQ_FG ? "\e[3" : "\e[4") ||
+            0 != strcmp(fg_bg_sequences[fg_bg].def, "9") || /* the same in-fix for both FG and BG */
+            0 != strcmp(fg_bg_sequences[fg_bg].end, "m") /* the same suffix for both FG and BG */
+   ) {
+            is_default_zle_highlight = 0;
+    }
+
     /*
      * If we're not restoring the default, and either have a
      * colour value that is too large for ANSI, or have been told
@@ -2020,7 +2035,7 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
      * highlighting variables, so much of this shouldn't be
      * necessary at this point, but we might as well be safe.
      */
-    if (!def && !use_truecolor && (colour > 7 || use_termcap)) {
+    if (!def && !use_truecolor && (is_default_zle_highlight && (colour > 7 || use_termcap))) {
 	/*
 	 * We can if it's available, and either we couldn't get
 	 * the maximum number of colours, or the colour is in range.
@@ -2046,9 +2061,10 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
 	}
 	/*
 	 * Nope, that didn't work.
-	 * If 0 to 7, assume standard ANSI works, otherwise it won't.
+	 * If 0 to 7, assume standard ANSI works, if 8 to 255, assume
+         * typical 256-color escapes works, otherwise it won't.
 	 */
-	if (colour > 7)
+	if (colour > 255)
 	    return;
     }
 
@@ -2057,6 +2073,10 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
 	allocate_colour_buffer();
     }
 
+    /* Build the reset-code: .start + .def + . end
+     * or the typical true-color code: .start + 8;2;%d;%d;%d + .end
+     * or the typical 256-color code: .start + 8;5;%d + .end
+     */
     strcpy(colseq_buf, fg_bg_sequences[fg_bg].start);
 
     ptr = colseq_buf + strlen(colseq_buf);
@@ -2067,6 +2087,8 @@ set_colour_attribute(zattr atr, int fg_bg, int flags)
     } else if (use_truecolor) {
 	ptr += sprintf(ptr, "8;2;%d;%d;%d", colour >> 16,
 		(colour >> 8) & 0xff, colour & 0xff);
+    } else if (colour > 7 && colour <= 255) {
+        ptr += sprintf(ptr, "8;5;%d", colour);
     } else
 	*ptr++ = colour + '0';
     strcpy(ptr, fg_bg_sequences[fg_bg].end);
-- 
2.15.1 (Apple Git-101)


[-- Attachment #3: X04zlehighlight.patch.txt --]
[-- Type: text/plain, Size: 7468 bytes --]

From 1c055c3d8b2777585d7fd239d3f676e936f952b1 Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Sun, 11 Nov 2018 00:50:46 +0100
Subject: [PATCH] =?UTF-8?q?Test:=20X04zlehighlight.ztst=20=E2=80=93=20zle?=
 =?UTF-8?q?=20tests=20for=20region=5Fhighlight=20array?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Test/X04zlehighlight.ztst | 153 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 153 insertions(+)
 create mode 100644 Test/X04zlehighlight.ztst

diff --git a/Test/X04zlehighlight.ztst b/Test/X04zlehighlight.ztst
new file mode 100644
index 000000000..23ad14bd6
--- /dev/null
+++ b/Test/X04zlehighlight.ztst
@@ -0,0 +1,153 @@
+# Tests for region_highlight, true-color support, near-color support
+# Version 0.7 2018-12-06
+%prep
+
+  export TERM=xterm-256color
+  if [[ ${+termcap} != 1 || ${termcap[Co]} != <-> || ${termcap[Co]} -lt 256 ]]; then
+    ZTST_unimplemented="no termcap module OR termcap doesn't support 256 or more colors"
+  elif [[ $OSTYPE == cygwin ]]; then
+    ZTST_unimplemented='the zsh/zpty module does not work on Cygwin'
+  elif zmodload zsh/zpty 2> /dev/null; then
+    zpty_start() {
+      export PS1= PS2=
+      zpty -d
+      zpty zsh "${(q)ZTST_testdir}/../Src/zsh -fiV +Z"
+      zpty -w zsh 'zle_highlight=( fg_start_code:"CDE|3" fg_end_code:"|" bg_start_code:"BCDE|4" bg_end_code:"|" )'
+    }
+    zpty_input() {
+      zpty ${${(M)2:#nonl}:+-n} -w zsh "$1"
+    }
+    zpty_enable_zle() {
+      zpty -w zsh "tcfunc() { REPLY=""; }"
+      # This line will not be echoed back, behaving like ! -o zle
+      zpty -w zsh "setopt zle; zle -T tc tcfunc; unset zle_bracketed_paste"
+    }
+    zpty_line() {
+      setopt localoptions extendedglob noshwordsplit
+      local REPLY cm=$'\r'
+      integer i
+      for (( i = 0; i < ${1:-1}; ++i )); do
+        zpty -r zsh REPLY
+        # P is for "preserve", and induces keeping some
+        # expected color codes to test region_highlight,
+        # etc. - the color codes are made a regular text.
+        [[ "$2" = "p" ]] && {
+            REPLY=${REPLY//(#b)$'\x1b'\[([0-9;]##m)/${match[1]}}
+        } || {
+            REPLY=${REPLY//$'\x1b'\[[0-9;]##m/}   # remove all [0-9]...m codes
+        }
+        # Fix e^Mexit - match ((?)\r(?)), if \2 == \3, then replace with \2
+        # otherwise replace with \1 stripped out of leading/trailing [[:space:]]
+        REPLY=${REPLY//(#b)((?(#c0,1))$cm(?(#c0,1)))/${${${(M)match[2]:#${match[3]}}:+${match[2]}}:-${${match[1]##[[:space:]]##}%%[[:space:]]##}}}
+        [[ -n "$REPLY" ]] && print -r -- ${${REPLY%%[[:space:]]##}##[[:space:]]##}
+      done
+    }
+    zpty_stop() {
+      setopt localoptions extendedglob
+      local REPLY cm=$'\r'
+      # To early Ctrl-D might happen, it was happening when debug
+      # logs were writing to a file slowing down Zle a little
+      LANG=C sleep 0.333
+      # Zle is active, can use Ctrl-D to exit
+      zpty -n -w zsh $'\C-d'
+      # zpty gives no output when piped without these braces (?)
+      # The while loop with // substitution is to convert `e^Mexit'
+      # into `exit' (see zpty_line). The sed commands remove escapes
+      { zpty -r zsh } | sed -e $'/[^\t\r ]/!d' -e $'s/\r$//' -e $'s/\x1b\\[[0-9;]*m//g' | while read REPLY; do REPLY=${REPLY//(#b)((?(#c0,1))$cm(?(#c0,1)))/${${${(M)match[2]:#${match[3]}}:+${match[2]}}:-${${match[1]##[[:space:]]##}%%[[:space:]]##}}}; print -rn -- "$REPLY"; done
+      zpty -d
+      :
+    }
+  else
+    ZTST_unimplemented='the zsh/zpty module is not available'
+  fi
+
+%test
+
+  zpty_start
+  zpty_input 'rh_widget() { BUFFER="true word2 word3"; region_highlight+=( "0 4 fg=196" ); rh2; }'
+  zpty_input 'rh2() { region_highlight=( "2 3 standout" ); };' # note the =, not +=
+  zpty_input 'zle -N rh_widget'
+  zpty_input 'bindkey "\C-a" rh_widget'
+  zpty_enable_zle
+  zpty_input $'\C-a'  # emits newline, which executes BUFFER="true" command
+  zpty_line 1 p       # the line of interest, preserving escapes ("p")
+  zpty_stop
+0:region highlight - standout overlapping on other region_highlight entry
+>0m27m24mtr7mu27me word2 word3
+
+  zpty_start
+  zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=green" ); }'
+  zpty_input 'zle -N rh_widget'
+  zpty_input 'bindkey "\C-a" rh_widget'
+  zpty_enable_zle
+  zpty_input $'\C-a'  # emits newline, which executes BUFFER="true" command
+  zpty_line 1 p       # the line of interest, preserving escapes ("p")
+  zpty_stop
+0:basic region_highlight with 8 colors
+>0m27m24mCDE|32|trueCDE|39|
+
+  zpty_start
+  zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=#040810" ); }'
+  zpty_input 'zle -N rh_widget'
+  zpty_input 'bindkey "\C-a" rh_widget'
+  zpty_enable_zle
+  zpty_input $'\C-a'  # emits newline, which executes BUFFER="true" command
+  zpty_line 1 p       # the line of interest, preserving escapes ("p")
+  zpty_stop
+0:basic region_highlight with true-color (hex-triplets)
+>0m27m24mCDE|38;2;4;8;16|trueCDE|39|
+
+  zpty_start
+  zpty_input 'zmodload zsh/nearcolor'
+  zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=#040810" ); }'
+  zpty_input 'zle -N rh_widget'
+  zpty_input 'bindkey "\C-a" rh_widget'
+  zpty_enable_zle
+  zpty_input $'\C-a'  # emits newline, which executes BUFFER="true" command
+  zpty_line 1 p       # the line of interest, preserving escapes ("p")
+  zpty_stop
+0:basic region_highlight with near-color (hex-triplets at input)
+>0m27m24mCDE|38;5;232|trueCDE|39|
+
+  zpty_start
+  zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=green" ); rh2; }'
+  zpty_input 'rh2() { region_highlight+=( "1 2 fg=red" ); }' # `r' in red; the above line would be too long
+  zpty_input 'zle -N rh_widget'
+  zpty_input 'bindkey "\C-a" rh_widget'
+  zpty_enable_zle
+  zpty_input $'\C-a'  # emits newline, which executes BUFFER="true" command
+  zpty_line 1 p       # the line of interest, preserving escapes ("p")
+  zpty_stop
+0:overlapping region_highlight with 8 colors
+>0m27m24mCDE|32|tCDE|31|rCDE|39|CDE|32|ueCDE|39|
+
+  zpty_start
+  zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=#00cc00" ); rh2; }'
+  zpty_input 'rh2() { region_highlight+=( "1 2 fg=#cc0000" ); }' # `r' in red; the above line would be too long
+  zpty_input 'zle -N rh_widget'
+  zpty_input 'bindkey "\C-a" rh_widget'
+  zpty_enable_zle
+  zpty_input $'\C-a'  # emits newline, which executes BUFFER="true" command
+  zpty_line 1 p       # the line of interest, preserving escapes ("p")
+  zpty_stop
+0:overlapping region_highlight with true-color
+>0m27m24mCDE|38;2;0;204;0|tCDE|38;2;204;0;0|rCDE|39|CDE|38;2;0;204;0|ueCDE|39|
+
+  zpty_start
+  zpty_input 'zmodload zsh/nearcolor'
+  zpty_input 'rh_widget() { BUFFER="true"; region_highlight+=( "0 4 fg=#00cc00" ); rh2; }'
+  zpty_input 'rh2() { region_highlight+=( "1 2 fg=#cc0000" ); }' # `r' in red; the above line would be too long
+  zpty_input 'zle -N rh_widget'
+  zpty_input 'bindkey "\C-a" rh_widget'
+  zpty_enable_zle
+  zpty_input $'\C-a'  # emits newline, which executes BUFFER="true" command
+  zpty_line 1 p       # the line of interest, preserving escapes ("p")
+  zpty_stop
+0:overlapping region_highlight with near-color (hex-triplets at input)
+>0m27m24mCDE|38;5;40|tCDE|38;5;160|rCDE|39|CDE|38;5;40|ueCDE|39|
+
+%clean
+
+  zmodload -ui zsh/zpty
+
+# vim:ft=zsh
-- 
2.15.1 (Apple Git-101)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2018-12-21  5:40 ` zsh 4.6.2-test-2 Sebastian Gniazdowski
  2018-12-22  2:55   ` Sebastian Gniazdowski
@ 2018-12-22  9:32   ` Sebastian Gniazdowski
  1 sibling, 0 replies; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-12-22  9:32 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

I've gave wrong iTerm issue link l, correct one:
https://gitlab.com/gnachman/iterm2/issues/7412

Pt., 21.12.2018, 06:40: Sebastian Gniazdowski <sgniazdowski@gmail.com>
napisał(a):

> Could this wait for the (todays?) patch where zle_highlight is used
> only when it is set to other than default value?
> This would fix rather most certainly a bug. This would allow to add
> X04zlehighlight tests.
>
> BTW. I've submitted an issue to iTerm2, there are people that know
> much about terminals, and it yielded a few interesting facts:
> https://gitlab.com/gnachman/iterm2/issues/7221
>
> On Wed, 19 Dec 2018 at 21:56, Peter Stephenson
> <p.w.stephenson@ntlworld.com> wrote:
> >
> > I've uploaded a test version of zsh to
> >
> > http://www.zsh.org/pub/development/
> >
> > Not much particularly likely to be amiss.  However, unless everyone is
> > prepared to swear blind within a day or so that it's OK it'll probably
> > be the new year before I get a chance to make a release.
> >
> > pws
> >
> >
>
>
> --
> Sebastian Gniazdowski
> News: https://twitter.com/ZdharmaI
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> Blog: http://zdharma.org
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2018-12-22  2:55   ` Sebastian Gniazdowski
@ 2018-12-30 18:20     ` Peter Stephenson
  2018-12-31 17:41       ` Sebastian Gniazdowski
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Stephenson @ 2018-12-30 18:20 UTC (permalink / raw)
  To: Zsh Users' List

On Sat, 2018-12-22 at 03:55 +0100, Sebastian Gniazdowski wrote:
> I've found time and wrote the patch (it's the file zle_highlight_fix.patch.txt).
> 
> With the patch, zle_highlight will be used when user customizes it. If
> it's in default state, then termcap will be called for color > 7.

I've certainly no objection to working round termcap, so I've committed
this and the tests, but I probably wouldn't be sensitive to problems
here, so I'm relying on others to let me know.

Cheers
pws


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2018-12-30 18:20     ` Peter Stephenson
@ 2018-12-31 17:41       ` Sebastian Gniazdowski
  2019-01-01 19:54         ` Bart Schaefer
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Gniazdowski @ 2018-12-31 17:41 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users' List

On Sun, 30 Dec 2018 at 19:22, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
> I've certainly no objection to working round termcap, so I've committed
> this and the tests, but I probably wouldn't be sensitive to problems
> here, so I'm relying on others to let me know.

Cool, the zle_highlight overriding of termcap is of a small weight
here, the tests are heavier, it's a big step to include them (finally
some pure-Zle tests!), but I expect that it will be fine, no "random"
or other failures. I hope that Oliver (and Bart) looks at this, but he
said that the tests pass.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2018-12-31 17:41       ` Sebastian Gniazdowski
@ 2019-01-01 19:54         ` Bart Schaefer
  2019-01-02 10:48           ` Sebastian Gniazdowski
  0 siblings, 1 reply; 12+ messages in thread
From: Bart Schaefer @ 2019-01-01 19:54 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Peter Stephenson, Zsh Users' List

On Mon, Dec 31, 2018 at 9:45 AM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> I hope that Oliver (and Bart) looks at this, but he
> said that the tests pass.

Tests pass for me on MacOS High Sierra.  I don't use much highlighting
in daily activities (mostly because I try to keep consistency
with/across the variety of zsh versions on assorted remote hosts I
have to log into) so I may not have much more to contribute.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2019-01-01 19:54         ` Bart Schaefer
@ 2019-01-02 10:48           ` Sebastian Gniazdowski
  2019-01-02 11:35             ` Daniel Shahaf
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Gniazdowski @ 2019-01-02 10:48 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Peter Stephenson, Zsh Users' List

On Tue, 1 Jan 2019 at 20:54, Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Mon, Dec 31, 2018 at 9:45 AM Sebastian Gniazdowski
> <sgniazdowski@gmail.com> wrote:
> >
> > I hope that Oliver (and Bart) looks at this, but he
> > said that the tests pass.
>
> Tests pass for me on MacOS High Sierra.  I don't use much highlighting
> in daily activities (mostly because I try to keep consistency
> with/across the variety of zsh versions on assorted remote hosts I
> have to log into) so I may not have much more to contribute.

Maybe Daniel could contribute? I plan on too for adding some test
cases. Currently there are 2 test cases per each function: 8-color,
24-bit color, 24-bit-to-near-color, plus one test case for
standout-escape-code.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2019-01-02 10:48           ` Sebastian Gniazdowski
@ 2019-01-02 11:35             ` Daniel Shahaf
  2019-01-02 12:37               ` Sebastian Gniazdowski
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Shahaf @ 2019-01-02 11:35 UTC (permalink / raw)
  To: zsh-users

Sebastian Gniazdowski wrote on Wed, 02 Jan 2019 11:48 +0100:
> On Tue, 1 Jan 2019 at 20:54, Bart Schaefer <schaefer@brasslantern.com> wrote:
> >
> > On Mon, Dec 31, 2018 at 9:45 AM Sebastian Gniazdowski
> > <sgniazdowski@gmail.com> wrote:
> > >
> > > I hope that Oliver (and Bart) looks at this, but he
> > > said that the tests pass.
> >
> > Tests pass for me on MacOS High Sierra.  I don't use much highlighting
> > in daily activities (mostly because I try to keep consistency
> > with/across the variety of zsh versions on assorted remote hosts I
> > have to log into) so I may not have much more to contribute.
> 
> Maybe Daniel could contribute? I plan on too for adding some test
> cases. Currently there are 2 test cases per each function: 8-color,
> 24-bit color, 24-bit-to-near-color, plus one test case for
> standout-escape-code.

TESTNUM=X04 passes on my machine as of master of a few days ago
(statically-linked debug build) (I haven't tried again since).  What
else might I be able to contribute?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2019-01-02 11:35             ` Daniel Shahaf
@ 2019-01-02 12:37               ` Sebastian Gniazdowski
  2019-01-02 13:11                 ` Daniel Shahaf
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Gniazdowski @ 2019-01-02 12:37 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh Users

On Wed, 2 Jan 2019 at 12:44, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Sebastian Gniazdowski wrote on Wed, 02 Jan 2019 11:48 +0100:
> > Maybe Daniel could contribute? I plan on too for adding some test
> > cases. Currently there are 2 test cases per each function: 8-color,
> > 24-bit color, 24-bit-to-near-color, plus one test case for
> > standout-escape-code.
>
> TESTNUM=X04 passes on my machine as of master of a few days ago
> (statically-linked debug build) (I haven't tried again since).  What
> else might I be able to contribute?

Maybe you know some untested categories of region_highlight contents
thanks to your work on Z-Syntax-H?

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: zsh 4.6.2-test-2
  2019-01-02 12:37               ` Sebastian Gniazdowski
@ 2019-01-02 13:11                 ` Daniel Shahaf
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Shahaf @ 2019-01-02 13:11 UTC (permalink / raw)
  To: zsh-users

Sebastian Gniazdowski wrote on Wed, 02 Jan 2019 13:37 +0100:
> On Wed, 2 Jan 2019 at 12:44, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> > Sebastian Gniazdowski wrote on Wed, 02 Jan 2019 11:48 +0100:
> > > Maybe Daniel could contribute? I plan on too for adding some test
> > > cases. Currently there are 2 test cases per each function: 8-color,
> > > 24-bit color, 24-bit-to-near-color, plus one test case for
> > > standout-escape-code.
> >
> > TESTNUM=X04 passes on my machine as of master of a few days ago
> > (statically-linked debug build) (I haven't tried again since).  What
> > else might I be able to contribute?
> 
> Maybe you know some untested categories of region_highlight contents
> thanks to your work on Z-Syntax-H?

I vaguely remember some issues where not all modifiers in the standard
16 colors + modifiers set can be set simultaneously (some subset of
fg/bg/standout/underline/etc resetting some of the others).  That was
discussed on this list, but I don't have the reference, sorry.

z-sy-h's test suite doesn't test the functionality of region_highlight,
either; the test suite simply checks that z-sy-h's code has set
region_highlight to the expected value, but nothing beyond that.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-01-02 13:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 20:54 zsh 4.6.2-test-2 Peter Stephenson
2018-12-19 20:55 ` zsh 5.6.2-test-2 Peter Stephenson
2018-12-21  5:40 ` zsh 4.6.2-test-2 Sebastian Gniazdowski
2018-12-22  2:55   ` Sebastian Gniazdowski
2018-12-30 18:20     ` Peter Stephenson
2018-12-31 17:41       ` Sebastian Gniazdowski
2019-01-01 19:54         ` Bart Schaefer
2019-01-02 10:48           ` Sebastian Gniazdowski
2019-01-02 11:35             ` Daniel Shahaf
2019-01-02 12:37               ` Sebastian Gniazdowski
2019-01-02 13:11                 ` Daniel Shahaf
2018-12-22  9:32   ` Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).