The problem is the ambiguity between whether you typed the newline or
whether it's a record separator. There is hacks to make it work, but I
would prefer to have a non-text character to keep it simple. If you don't
care when grepping, couldn't you just do

~/.julia_history2 > tr '\0' '\n' | grep ...

?


On Sat, Mar 29, 2014 at 9:20 PM, Shaun Walbridge
<[email protected]>wrote:

> Wonderful work Keno and Mike! This is a great addition.
>
> Would it be possible to retain the standard Readline history file format
> of separating elements by newlines? It looks like history elements in my
> new .julia_history2 file are NULL terminated, which makes the file harder
> to use with line-oriented shell tools like ag/ack/grep.
>
>
> On Sat, Mar 29, 2014 at 9:09 PM, Keno Fischer <
> [email protected]> wrote:
>
>> ~/.julia_history2 unless Mike changed it. The format is different.
>>
>>
>> On Sat, Mar 29, 2014 at 9:06 PM, J Luis <[email protected]> wrote:
>>
>>> Where does it keeps the commands history? The old  .julia_history is not
>>> used (and lost) anymore but the commands "memory" is preserved, though
>>> reset to blank.
>>>
>>> Domingo, 30 de Março de 2014 0:57:13 UTC, Jake Bolewski escreveu:
>>>
>>>> This is really great work Keno and Mike.
>>>>
>>>> I think a great improvemnt would be to make completions were a bit more
>>>> modular.  That way custom completion callbacks could be added in at runtime
>>>> in your .juliarc file.  I'm trying to get zsh to do the shell completions
>>>> but that would only interest people who use zsh :-)
>>>>
>>>> Do we have an ETA on when 0.3 will be released?  This seemed like one
>>>> of the bigger blockers.
>>>>
>>>> Best,
>>>> Jake
>>>>
>>>> On Saturday, March 29, 2014 3:59:19 PM UTC-4, Stefan Karpinski wrote:
>>>>>
>>>>> Good news, everyone! The pure-Julia read eval print loop (REPL) that
>>>>> Keno Fischer developed and Mike Nolta integrated into base Julia has just
>>>>> been merged. There are a number of nice things about changing from the old
>>>>> REPL to this new one, in no particular order:
>>>>>
>>>>>    - The old REPL used the GNU readline library, which we had hacked
>>>>>    far beyond what it was ever meant to do. This made modifying it a bit
>>>>>    terrifying and thus issues with it tended to get ignored or shelved as
>>>>>    "we'll be able to do that in the new REPL".
>>>>>    - The new REPL, is pretty clean, simple Julia code. Seriously - 
>>>>> terminal
>>>>>    
>>>>> support<https://github.com/JuliaLang/julia/blob/master/base/Terminals.jl>,
>>>>>    line 
>>>>> editing<https://github.com/JuliaLang/julia/blob/master/base/LineEdit.jl>,
>>>>>    and the REPL 
>>>>> itself<https://github.com/JuliaLang/julia/blob/master/base/REPL.jl>are 
>>>>> less than 2000 lines of code -
>>>>>    *total*. This works out to a net code reduction of 33233 lines of
>>>>>    code (GNU readline is 34640 lines of C), while *gaining*functionality. 
>>>>> That has to be a project record.
>>>>>    - The new code is infinitely easier to modify, fix and improve, so
>>>>>    REPL-replated bugs will probably get fixed lickety split going forward.
>>>>>    - The old GNU readline REPL was one of our GPL library
>>>>>    dependencies that make the total Julia "product" GPL. We'd like to shed
>>>>>    these or make them optional to allow for a non-GPL, MIT-licensed Julia
>>>>>    distribution and this is a major step toward that goal.
>>>>>    - The new REPL code already has fancy features that you wouldn't
>>>>>    even think about doing with readline. Try typing "?" or ";" at the 
>>>>> prompt
>>>>>    and see the REPL mode change form "julia>" to "help>" or "shell>". 
>>>>> Cool,
>>>>>    huh?
>>>>>    - The new REPL is noticeably snappier than the old one. Combined
>>>>>    with the static compilation of julia introduced in 0.3, going from 
>>>>> zero to
>>>>>    REPL is pretty quick these days.
>>>>>    - Since full-fledged line editing functionality is now built into
>>>>>    Base Julia, we can use it everywhere without worrying what libraries 
>>>>> people
>>>>>    have installed. Once we settle on a good API, you can expect that user 
>>>>> code
>>>>>    that needs to prompt for input will be just as slick as the REPL 
>>>>> itself.
>>>>>
>>>>> There will, of course, be some hitches and road bumps, but now that
>>>>> this is merged and everyone using Julia master will be testing it, they
>>>>> should get sorted out in short order. Much applause for Keno and Mike for
>>>>> this excellent work.
>>>>>
>>>>> Stefan
>>>>>
>>>>>
>>
>

Reply via email to