This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: Help required - Connecting bash to an editor using anonymous pipes
- To: <gnu-win32 at cygnus dot com>
- Subject: RE: Help required - Connecting bash to an editor using anonymous pipes
- From: "Leo Mauro" <lmauro at scientist dot com>
- Date: Fri, 2 Oct 1998 12:19:41 -0400
On Thursday, October 01, 1998 03:06 PM, Jonathan Naughton-Green wrote:
[SNIP]
> I am trying to connect the Cygnus environment to a MicroEmacs
> editor to run a Cygnus shell in one of the buffer windows. I can do
> this with the "command.com" to give me DOS prompt in a buffer,
> however applying the same technique to "bash" it does not quite
> work.
>
> The window comes up. I can send characters to the shell and I
> can execute commands and see the results in the buffer BUT the
>bash prompt and the haracters that I type into the buffer are not
> visible.
[SNIP]
Bash (and every other UNIX shell I know) only produces its prompt
and echoes commands when running in "interactive" mode. When
bash detects its stdin is not a terminal, it runs in non-interactive
(shell-script) mode where it just executes the commands with no
extra frills. This is the same thing that happens when you run
bash < shell-command-file
To force bash to run "interactive" even when stdin is not a terminal,
use the -i flag. Try, for instance,
bash -i < shell-command-file
and note the difference.
Leo Mauro
Principal Scientist
TeleSys Technologies, Inc.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".