[vlc-devel] [PATCH 1/2] http2: fix up URLs

Alexandre Janniaux ajanni at videolabs.io
Sun Oct 11 17:19:30 CEST 2020


On Sat, Oct 10, 2020 at 08:49:55AM +0300, Rémi Denis-Courmont wrote:
> Le lauantaina 10. lokakuuta 2020, 1.05.06 EEST Pierre Ynard via vlc-devel a
> écrit :
> > > URL on CLI don't work nicely, never will, no matter how much it annoys
> > > me that I can't just do:
> > > # vlc https://tube.example.com/videos/?item=1234&playlist=abcd
> >
> > I'm going to second Romain about the quotes here. Quotes are normal
> > and expected from the shell,
>
> Of course they are. That's probably part of the POSIX shell specification even.
> But if you've never failed to quote when pasting a URL, you've probably never
> pasted a URL with an ampersand in it.
>
> > and if you can type "vlc" before pasting
> > the URL, I'd think you can also type in the quotes. I play URLs with
> > VLC from the terminal all the time and that's what I do. I'm surprised
> > because that seems to me really unrelated to the misencoding question.
>
> The point is that you have to be careful and correct in what you do with the
> shell, as do apps that invoke the shell or the VLC CLI. In fact, white spaces
> in file names need quotes or escapes too.
>
> (And as François pointed out, MRLs passed via the CLI cannot be fixed up.)
>
> > That said, the GUI offers a dialog that explicitly prompts the user for
> > a URL, so my opinion is that maybe that could be a starting point to
> > know when it can and should fix up the URL encoding.

Hi,

This does not feel related in my opinion too. You can be «careful»
just by having your usual tools quoting the URL you need, just like
you can configure `ls` to put quotes around the file path that needs
it. Likewise, you can configure the terminal emulator to quote, and
the quoting won't even affect VLC started from scripts with variables
and some shell (like zsh).

It seems completely orthogonal, just like you have to know you need
the scheme before the URL. The question is more about UX in the CLI
and not UX of the shell, and I personnally don't care about whether
we need to fix the URL in the CLI since it's more advanced, but maybe
keeping consistency with the other UI would make sense.

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list