unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 65431@debbugs.gnu.org
Subject: bug#65431: 30.0.50; pcomplete should not quote everything in a file name
Date: Mon, 21 Aug 2023 21:09:35 +0200	[thread overview]
Message-ID: <87350ci55c.fsf@gmx.de> (raw)
In-Reply-To: <a90bed9d-53e7-fbd6-cc6d-53f4e715c49c@gmail.com> (Jim Porter's message of "Mon, 21 Aug 2023 10:51:27 -0700")

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

> I believe the problem is actually the *left* square bracket. Both
> square brackets should be quoted; otherwise, [...] gets treated as a
> glob. I'm a little surprised that the tab-completion even works here;
> I guess it's more forgiving than it should be. However, if you type
> "cd /\[ssh/loca TAB", it should work correctly.

Indeed, I didn't think about glob chars. Quoting them works fine.

> I see a couple of options:
>
> 1) Could Pcomplete fix the unquoted "[" for us? *Should* it?
>
> 2) I see that Pcomplete fails if you try to quote the whole file name,
> like "cd '/[ssh:loca TAB". Maybe we should fix that. Then users could
> rely on quoting with ' or " to escape the special glob characters
> instead.

Since glob chars are an eshell feature, I believe we could leave it as
it is. It is even documented in the eshell manual. If we add the square
brackets to the speacial characters of remote file names, we could close
the bug I believe. Something like

--8<---------------cut here---------------start------------->8---
This is needed especially for file names with special characters like
pipe (‘|’) or square brackets ('[' or ']'), which could be part of
remote file names.
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.





  reply	other threads:[~2023-08-21 19:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21 14:10 bug#65431: 30.0.50; pcomplete should not quote everything in a file name Michael Albinus
2023-08-21 17:51 ` Jim Porter
2023-08-21 19:09   ` Michael Albinus [this message]
2023-08-27 11:23     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87350ci55c.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=65431@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).