🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Bennett Todd Wed, 26 Jul 1989 21:02
History, actually not a bug, but a documentation suggestion
#399
Author: Bennett Todd
Date: Wed, 26 Jul 1989 21:02
59 lines
2380 bytes
I started off with the following bug complaint:

|I include the history number in my prompt so that, if a command is still
|on the screen, I can refer to it via
|
|	!number
|
|Bash 1.01 didn't handle that. In particular, using 55-line-long MGR
|windows (my normal window size -- boy are they addictive!) I looked
|halfway up the screen and saw that the command I wanted to re-execute
|was number 19, and here's what happened:
|
|	bent[29] !19
|	19: Event not found.
|
|Drat.
|
|Hey, waitaminit, I just typed "history", and (a loooong time later,
|after much scrolling) I found that command at *519*!!! And, sure enough,
|"!519" worked! Either the reference (in features) to:
|
|        \#      the command number of this command
|
|(in the section on "the comment next to the decode_prompt_string
|function") or the reference:
|
|	`!n'
|	     Refer to command line N.
|
|(in "Event Designators" in "History Expansion") has a problem. Frankly,
|I wish that they both were true. However, it looks like they are at odds
|with attempting to have the command history persist via the external
|file, in the face of multiple bashes on multiple windows.
|
|Waitaminitagain!
|Hmmm...

... and I figured it all out! Brian, terrific job!

Some folks *like* C-shells property of lacking externally recorded
history, having totally separate and unrelated histories for each
invocation of a shell. I confess to being one of these poor old
inflexible lusers. You might mention in the docs that such folks can
keep their defective preferences if they

	(1) Create a directory "~/.bash-histories" (for example)
	(2) Add to .bashrc the incantation:
	    	HISTFILE=~/.bash-histories/$$
	    (making sure of course that .bashrc is sourced from
	    .profile).
	(3) Add to .bash_logout the following:
	    	rm ~/.bash-histories/*

Far out! Now *everybody* can be happy!

Thanks again for the great shell!

-Bennett
bet@orion.mc.duke.edu
Re: History, actually not a bug, but a documentation suggestion
#401
Author: Jason S. Molenda
Date: Mon, 31 Jul 1989 20:18
21 lines
1151 bytes
bet@ORION.MC.DUKE.EDU (Bennett Todd) writes:

>	(1) Create a directory "~/.bash-histories" (for example)
>	(2) Add to .bashrc the incantation:
>	    	HISTFILE=~/.bash-histories/$$
>	    (making sure of course that .bashrc is sourced from
>	    .profile).
>	(3) Add to .bash_logout the following:
>	    	rm ~/.bash-histories/*

>Far out! Now *everybody* can be happy!

  even easier is to create a file '~/.bash_history', put the line
HISTFILE=~/.bash_history in your .bashrc file and then chmod the
file to 444 (-r--r--r--) and bash won't be able to write to the
file so your history will not be recorded.

>-Bennett
>bet@orion.mc.duke.edu

Jason molenda, molenda@umn-cs.cs.umn.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads