[Omake] SVN Commit: OMake Build System [0.9.8.x] (Rev. 10212)

Aleksey Nogin nogin at metaprl.org
Tue Mar 13 17:08:58 PDT 2007


It would seem that we need to delimit the "unprintable" parts with:

#define RL_PROMPT_START_IGNORE   '\001'
#define RL_PROMPT_END_IGNORE  '\002'

when readline is used...

On 13.03.2007 17:00, Aleksey Nogin wrote:

> Hm,
> 
> I've noticed that when I use escape sequences in my osh prompt, readline 
> gets confused with long lines... I see that in bash, the "unprintable" 
> parts of the prompt have to be protected with a '\[...\]' (and if I do 
> not do that, I get the exact same problem as with OMake). I now wonder 
> how exactly bash handles these '\[...\]' - it is clear that we would 
> need to do something similar as well...
> 
> Aleksey
> 
> On 13.03.2007 12:24, Jason Hickey wrote:
> 
>> Cool!  Also, note that for documentation purposes, it should be 
>> mentioned that prompt() can be a function.  For example, this is what 
>> I have (in the old terminal style):
>>
>> prompt() =
>>     return $"<$(USER)@$(HOST) $(homename $(CWD)) 
>> $(history-index)>"
>>
>> When it is a function, things like CWD work as expected.
>>
>> Jason
>>
>> On Mar 13, 2007, at 12:10 PM, Aleksey Nogin wrote:
>>
>>> Added tgetstr, xterm_escape_begin, xterm_escape_end built-in functions.
>>>
>>> I can now have the following in my ~/.oshrc:
>>>
>>> hostname = $(shell hostname)
>>> match $(hostname)
>>> case $'^\([^.]*\)[.]'
>>>    hostname = $1
>>>    export
>>>
>>> prompt =
>>>    basic_prompt = $"[osh] $(hostname):"$`(homename .)
>>>    bold_prompt = $(tgetstr bold)$(basic_prompt)$"> "$(tgetstr sgr0)
>>>    if $(xterm_escape_begin)
>>>       value 
>>> $(xterm_escape_begin)$(basic_prompt)$(xterm_escape_end)$(bold_prompt)
>>>    else
>>>       value $(bold_prompt)
>>>
>>> ----
>>> Changes:
>>>     +7 -3    omake-branches/0.9.8.x/OMakefile
>>>     +2 -1    omake-branches/0.9.8.x/doc/html/changelog.html
>>>     +1 -0    omake-branches/0.9.8.x/lib/Pervasives.om
>>>     +13 -0    omake-branches/0.9.8.x/lib/configure/ncurses.om
>>>     +2 -0    omake-branches/0.9.8.x/mk/defaults
>>>     +11 -0    omake-branches/0.9.8.x/mk/make_config
>>>     +10 -4    omake-branches/0.9.8.x/src/Makefile
>>>     +10 -4    omake-branches/0.9.8.x/src/Makefile.nt
>>>     +51 -0    omake-branches/0.9.8.x/src/builtin/omake_builtin_sys.ml
>>>     Properties    omake-branches/0.9.8.x/src/clib
>>>     +2 -0    omake-branches/0.9.8.x/src/clib/OMakefile
>>>     Properties    omake-branches/0.9.8.x/src/libmojave
>>>     +3 -0    omake-branches/0.9.8.x/src/libmojave/OMakefile
>>>
>>> A hyperlinked version of this commit is available at
>>> http://svn.metaprl.org/commitlogs/omake/2007-03.html#07/03/13.12:10:27
>>>
>>> _______________________________________________
>>> OMake-CVS mailing list
>>> OMake-CVS at metaprl.org
>>> https://lists.metaprl.org/mailman/listinfo/omake-cvs
>>
>> -- 
>> Jason Hickey                  http://www.cs.caltech.edu/~jyh
>> Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257
>>
>>
>>
>> _______________________________________________
>> OMake-Devel mailing list
>> OMake-Devel at metaprl.org
>> https://lists.metaprl.org/mailman/listinfo/omake-devel
>>
> 
> 



More information about the OMake-Devel mailing list