2017-07-13 21:59 GMT+03:00 Christian Brabandt <[email protected]>:
> @chrisbra commented on this pull request.
>
> ________________________________
>
> In runtime/scripts.vim:
>
>> @@ -306,7 +306,9 @@ else
>      set ft=virata
>
>      " Strace
> -  elseif s:line1 =~# '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~#
> '^__libc_start_main'
> +  elseif s:line1 =~# '^\(\[pid \d\+\] \)\=[0-9:.]* *execve('
> +    \ || s:line1 =~# '^__libc_start_main'
> +    \ || s:line1 =~# 'execve(.*)\s\+= \d\+'
>
> Okay, thanks for the additional info. That clears it up. I see, that when
> using the -o argument of strace, the output is prefixed by what seems to be
> the PID and you used additionally the -t argument, which means to prefix the
> time to the normal output.
>
> This explains, why the content is not detected as strace logfile, since the
> time of the day is not expected by the regex and therefore does not match.
> We could either add an additional (\d\d:\d\d:\d\d \)* to the existing regexp
> (after the \=[0-9:.]* part or even simpler, simply remove the ^ start of
> line assertion. In that case the complete patch would look like this:
>
> diff --git a/runtime/scripts.vim b/runtime/scripts.vim
> index 358d32829..c690f9d5d 100644
> --- a/runtime/scripts.vim
> +++ b/runtime/scripts.vim
> @@ -306,7 +306,7 @@ else
>      set ft=virata
>
>      " Strace
> -  elseif s:line1 =~# '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~#
> '^__libc_start_main'
> +  elseif s:line1 =~# '\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~#
> '^__libc_start_main'
>      set ft=strace
>
>      " VSE JCL
>
> Can you check, if that works for you?

With `^` removed preceding optional atoms do nothing, but waste CPU
cycles without actually affecting matching results, so the “regex” may
be just `stridx(s:line1, 'execve(') != -1`.

>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui