Ahh ... makes sense - thought that would help :
I tried the echo experiment with cmdhist set and it put echo into history file as one (multi-line) entry - now reading it back in ... is a whole other beast ... this does not do exactly what you require but it does allow multi-line liners to be read back in as one line:
after the first $hist substitution in addhist.pl :
$hist =~ s/\s+/ /gm;
so I can now add (from history output):
...
601 perl -MYAPE::Regex::Explain -e 'print
YAPE::Regex::Explain->new(qr/(aaaaa(?:(?:(?!aaaaa).)*))/s)->ex
+plain'
602 addhist
as:
perl -MYAPE::Regex::Explain -e 'print YAPE::Regex::Explain->new(qr/(aa
+aaa(?:(?:(?!aaaaa).)*))/s)->explain'
to my ~/.oneliners file = thank you again for posting this script - I am a big fan of oneliners and this script is a big help in keeping them around longer than my histsize ...
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|