Subject: bash shell inside emacs
From: [email-masked] (David Zaleta)

16 Jan 1999 08:32:57 -0800
Message-ID: <[email-masked]>
To: [email-masked]

I just installed cygwin b20 and nt emacs 20.3.1....

I set up a simple .bashrc file:

export PS1="[\h] \w\n% "
PATH=.:/cygnus/cygwin-b20/H-i586-cygwin32/bin:/bin:/jdk1.1.7B/bin:/Windows:/Windows/Command:/:/Dos
export CLASSPATH=".;C:\jdk1.1.7B\lib\classes.zip;C:\jdk1.1.7B\lib;C:\Program Files\AgentBuilderLite1.0.1\lib;C:\Program Files\AgentBuilderLite1.0.1\lib\agentBuilder.jar;C:\Program Files\AgentBuilder1.0.1\lib\swingall.jar"

I also defined in my autoexec.bat file a path that would see the bash.exe

SET PATH='C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\cygnus\cygwin-b20\H-i586-cygwin32\bin;C:\bin;C:\JDK1.1.7b\BIN'

One problem that I am now experiencing is that when I
start up the bash shell by double clicking on a shortcut
the first line gives me something like:

BASH.EXE: skip: command not found

However, everything seems to work fine so this is not a real show stopper..

What I would really like to do is get the bash shell into nt emacs...

Well, I have tried 3 different "recommended" ways to make this work,
based on different FAQs and have gotten different results and none of
them quite right:

From the NT Emacs FAQ I used:

(defun my-shell-setup ()
         "For bash (cygwin 18) under Emacs 20"
         (setq comint-scroll-show-maximum-output 'this)
         (setq comint-completion-addsuffix t)
        (setq comint-process-echoes t)
         (setq comint-eol-on-send t)
         (setq w32-quote-process-args ?\")
         (make-variable-buffer-local 'comint-completion-addsuffix))

       (setq shell-mode-hook 'my-shell-setup)

       (setq process-coding-system-alist (cons '("bash" . raw-text-unix)
                                               process-coding-system-alist))

When I use the above in my .emacs file I get a prompt that looks like:

[\h] \w\n%

In addition, When I enter an ls command the ls is removed and replaced
by the first file...so I go from 

[\h] \w\n% ls

to

[\h] \w\n% Makefile
javaStuff
nipt
[\h] \w\n% 

I then removed teh above from my .emacs file and 
replaced it with the suggestion from the cygwin faq:

(load "comint")
(fset 'original-comint-exec-1 (symbol-function 'comint-exec-1))
(defun comint-exec-1 (name buffer command switches)
  (let ((binary-process-input t)
        (binary-process-output nil))
    (original-comint-exec-1 name buffer command switches)))

This version and the next are the best one that I have tried although
in both cases you can see my prompt is completely messed up again...

[\h] \w\n% ls
Makefile
javaStuff
nipt
[\h] \w\n% 

The other option that I got was a pointer from the NT Emacs FAQ
from Jonathan Payne

    (progn
      (using-unix-filesystems t)
      (setq shell-file-name "sh")
      (setq explicit-shell-file-name shell-file-name)
      (setq explicit-sh-args '("-login" "-i"))
      (setq shell-command-switch "-c")
      (setq archive-zip-use-pkzip nil)
      (setenv "SHELL" shell-file-name)
      (setq win32-quote-process-args t)
      (setq win32-enable-italics t)
      (setq comint-process-echoes nil)
      (menu-bar-mode 0))

and resulted in the same output as in the previous case??

I assume since others have gotten it to work it must me something
to do with my .bashrc or the initial settings in my autoexec.bat...

anyone have any ideas??

thanks

dave z
 
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".