[gnu.bash.bug] 1.03 comments

jeff1@garfield.mun.edu (Jeff Sparkes) (09/08/89)

A lot of this comes from enhancing vi mode. (coming soon)

rl_insert () is overzealous in setting the rl_display_fixed flag.  I
did rl_insert_text followed by rl_insert, and got a bunch of spaces.
rl_insert added the single char at the end without updating anything
before, so the inserted text showed up as spaces.

There doesn't seem to be an interactive comment, so I can't do # ala
ksh properly.  Now I insert ": " at the beginning of the line.

Undo isn't undoable, which makes doing the proper vi undo more
difficult than I care to attempt right now.

Each line of a loop is put into the history separately, so you can't do
!for.

Has anybody figured out a way to simulate the ksh r command?  ("r xx"
is equivalent to "!xx")  Since the history substitution takes place in
readline, something like
function r() { eval "\!$*" }
doesn't work.

On ultrix (2.2 anyway) you must set the terminal in RAW mode to get a
real meta character.  Is this true for any 4.2 derived system?

Filename completion does no globbing, so * doesn't work right in vi
mode.  If emacs users want globbing, it can easily be added.
Otherwise, it's a bit tougher to make vi and emacs do different things
for completion.

Setting ENV= gives to following error:
: Is a directory.
Maybe null ENV should be ignored.

Are there any plans for supporting history among multi shells on the
same machine?  ksh will write each command to the history file, and
then re-read it.  In bash, whoever writes the file last (most
recently) gets to put their entire history in.

Since we're doing a new shell, I'd like to see some path operators to
allow you to add a directory to path if it's not already there, and to
delete a dir.  It would be cleaner than setting and checking paths.
(xdmm adds /usr/bin/X11 to the path before it execs the shell, but
people tend to set their path absolutely, and then whine when they
can't run X programs)
--
Jeff Sparkes	jeff1@garfield.mun.edu || uunet!garfield!jeff1

					

kayvan@mrspoc.transact.com (Kayvan Sylvan) (09/09/89)

Jeff Sparkes writes:
> 
> Are there any plans for supporting history among multi shells on the
> same machine?  ksh will write each command to the history file, and
> then re-read it.  In bash, whoever writes the file last (most
> recently) gets to put their entire history in.
> 

I handle this by doing this in my .bash_profile:

mytty=`/bin/tty`
export HISTFILE=~/.bash_hist/`echo $mytty | sed 'sx/dev/ttyxx'`

That way, each shell has a separate hisory file.

			---Kayvan

Kayvan Sylvan @ Transact Software, Inc. -*-  Los Altos, CA (415) 961-6112
Internet: kayvan@Transact.COM -*- UUCP: ...!{apple,pyramid,mips}!mrspoc!kayvan

bet@orion.mc.duke.edu (Bennett Todd) (09/19/89)

>Each line of a loop is put into the history separately, so you can't do
>!for.
Sure you can -- you'll just get the "for" starter. I sure appreciate
this -- I *love* composing many-line-long loops interactively, and the
ability to go back and snatch lines from out of a previous loop
construction makes it wonderful to do slightly different loops, or to
resubmit a loop with an internal typo corrected. The approach taken to
adding loops to history is one of my favorite bash features.

-Bennett
bet@orion.mc.duke.edu