zsh-workers
 help / color / mirror / code / Atom feed
* Escaping of pasted URLs no more works with 5.0.8-test-3 (compared to 5.0.8)
@ 2015-08-27 16:09 Axel Beckert
  2015-08-27 16:28 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Beckert @ 2015-08-27 16:09 UTC (permalink / raw)
  To: zsh-workers

Hi,

I just installed 5.0.8-test-3 as Debian package (not yet uploaded
anywhere) and worked on some other Debian package while waiting for
the Jenkins build to finish.

While pasting the URL
"https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=links-client-certs.patch;msg=5;att=1;bug=797066"
I noticed the following:

In zsh 5.0.8, all the special characters were escaped:

% wget --content-disposition https://bugs.debian.org/cgi-bin/bugreport.cgi\?filename\=links-client-certs.patch\;msg\=5\;att\=1\;bug\=797066

In zsh 5.0.8-test-3, nothing is escaped anymore:

% wget --content-disposition https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=links-client-certs.patch;msg=5;att=1;bug=797066

I suspect that this has to do with zsh now recognizing if something
came from a paste or was typed into the terminal.

While I generally consider this to be a good idea for line breaks and
friends, not escaping pasted URLs anymore is IMHO definitely a
regression and a loss of a very nice feature.

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)


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

* Re: Escaping of pasted URLs no more works with 5.0.8-test-3 (compared to 5.0.8)
  2015-08-27 16:09 Escaping of pasted URLs no more works with 5.0.8-test-3 (compared to 5.0.8) Axel Beckert
@ 2015-08-27 16:28 ` Bart Schaefer
  2015-08-27 16:56   ` Axel Beckert
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2015-08-27 16:28 UTC (permalink / raw)
  To: Axel Beckert, zsh-workers

On Aug 27,  6:09pm, Axel Beckert wrote:
}
} While pasting the URL
} "https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=links-client-certs.patch;msg=5;att=1;bug=797066"
} 
} In zsh 5.0.8-test-3, nothing is escaped anymore:
} 
} While I generally consider this to be a good idea for line breaks and
} friends, not escaping pasted URLs anymore is IMHO definitely a
} regression and a loss of a very nice feature.

You need Functions/Zle/bracketed-paste-magic to go with url-quote-magic

I should probably write actual contrib.yo documentation for these at
some point, it seems from the feedback as though url-quote-magic is a
lot more widely used than I thought.

-- 
Barton E. Schaefer


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

* Re: Escaping of pasted URLs no more works with 5.0.8-test-3 (compared to 5.0.8)
  2015-08-27 16:28 ` Bart Schaefer
@ 2015-08-27 16:56   ` Axel Beckert
  2015-08-27 17:22     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Beckert @ 2015-08-27 16:56 UTC (permalink / raw)
  To: zsh-workers

Hi,

On Thu, Aug 27, 2015 at 09:28:34AM -0700, Bart Schaefer wrote:
> On Aug 27,  6:09pm, Axel Beckert wrote:
> } In zsh 5.0.8-test-3, nothing is escaped anymore:
> } 
> } While I generally consider this to be a good idea for line breaks and
> } friends, not escaping pasted URLs anymore is IMHO definitely a
> } regression and a loss of a very nice feature.
> 
> You need Functions/Zle/bracketed-paste-magic to go with url-quote-magic

Thanks for that hint. I've added the following to my zshrc directly
after "zle -N self-insert url-quote-magic":

  autoload -Uz bracketed-paste-magic
  zle -N bracketed-paste bracketed-paste-magic

(as mentioned inside a comment in
Functions/Zle/bracketed-paste-magic.)

Now it seems to work again, thanks! Interestingly zsh 5.0.8 seems to
have no issue with that config either, so I don't have to guard it
with some version test. Neat!

> I should probably write actual contrib.yo documentation for these at
> some point, it seems from the feedback as though url-quote-magic is
> a lot more widely used than I thought.

Hehe. Yeah, I consider it one of the best zsh features, at least a
very good selling argument. :-)

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)


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

* Re: Escaping of pasted URLs no more works with 5.0.8-test-3 (compared to 5.0.8)
  2015-08-27 16:56   ` Axel Beckert
@ 2015-08-27 17:22     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2015-08-27 17:22 UTC (permalink / raw)
  To: zsh-workers

On Aug 27,  6:56pm, Axel Beckert wrote:
}
}   autoload -Uz bracketed-paste-magic
}   zle -N bracketed-paste bracketed-paste-magic
} 
} Now it seems to work again, thanks! Interestingly zsh 5.0.8 seems to
} have no issue with that config either, so I don't have to guard it
} with some version test. Neat!

There is no bracketed-paste built-in widget in 5.0.8 or before, so there
is no binding to invoke it and the autoload will never need to resolve.

See zsh-users/20450 for how to add bracketed-paste support to older
versions as a user-defined widget, but it'd take some wrangling to
combine that with bracketed-paste-magic.  I briefly toyed with making
bracketed-paste-magic backwards-installable, but decided that was too
ugly.


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

end of thread, other threads:[~2015-08-27 17:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-27 16:09 Escaping of pasted URLs no more works with 5.0.8-test-3 (compared to 5.0.8) Axel Beckert
2015-08-27 16:28 ` Bart Schaefer
2015-08-27 16:56   ` Axel Beckert
2015-08-27 17:22     ` Bart Schaefer

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).