help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] How to run commands which read keyboard input in a shell buffer?


From: MBR
Subject: [h-e-w] How to run commands which read keyboard input in a shell buffer?
Date: Thu, 07 Oct 2004 12:22:07 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

I'm having trouble running commands which read keyboard input (notably
mysql) from a bash shell in an Emacs shell buffer under Windows.  My
configuration is as follows:

        OS      Windows XP Pro
        Emacs   21.3.1 (Windows port) and 20.7.1 (Windows port)
        Bash    2.05b.0(9)-release (i686-pc-cygwin)
        mysql   Ver 12.22 Distrib 4.0.20a, for Win95/Win98 (i32)

I can run output-only commands (e.g. ls, date, etc.) with no problem.
The command 'mysql' runs fine as long as it doesn't have to read
keyboard input.  E.G. - if I create a file called "commands.sql"
containing the line:

        SHOW DATABASES;

and run:

        mysql -u username -ppassword < commands.sql

it outputs:

        Database
        abc
        gng
        mysql

On the other hand, if I run:

        mysql -u username -ppassword

it doesn't print any prompt.  If I type commands, emacs echoes the
commands, but mysql seems to just hold them in a buffer until I type
"quit", at which point it runs all of them and exits.  And the output
is formatted the way mysql formats output when the input is coming
from a file:

        Database
        abc
        gng
        mysql

If mysql thought its input was coming from the keyboard, it would
format its output as:

        +----------+
        | Database |
        +----------+
        | abc      |
        | gng      |
        | mysql    |
        +----------+

I encounter similar behavior from the command-line version of 'ftp'
which comes with Windows.  It prompts for username, but never prompts
for password.  These commands work fine from an MS or Cygwin command
window, but not in an emacs shell buffer.

Any ideas, suggestions, or solutions would be appreciated.  Thanks.

        Mark Rosenthal
        address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]