unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Shell not executing loading aliases
@ 2011-04-07 23:21 David M. Karr
  0 siblings, 0 replies; only message in thread
From: David M. Karr @ 2011-04-07 23:21 UTC (permalink / raw)
  To: help-gnu-emacs

I'm using GNU Emacs 23.3.1 with Cygwin 1.7.8 on Win7SP1.

I start Emacs from a desktop shortcut with the following command line:

     C:\cygwin\bin\run.exe -p /usr/bin bash -l -i -c "emacs -display 
127.0.0.1:0.0"

After Emacs starts up, I execute "shell" which display a shell window 
showing my desired PS1 prompt.  I also echo $PATH, and it appears to be 
the value I set in my $HOME/.bashrc.

However, at the end of my .bashrc I set a couple of shell aliases, but 
when I type "alias" at this point, it shows nothing.  One of the aliases 
was for "ls" to give it the "-aF" options, and when I execute "ls", it 
shows it doesn't have those options set.

I can then execute "bash" and then "ls", and I see it has now set my 
aliases.

Why doesn't the initial Bash shell have my aliases?

I tried creating a $HOME/.emacs_bash script, doing either ". 
$HOME/.bashrc" or "source $HOME/.bashrc", but it never tried to execute 
the script.  I even used SysInternals ProcMon to verify it never tried 
to execute it.

The relevant portion of my shell-mode-hook is as follows:

(defun my-shell-mode-hook ()
   (add-hook 'comint-output-filter-functions
         'comint-watch-for-password-prompt nil t)
   (setq explicit-shell-file-name "bash.exe")
   (setq shell-file-name explicit-shell-file-name)
   (ansi-color-for-comint-mode-on)
   (setq shell-prompt-pattern "^\[[A-z0-9]+:[A-z0-9/]+\] ")
   )




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-07 23:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07 23:21 Shell not executing loading aliases David M. Karr

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).