unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: "Enric Rodríguez Carbonell" <erodri@cs.upc.edu>
Cc: 36103@debbugs.gnu.org
Subject: bug#36103: 24.5; Blank spaces around parentheses in history expansion in shell mode
Date: Wed, 05 Jun 2019 21:02:33 -0400	[thread overview]
Message-ID: <87lfyf34ra.fsf@gmail.com> (raw)
In-Reply-To: <5fb3dec3-3c48-9a49-cc50-8f68981978af@cs.upc.edu> ("Enric Rodríguez Carbonell"'s message of "Wed, 5 Jun 2019 13:03:49 +0200")

merge 36103 8027
quit

Enric Rodríguez Carbonell <erodri@cs.upc.edu> writes:

> $ for file in $(ls); do echo $file; done

> $ !for

> M-x comint-replace-by-expanded-history

> $ for file in $ ( ls ) ; do echo $file ; done
>
> The blank spaces around the parentheses should not be there.
> Because of these blank spaces, this command cannot be executed,
> as "$ (" should be "$(".

Yes, the problem is in comint-arguments which attempts to parse a shell
line into separate arguments, using just a bunch of regexps.  This is
doomed to failure I think.  But the alternative would be a full blown
shell parser, so I don't know how feasible it will be to fix this bug.
It's been with us a long time.






  reply	other threads:[~2019-06-06  1:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 11:03 bug#36103: 24.5; Blank spaces around parentheses in history expansion in shell mode Enric Rodríguez Carbonell
2019-06-06  1:02 ` Noam Postavsky [this message]
2023-10-03 10:54 ` Mauro Aranda
2023-10-07 13:39   ` Mauro Aranda

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=87lfyf34ra.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=36103@debbugs.gnu.org \
    --cc=erodri@cs.upc.edu \
    /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).