[gnu.bash.bug] Questions/bugs.

lamy@ai.utoronto.ca (Jean-Francois Lamy) (06/20/89)

- Will 1.00 come with a user guide?
- Why does 
	if [ "$prompt" == "" ] ; then
  produce "[: too many arguments" if prompt is not defined?
- It would be really nice if .bashrc was invoked on all shells.  Just
  what is the order supposed to be (I can read the source, but I'm looking
  for the design rationale for init file invocation).

Jean-Francois Lamy               lamy@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy
AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4

lamy@ai.utoronto.ca (Jean-Francois Lamy) (06/20/89)

In article <8906200300.AA00751@aurel.caltech.edu> bfox@aurel.caltech.edu writes:
>   - Why does 
>	   if [ "$prompt" == "" ] ; then
>     produce "[: too many arguments" if prompt is not defined?
>
>Because Bash is a Bourne syntax shell, and the `[' command needs to be
>written with only one `=', like:

May I kindly suggest something like "[: '==' illegal operator" (I did say
I was editing my .cshrc :-).  And to say I'm considering switching to bash
because I spend too much time writing sh scripts. Sigh.

Jean-Francois Lamy               lamy@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy
AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4

bfox@AUREL.CALTECH.EDU (Brian Fox) (06/20/89)

   Date: 20 Jun 89 00:51:21 GMT
   From: lamy@neat.ai.toronto.edu  (Jean-Francois Lamy)
   Organization: Department of Computer Science, University of Toronto
   References: <8906192047.AA08456@snark.bellcore.com>
   Sender: bug-bash-request@prep.ai.mit.edu

   - Will 1.00 come with a user guide?

Not one more extensive than what is currently available.  I haven't had
time to write a usable manual yet.

   - Why does 
	   if [ "$prompt" == "" ] ; then
     produce "[: too many arguments" if prompt is not defined?

Because Bash is a Bourne syntax shell, and the `[' command needs to be
written with only one `=', like:

	if [ "$PS1" = "" ]; then

   - It would be really nice if .bashrc was invoked on all shells.

~/.bashrc is sourced in all interactive shells.  Presumably, subshells,
those created with "( command )", or "shell-script", have already had
~/.bashrc sourced at a higher level.

     Just what is the order supposed to be (I can read the source, but
     I'm looking for the design rationale for init file invocation).

~/.bash_profile is sourced for each login shell.  ~/.bashrc is sourced
for each interactive shell.  If you wish to have the same commands
executed for both login and interactive startups, then explicitly
"source ~/.bashrc" in your ~/.bash_profile.  This allows you to *not*
have the same commadn executed for both login and interactive startups.

~/.bash_logout is sourced when exiting a logout shell.

Brian Fox