Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cygwin -- getting *shell* to parse pipes & other unix cmd-line stuff?

66 views
Skip to first unread message

David Combs

unread,
Oct 3, 2012, 12:39:30 AM10/3/12
to
On XP, I've been using cygwin and emacs for some time now.

One thing I have (incorrectly?) noted:

If I do START --> run --> cmd-window, and get that
little white-on-black blackboard-like window, yes
I can run sh, etc, and it all seems to work, even
complicated command-lines.

A problem with that (horrible) method is that:

a: there's no way to "paste" a long command or anything
else into that window -- you have to type everything
in *by hand*. So lots of typos you wouldn't have
if you could just cut from somewhere and pasted
into that blackboard-like window.

b: no way to get it to go full-screen.

c: and so on.

But yes, you can at least run a unix command-line,
pipes, `expand me exprs`, etc, all that good
stuff.

----

What would be really NICE would to be able to do
that from *shell*.

But I don't seem able to run the cygwin "sh" or
"tcsh" in *shell*. I can run cygwin stuff ok,
but not in complicated unix-like commands; it works
for me only if I do it one thing at a time, via
simple commands.

Question: is there a way to run complex command-lines
in *shell*?

If so, how?


thanks!

David

Doug Lewan

unread,
Oct 3, 2012, 7:40:04 AM10/3/12
to David Combs, help-gn...@gnu.org
In both CYGWIN terminal and rxvt terminal I find that the middle mouse button works to paste.

I hope this helps.

,Doug

Eli Zaretskii

unread,
Oct 3, 2012, 1:07:36 PM10/3/12
to help-gn...@gnu.org
> From: dkc...@panix.com (David Combs)
> Date: 3 Oct 2012 00:39:30 -0400
>
> On XP, I've been using cygwin and emacs for some time now.
>
> One thing I have (incorrectly?) noted:
>
> If I do START --> run --> cmd-window, and get that
> little white-on-black blackboard-like window, yes
> I can run sh, etc, and it all seems to work, even
> complicated command-lines.
>
> A problem with that (horrible) method is that:
>
> a: there's no way to "paste" a long command or anything
> else into that window -- you have to type everything
> in *by hand*. So lots of typos you wouldn't have
> if you could just cut from somewhere and pasted
> into that blackboard-like window.

Right-click the title bar of the cmd window and select Edit->Paste.
That's it!

> b: no way to get it to go full-screen.

Try Alt-Enter.

> c: and so on.

What else?

David Combs

unread,
Oct 12, 2012, 5:11:33 PM10/12/12
to
In article <mailman.10228.1349284...@gnu.org>,
Thanks!

OK, the edit--> paste works.

The alt-enter expands to full screen, but like a magnifying
glass. Same number of lines. Of course what you'd like
is a full 60 or so lines.


The enter--> menu has a greyed-out "copy" -- seems to be
now way to "blue out" (via sweeping the mouse) an area
within that window *to* "copy". What's the trick for
this one?


Thanks much!

Question: your use here is separate from using emacs,
yes?


David

David Combs

unread,
Oct 12, 2012, 5:16:11 PM10/12/12
to
In article <mailman.10194.1349264...@gnu.org>,
Doug Lewan <do...@shubertticketing.com> wrote:
>In both CYGWIN terminal and rxvt terminal I find that the middle mouse button works to paste.
>
>I hope this helps.
>
>,Doug
>

What are CYGWINI and rxvt terminals, where are they,
and how to run them?

Here is an M-x occur of term in my cygwin/bin (is yours different?):

4 matches for "term" in buffer: bin
524: -rw-rw-rw- 1 DKC root 2167 2009-02-18 koi8rxterm
968: -rwxrwxrwx 1 DKC root 4608 2008-11-06 ppmtoterm.exe
1216: -rw-rw-rw- 1 DKC root 2092 2009-02-18 uxterm
1276: -rwxrwxrwx 1 DKC root 373760 2009-02-18 xterm.exe

Thanks,

David

David Combs

unread,
Oct 12, 2012, 5:47:19 PM10/12/12
to
Here's what I *really* want to do:

Use emacs, *shell*, and within that (*shell*),
be able to pretend that I'm on a REAL computer,
and use the full unix/linix command-line parsing stuff,
eg "ls `cat foo.nam`", parens and subjobs, and >>EOF ... EOF,
all that stuff.

All without having to ever resort to the xp "cmd" window --
do it all straight out of the nice full-screen emacs
*shell* display.

Emacs already gives me the fiction that I'm on eg a
sun or linux, but where that falls down is in
*shell* typing in command-lines.


---

I've also tried, in *shell*, running the cygwin
tcsh, but with no success. (I forget the difficulty
I had, but it was complete, that difficulty.)


---

Something I noticed some time (years?) ago (still true?) was
that cygwin had two versions, new and old (or standard?),
but that the new one's bin had far fewer programs
than did the old one.

My version of cygwin is Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


---------------------- OOPS: CURRENT AVAILABLE CYGWINI IS 1.7:


Just looked at http://cygwin.com/, saw that 1.7 is the
newest thing (I guess mine is pretty ancient), but that
going to it requires lots of changes. Hmmm.

(Mine is 1.5)


Has everyone switched to 1.7, or are a lots of (smart)
people still using 1.5?

Sure wouldn't want to try to install the new one and
screw up and thus also lose the one I have!

Question: would 1.7 make my *shell* experience
a lot better, given the problems I've listed
above?


THANKS!

David



Eli Zaretskii

unread,
Oct 13, 2012, 3:02:01 AM10/13/12
to help-gn...@gnu.org
> From: dkc...@panix.com (David Combs)
> Date: Fri, 12 Oct 2012 21:47:19 +0000 (UTC)
>
> Here's what I *really* want to do:
>
> Use emacs, *shell*, and within that (*shell*),
> be able to pretend that I'm on a REAL computer,
> and use the full unix/linix command-line parsing stuff,
> eg "ls `cat foo.nam`", parens and subjobs, and >>EOF ... EOF,
> all that stuff.
>
> All without having to ever resort to the xp "cmd" window --
> do it all straight out of the nice full-screen emacs
> *shell* display.

Did you try "M-x eshell RET"?

Eli Zaretskii

unread,
Oct 13, 2012, 3:29:23 AM10/13/12
to help-gn...@gnu.org
> From: dkc...@panix.com (David Combs)
> Date: Fri, 12 Oct 2012 21:11:33 +0000 (UTC)
>
> OK, the edit--> paste works.
>
> The alt-enter expands to full screen, but like a magnifying
> glass. Same number of lines. Of course what you'd like
> is a full 60 or so lines.

I don't think it supports an arbitrary number of lines, only those
supported by the VGA mode of your video card. Try setting the cmd
window to 50 lines, and then I'd expect Alt-Enter to give you a
50-line full-screen display.

> The enter--> menu has a greyed-out "copy" -- seems to be
> now way to "blue out" (via sweeping the mouse) an area
> within that window *to* "copy". What's the trick for
> this one?

Edit->Mark, then mark with the mouse.

> Question: your use here is separate from using emacs,
> yes?

The above has nothing to do with Emacs at all, it's all basic Windows
trickery.

David Combs

unread,
Oct 13, 2012, 10:18:20 AM10/13/12
to
In article <mailman.10880.1350113...@gnu.org>,
Eli Zaretskii <el...@gnu.org> wrote:
>> From: dkc...@panix.com (David Combs)
>> Date: Fri, 12 Oct 2012 21:11:33 +0000 (UTC)
>>
>> OK, the edit--> paste works.
>>
>> The alt-enter expands to full screen, but like a magnifying
>> glass. Same number of lines. Of course what you'd like
>> is a full 60 or so lines.
>
>I don't think it supports an arbitrary number of lines, only those
>supported by the VGA mode of your video card. Try setting the cmd
>window to 50 lines,

Thanks, but How?

David

Eli Zaretskii

unread,
Oct 13, 2012, 11:34:01 AM10/13/12
to help-gn...@gnu.org
> From: dkc...@panix.com (David Combs)
> Date: Sat, 13 Oct 2012 14:18:20 +0000 (UTC)
Right-click on the window title bar, select Properties and under
"Layout" set the "Height" value in the "Window Size" group.

Oleksandr Gavenko

unread,
Oct 28, 2012, 7:03:38 AM10/28/12
to help-gn...@gnu.org
On 2012-10-03, Eli Zaretskii wrote:

> Right-click the title bar of the cmd window and select Edit->Paste.
> That's it!

I recommend instead use mintty from Cygwin (which replacement for rxvt and
standard Cygwin terminal emulator).

It allow paste by Shift+Inc and copy by mouse selection (whole line for double
click).

--
Best regards!


Eli Zaretskii

unread,
Oct 28, 2012, 12:37:15 PM10/28/12
to help-gn...@gnu.org
> From: Oleksandr Gavenko <gave...@gmail.com>
> Date: Sun, 28 Oct 2012 13:03:38 +0200
So does the cmd window, if you set the QuickEdit option. (Well, no
Shift-Insert is supported, but right-clicking the mouse to paste is no
less convenient.)

Oleksandr Gavenko

unread,
Oct 28, 2012, 2:56:29 PM10/28/12
to help-gn...@gnu.org
Ok.

But most useful things from mintty is custom fonts and switchable background
colour (I definitely like black on white)...

Anyone can get another goodies, just read:

http://code.google.com/p/mintty/
Xterm-compatible terminal emulation
Comprehensive character encoding support, including UTF-8
256 colours

My ~/.minttyrc:

; -*- mode: conf -*-

ForegroundColour=0,0,0
BackgroundColour=255,255,255
CursorColour=165,42,42

; Block, Underscore, Line.
CursorType=Block
CursorBlinks=yes

; Off, Low, Medium, High, Glass (>= Vista only).
Transparency=Low
OpaqueWhenFocused=yes

; 'Lucida Console' and 'Courier New' are the best fixed width font under Windows.
Font=Courier New
BoldAsFont=yes
FontHeight=10
AllowBlinking=no

FontSmoothing=None

BackspaceSendsBS=no
; Enable Ctrl+Ins and Shift+Ins.
ClipShortcuts=yes
; Disable Windows Alt+Space and Alt+Enter shortcuts.
WindowShortcuts=no
; Disable Ctrl+TAB and Ctrl+Shift+TAB shortcuts for use in screen(1).
SwitchShortcuts=no
; Enable font zooming shortcuts Ctrl+plus/minus/zero.
ZoomShortcuts=yes
; Shift, Ctrl, Alt, Off.
ScrollMod=Shift

CopyAsRTF=yes

; Use mouse copy on select like in X window.
CopyOnSelect=yes
ClicksPlaceCursor=no
RightClickAction=menu

BellSound=no

Term=xterm-256color
Answerback=

Columns=120
Rows=40
Scrollbar=right
ScrollbackLines=10000
ConfirmExit=yes

--
Best regards!


Eli Zaretskii

unread,
Oct 28, 2012, 3:28:43 PM10/28/12
to help-gn...@gnu.org
> From: Oleksandr Gavenko <gave...@gmail.com>
> Date: Sun, 28 Oct 2012 20:56:29 +0200
>
> But most useful things from mintty is custom fonts and switchable background
> colour (I definitely like black on white)...

Likewise with the cmd window.

Really, can we please stop these plugs? The OP asked a specific
question, and it wasn't about mintty.

0 new messages