[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: script/history



On Sun 04/02/2024 at 13:24, Max Nikulin <manikulin@gmail.com> wrote:
> On 04/02/2024 16:46, Gareth Evans wrote:
>> Re the script command, does anyone know of a way to make commands run during a script session appear in bash history too?
> [...]
>> man script says
>> 
>> "SEE ALSO
>>         csh(1) (for the history mechanism)"
>> 
>> but
>> 
>> $ man csh
>> No manual entry for csh
>
>      echo $SHELL
>
> If you really use BASH then install bash-doc, it contains manual in 
> various formats, including texinfo (info "bash") or read it online
> https://www.gnu.org/software/bash/manual/
> it describes some options related to history handling Actually "man 
> bash" is something rather close, but it does not allow to save links to 
> specific sections.

Hi Max,

Thanks for links and suggestions.

It seemed to me initially (as I should perhaps have stated) that man script was suggesting that csh was a component or depedency (of script), which seemed to be contradicted by it not being installed.  On reflection, possibly, it's just a way of doing things in script.  The reference in man script now seems to imply the latter.  

The fact that script scripts bash on my machine made me not think about the fact that it probably scripts whatever shell it's running from, and was doubtless written with one in mind/as inspiration - csh might make a certain sense in that respect.  

script runs in bash if run from csh run from bash, but I suppose csh in that chain of shells isn't a proper [do I mean login?] shell.  (Got that? :p)

The function of the "a" option in History Substitution in man csh seems different in the bash version.(under "Word Designators" in man bash/gnu online manual)

It'll be interesting to test when I can make sense of it :p

Anyway, my orginal question has been answered.

Thanks all.
Gareth


Reply to: