Is there a way to define aliases so that shell-command
can recognize them? shell
recognizes those defined in .emacs.d/init_bash.sh; is it possible to make shell-command
aware of these also?
views:
46answers:
1
+1
A:
Read in simple.el
in shell-command
code :
;; We do not use -f for csh; we will not support broken use of
;; .cshrcs. Even the BSD csh manual says to use
;; "if ($?prompt) exit" before things which are not useful
;; non-interactively. Besides, if someone wants their other
;; aliases for shell commands then they can still have them.
(call-process shell-file-name nil
(if error-file
(list t error-file)
t)
nil shell-command-switch command)
The nil
after shell-file-name
indicates that emacs don't send an input file to the process. Thus, you should check the value of shell-file-name
to determine if it's a process that read implicit .rc files.
Jérôme Radix
2010-09-06 10:08:35
My shell-file-name is "bin/bash" but I'm still not sure how to interpret these instructions...?
Stephen
2010-09-06 11:25:37
man bash to know exactly what is done when bash process starts.
Jérôme Radix
2010-09-06 15:09:34
Thanks - I created a link file so that /bin/bash can use it.
Stephen
2010-09-09 13:42:01