Package: zsh
Version: 5.0.7-5
Severity: wishlist
Tags: patch

Dear Maintainer,

The next release of zsh (5.0.9) will introduce a behaviour change,
whereby pasted text will not be automatically executed, even if it
contains newlines (see upstream commit
98687fa1dec803f041cbb5417c146d8aa5129b53).

Upstream had concerns¹ that users might be confused by the behaviour
change, since 5.0.8 and earlier would simply execute a command-line that
was pasted into the terminal, if it ended with a newline.

¹ http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=35835

One way to make it clear that the shell is waiting for input is to set
'zle_highlight=(paste:standout)' (see b4aff3bc52e15be87304183b3ae959668192b48c).
 Please consider adding that setting to newuser.zshrc.recommended.

Patch attached.

Cheers,

Daniel

P.S. Discussed on #pkg-zsh with Carsten prior to sending.


-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing-updates'), (500, 
'stable-updates'), (200, 'unstable'), (200, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages zsh depends on:
ii  dpkg        1.17.25
ii  libc6       2.19-18
ii  libcap2     1:2.24-8
ii  libtinfo5   5.9+20140913-1+b1
ii  zsh-common  5.0.7-5

Versions of packages zsh recommends:
ii  libncursesw5  5.9+20140913-1+b1
ii  libpcre3      2:8.35-3.3

Versions of packages zsh suggests:
pn  zsh-doc  <none>

-- debconf-show failed
commit ed5e22a276243ca4d29b29ea42a848d908ec5d3c
Author: Daniel Shahaf <d...@daniel.shahaf.name>
Date:   Fri Jul 31 14:41:18 2015 +0000

    newuser.zshrc.recommended: Highlight pasted text

diff --git a/debian/newuser.zshrc.recommended b/debian/newuser.zshrc.recommended
index 55be3ab..984776b 100644
--- a/debian/newuser.zshrc.recommended
+++ b/debian/newuser.zshrc.recommended
@@ -35,3 +35,7 @@ zstyle ':completion:*' verbose true
 
 zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
 zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
+
+# Hint that a paste with embedded newlines hasn't been executed
+(( $+zle_highlight )) || zle_highlight=()
+zle_highlight+=(paste:standout)

Reply via email to