http://www.perlmonks.org?node_id=584993


in reply to Re: Shell style line-editing without benefit of CPAN modules
in thread Shell style line-editing without benefit of CPAN modules

(As my darling 16 YO daughter would say): O M G

Thanks so much; that seems to get me most of the way there. If yer weren't so Anonymous, I'd give ya a big ol hug. :-)

Not to be greedy (always spoken before one gets greedy): I note that this only returns a "history" of the last command entered, at least on the two systems where I tried it. Is there a way to get it to save/scroll a full history list? (As I diligently go back and read the Bash Reference Manual...)

Most appreciative,

-Ken

"This bounty hunter is my kind of scum: Fearless and inventive." --J.T. Hutt
  • Comment on Re^2: Shell style line-editing without benefit of CPAN modules

Replies are listed 'Best First'.
Re^3: Shell style line-editing without benefit of CPAN modules
by zengargoyle (Deacon) on Dec 07, 2006 at 20:30 UTC

    really? on my bash: BASH_VERSION='3.1.16(1)-release', the above code does keep the the full history of the commands, not just the last command. (that was the hardest part of writing it :) ).

    and i believe that there is probably a way to set a .history file so that it would keep commands between sessions.

    anyway, good luck digging through the bash manpages. i hope you can get it to work "well enough" for your needs. it's probably just one of the bash 'set' options or an environment variable that you need set correctly to make the history work.