[gnu.bash.bug] && causing bash to dump core, varia

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

a) a .bashrc that contains

   if [ "$PS1" != "" && $SHLVL -gt 1 ]
   then
	   echo bah
   fi

   will cause bash to dump core; said code appears to produce an error message
   (cryptic as it may be) as it should when the shell is run interactively

b) [ error messages for csh operators used by mistake should be fixed;
   with the large population of tcsh users you can expect to see migrating,
   this will count as a large class of errors while people rewire their
   brains.  I'd really like to see "==": illegal operator, "&&": dumping
   core, and other informative messages.

c) Can the &#^*%&! insertion of a * at the beginning of the prompt when
   a line is edited be turned off?  it appears as well that only the
   prompt is shifted as well, which is disconcerting if not wrong.

d) there should be a wholesale way to get emacs behaviour for cut and
   paste (NUL sets mark, ^W cuts, ^Y pastes).  Few users I know that use
   emacs regularly rely on the pre-tcsh behaviour.

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/29/89)

lamy@ai.utoronto.ca (Jean-Francois Lamy) writes:
>a) a .bashrc that contains
>   if [ "$PS1" != "" && $SHLVL -gt 1 ]
>   then
>	   echo bah
>   fi
>   will cause bash to dump core; said code appears to produce an error message
>   (cryptic as it may be) as it should when the shell is run interactively

This is on Sun 3 and Sun 4, SunOS 4.0.1.  I can dig up the debugger should the
bug prove hard to reproduce elsewhere.

paul@saqqara.cis.ohio-state.edu (Paul Placeway) (07/03/89)

Jean-Francois Lamy writes:
   d) there should be a wholesale way to get emacs behaviour for cut and
      paste (NUL sets mark, ^W cuts, ^Y pastes).  Few users I know that use
      emacs regularly rely on the pre-tcsh behaviour.

What an interesting comment.  First off, I didn't change squat about
bindings when I added the line wraping stuff.  Second, tcsh _does_ do
NUL sets mark, ^W cuts, ^Y pastes; vis:

   morganucodon ~ 6 -> bind ^Y
    ^Y             yank
   morganucodon ~ 7 -> bind ^W
    ^W             kill-region
   morganucodon ~ 8 -> bind ^@
    ^@             set-mark-command
   morganucodon ~ 9 -> echo $version
   tcsh 5.12 (Ohio State) 2/11/89 Patch level 1


On the other hand, I agree that the *s everywhere in the prompt is a
mis-feature.  Perhaps a shell variable to turn it off?

		-- Paul Placeway

pinard@EDDIE.MIT.EDU (Francois Pinard) (07/09/89)

   From: lamy@ai.utoronto.ca (Jean-Francois Lamy)
   Newsgroups: gnu.bash.bug
   Date: 29 Jun 89 14:08:59 GMT

Salut, cher confre`re :-)

   c) Can the &#^*%&! insertion of a * at the beginning of the prompt
      when a line is edited be turned off?  it appears as well that
      only the prompt is shifted as well, which is disconcerting if
      not wrong.

What's wrong with this?  bash is telling you: there is now an
undo-list for this command.  This information might be useful,
especially when you move back in the command history.

I'm sure that the author had to seek a way to display this
information.  What would you have choosen instead?  Effectively, I
have been ``disconcerted'' when I saw this * for the first time, but
only disconcerted by a subtle wave of pleasure (:-).

-- 
Franc,ois Pinard                                    pinard@iro.umontreal.ca
(514) 588-4656           ``Vivement GNU!''          ...!uunet!iros1!pinard

andrewt@watsnew.waterloo.edu (Andrew Thomas) (07/10/89)

In article <8907091203.AA06418@ouareau.iro.umontreal.CA> mcgill-vision!iros1!pinard@EDDIE.MIT.EDU (Francois Pinard) writes:
   Salut, cher confre`re :-)

      c) Can the &#^*%&! insertion of a * at the beginning of the prompt
	 when a line is edited be turned off?  it appears as well that
	 only the prompt is shifted as well, which is disconcerting if
	 not wrong.

   What's wrong with this?  bash is telling you: there is now an
   undo-list for this command.  This information might be useful,
   especially when you move back in the command history.

I have to agree that the * at the beginning is a BAD THING.  This can
be very annoying at low baud rates, say 1200.  This also is quite
frustrating when you use the universal argument on a command.  In
general, I think that any key sequence that modifies the prompt,
including universal argument, the little *, back and forward search,
should all be optional.  Preferably, they should be removable
independently of one another (I would like to be able to turn off the
* and the arg:, buy keep reverse search sometimes).  Would this be
difficuly to implement?
--

Andrew Thomas
andrewt@watsnew.waterloo.edu	Systems Design Eng.	University of Waterloo
"If a million people do a stupid thing, it's still a stupid thing." - Opus