From: Michael Albinus <michael.albinus@gmx.de>
To: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Cc: 16582@debbugs.gnu.org
Subject: bug#16582: Bug: tramp shell command doesn't read stdin
Date: Wed, 29 Jan 2014 15:35:45 +0100 [thread overview]
Message-ID: <87k3di97pa.fsf@gmx.de> (raw)
In-Reply-To: <CAD_mUW0ziFEtUcgg6sQE=T0CAW1pfJNfMew+syVn9wHAfz_1mQ@mail.gmail.com> (Sylvain Chouleur's message of "Tue, 28 Jan 2014 23:40:06 +0100")
Sylvain Chouleur <sylvain.chouleur@gmail.com> writes:
> Hi,
Hi Sylvain,
> I don't understand what was this problem of long command lines
> (Bug#16045): I've tried to execute shell comands with huge command
> lines and all were successfull.
> To keep the approach of splitting the lines, I would suggest something
> like that:
> exec /bin/bash -c "
> commands
> on
> multiple lines
> "
>
> But this needs to backslash all shell specific characters, and I don't
> know if there is really benefit compared to the original solution
> (before <<EOF)
>
> What do you think?
The use case which has triggered the Bug#16045 is rgrep. Run `M-x rgrep'
on a remote directory. This issues a command like this (in one line!):
find . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path
\*/MCVS -o -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path
\*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \)
-prune -o \! -type d \( -name .\#\* -o -name \*.o -o -name \*\~ -o -name
\*.bin -o -name \*.lbin -o -name \*.so -o -name \*.a -o -name \*.ln -o
-name \*.blg -o -name \*.bbl -o -name \*.elc -o -name \*.lof -o -name
\*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -o -name \*.tfm
-o -name \*.class -o -name \*.fas -o -name \*.lib -o -name \*.mem -o
-name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o
-name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name
\*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl
-o -name \*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name
\*.wx64fsl -o -name \*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o
-name \*.fsl -o -name \*.dxl -o -name \*.lo -o -name \*.la -o -name
\*.gmo -o -name \*.mo -o -name \*.toc -o -name \*.aux -o -name \*.cp -o
-name \*.fn -o -name \*.ky -o -name \*.pg -o -name \*.tp -o -name \*.vr
-o -name \*.cps -o -name \*.fns -o -name \*.kys -o -name \*.pgs -o -name
\*.tps -o -name \*.vrs -o -name \*.pyc -o -name \*.pyo \) -prune -o
-type f \( -name \* -o -name .\* \) -exec grep -i -nH -e emacs {} +
It didn't work with the previous Tramp command invocation, I could
reproduce it locally. The changed command invocation, using a
here-document, allows to execute the command.
I understand your problem, and I would like to keep the previous command
invocation method, but I don't know how to do. Breaking the command into
several lines, escaped with "\\\n", doesn't work, because finally the
shell interpreter removes those line breaks, and it is confronted with
the long line, again.
If somebody has a better idea, I would be happy to implement.
Best regards, Michael.
PS: Sorry for the late reply. I've seen your message on the Tramp ML as
well, but I'm too busy just now for answering in short time.
next prev parent reply other threads:[~2014-01-29 14:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 22:40 bug#16582: Bug: tramp shell command doesn't read stdin Sylvain Chouleur
2014-01-29 14:35 ` Michael Albinus [this message]
2014-02-02 14:27 ` Sylvain Chouleur
2014-02-03 12:53 ` Michael Albinus
2014-02-04 22:53 ` Sylvain Chouleur
2014-02-05 8:29 ` Michael Albinus
2014-02-05 9:44 ` Sylvain Chouleur
2014-02-05 10:27 ` Michael Albinus
2014-02-05 12:27 ` Sylvain Chouleur
2014-02-05 14:04 ` Michael Albinus
2014-02-05 14:44 ` Sylvain Chouleur
2014-02-05 15:33 ` Michael Albinus
2014-02-05 21:01 ` Sylvain Chouleur
2014-02-06 8:52 ` 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=87k3di97pa.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=16582@debbugs.gnu.org \
--cc=sylvain.chouleur@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).