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

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

Re: Autogen in Emacs Shell


From: Alexander Shukaev
Subject: Re: Autogen in Emacs Shell
Date: Fri, 1 May 2015 21:46:53 +0200

>
> > Finally, do you have any comments on the issue with
> "~/emacs.d/init_bash.sh"
> > that I've described before. Let me introduce another test case briefly.
> Put
> >
> > # Hello, World!
> > # Hello, World!
> > # Hello, World!
> >
> > into "~/emacs.d/init_bash.sh".
> >
> > Then start 'bash' from Emacs. Here is what I see:
> >
> > 2015.05.01 Friday 20:30:46
> > Haroogan@G75VW:~
> > $
> > 2015.05.01 Friday 20:30:46
> > Haroogan@G75VW:~
> > $
> > 2015.05.01 Friday 20:30:46
> > Haroogan@G75VW:~
> > $
> > 2015.05.01 Friday 20:30:46
> > Haroogan@G75VW:~
> > $
> >
> > Those 3 newlines were really typed into the shell. How come?
>
> Now that we know that the contents of this file are sent as an input
> string to the shell when it starts, what did you expect?  The shell
> gets 3 lines, each one of which is a comment, so it does nothing, but
> displays the newline.  What is surprising here?
>

​
The point then is that this file actually does not serve its purpose.  It
does not behave as, for example, ".bashrc" does.  In other words, one
cannot simply write multiline shell code in there without experiencing this
ugly side effect.  I understand the problem here, but why not, for
instance, concatenate lines with " ; "
​​
​in order to make one line out of them​
before sending them to 'bash'?
​


reply via email to

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