At 01:50 PM 11/17/00 , Stan Isaacs wrote:

>I have several qustions about the Bash shell, some of which are probably
>true also of ksh and maybe other shells.  Is there a good, detailed
>description/explaination for bash and why certain decisions have been made?

Stan, this is a poor excuse for a reply but I do mean well ...

>1. Bash re-starts history each time it goes into a subshell.  I think it

If you mean "The BASH history variable is 'reset' when bash begins" then I 
agree, but I think it's a feature, not a bug.  AFAIK, the history gets 
written to the history file when a shell exits.  That file is consulted to 
populate the history variable when bash starts.  So if you're in bash and 
you start bash, your current history will not appear in the new bash 
HISTORY variable (because your initial bash shell hasn't exited).

I don't think there is a "flush" or "sync" command but if you like, you can 
teach folks to always start two bash shells, then to start another shell, 
exit and start bash again.  Seems like you'd REALLY want to have that 
history to do all that...

When you start talking about keeping track of history across different 
windows, you lose me.  This sounds evil.

>2. In the emacs editing mode for command lines, in bash, the tab character

Hmm.  I don't know of different "editing mode[s] for command lines" ...  It 
sounds like you're saying that when you start emacs from bash, it affects 
how the TAB key works.  I know zero about this except that on Intel, ESC 
will also complete lines, maybe you can change the behavior of TAB.  Or 
(don't flame me) use vi (because I do not have this behavior using bash+vi).

>3. In the redhat distribution of Linux, there is something wrong with the
>    prompt variable, PS1, so that it has to be set in /etc/bashrc.

Hmm.  What version of RH?  This is my .bashrc file:

# .bashrc

# User specific aliases and functions

alias ls='ls -FC --color'
alias cls=clear


# Source global definitions
if [ -f /etc/bashrc ]; then
         . /etc/bashrc
fi

And this is my bash environment:

[amead@zeus amead]$ set
BASH=/bin/bash
[...]
PS1=[\u@\h \W]\$
PS2=>
PS4=+
[...]

So, I don't think my (fairly) stock RH 6.2 machines exhibit the behavior 
you are describing.  I do recall a comment in one of the global bash files 
about PS1 not being exported and the author being confused by the 
behavior.  But that was a long time ago.

>  4. The most annoying problem (and I'm pretty sure this in *not* local to
>    just bash, and may be true in every shell for all I know) has to do
>    with pipes.  WHY ARE BOGUS PIPES ALLOWED without some indication of
>    of a syntax error???

Good one.  I hope you figure this out (report it as a bug if it is, as it 
appears).  Maybe there's some good reason why it is this way.

And BTW, as far as I know, the bash included with RH is *the* bash ... so 
you should be seeing this behavior under HP-UX, Solaris, etc.?  But this is 
pure hypothesizing.

Good luck!

-Alan



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to