* pasting several lines into the shell
@ 2013-07-31 8:55 Denis Excoffier
2013-07-31 9:59 ` Corinna Vinschen
0 siblings, 1 reply; 3+ messages in thread
From: Denis Excoffier @ 2013-07-31 8:55 UTC (permalink / raw)
To: cygwin
Hello,
Starting with the 20130726 snapshot, i have problems with the
clipboard.
Not the clipboard itself, but the capability to paste into the shell
in order to execute a command containing several lines (or several
commands).
% cat copypaste
/bin/cp \
./copypaste \
/tmp
% putclip < copypaste
% getclip
/bin/cp \
./copypaste \
/tmp
%
At this point, if i paste (middle button on my mouse) this text
(3 lines) inside a shell (can be tcsh or bash) in an xterm, sometimes
it works and the cp command is executed. But very often i get:
------------------------------------------------------------------------
%
./copypaste \
? /bin/cp \
?
/bin/cp: cannot create regular file `/bin/cp': File exists
%
% / t/mtp? m
/: No match.
% p
------------------------------------------------------------------------
After that, if i use a simple cat, enter a Return, then EOF, i get
------------------------------------------------------------------------
% cat
p mn/cp \
%
------------------------------------------------------------------------
If i paste the lines inside the vi editor, no problem.
If i paste only one line, or one line at a time, no problem.
I also tried with mintty (i'm not familiar with it). I get:
---------------------
% /bin/cp \
./copypaste \
? ? / t/mtpm
/bin/cp: accessing `t/mtpm': Not a directory
% p
---------------------
that is more or less the same.
I'm using XP SP3. I tried with CYGWIN=wincmdln set or not set, with
no change. Snapshot dated 20130723 is fine.
Regards,
Denis Excoffier.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pasting several lines into the shell
2013-07-31 8:55 pasting several lines into the shell Denis Excoffier
@ 2013-07-31 9:59 ` Corinna Vinschen
2013-07-31 19:36 ` pasting several lines into the shell -- change from bash3->bash4 Linda Walsh
0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2013-07-31 9:59 UTC (permalink / raw)
To: cygwin
On Jul 31 08:37, Denis Excoffier wrote:
> Hello,
>
> Starting with the 20130726 snapshot, i have problems with the
> clipboard.
> Not the clipboard itself, but the capability to paste into the shell
> in order to execute a command containing several lines (or several
> commands).
>
> % cat copypaste
> /bin/cp \
> ./copypaste \
> /tmp
> % putclip < copypaste
> % getclip
> /bin/cp \
> ./copypaste \
> /tmp
> %
>
> At this point, if i paste (middle button on my mouse) this text
> (3 lines) inside a shell (can be tcsh or bash) in an xterm, sometimes
> it works and the cp command is executed. But very often i get:
>
> ------------------------------------------------------------------------
> %
> ./copypaste \
> ? /bin/cp \
> ?
> /bin/cp: cannot create regular file `/bin/cp': File exists
> %
> % / t/mtp? m
> /: No match.
> % p
I can reproduce the effect, and it looks like this is the result of
an accidental checkin. Thanks for the hint.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pasting several lines into the shell -- change from bash3->bash4
2013-07-31 9:59 ` Corinna Vinschen
@ 2013-07-31 19:36 ` Linda Walsh
0 siblings, 0 replies; 3+ messages in thread
From: Linda Walsh @ 2013-07-31 19:36 UTC (permalink / raw)
To: cygwin
Corinna Vinschen wrote:
>
> I can reproduce the effect, and it looks like this is the result of
> an accidental checkin. Thanks for the hint.
----
???
Is it?
AFAIK, you can no longer safely paste code into the bash command line
because the TAB char is the default completion character.
If your code is indented w/tabs (concept?!), bash tries to perform
auto-completion where it then rewaits for input depending on your
completion settings.
If you have more than a screen's worth of completions, you can
get a question:
ls
Display all 660 possibilities? (y or n)
--
At that point all tabs are swallowed, and the first
character of your then clause gets swallowed.
This changed from bash3 where
"no_empty_cmd_completion" used to effectively be
"no_empty_line_completion".
So if you had that set, tabs on an empty line weren't taken
as completion chars, but expanded as tabs.
----
I complained about the feature loss but most bash users
don't paste code into their shells. If you are shell
user, you aren't expected to use a GUI editor like gvim.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-31 19:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31 8:55 pasting several lines into the shell Denis Excoffier
2013-07-31 9:59 ` Corinna Vinschen
2013-07-31 19:36 ` pasting several lines into the shell -- change from bash3->bash4 Linda Walsh
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).