-
-
Notifications
You must be signed in to change notification settings - Fork 374
Open
Description
The default tcsh_history format has:
"pattern" : "^#(?<timestamp>\\+\\d+)\\n?(?<body>.*)?$"
Why is the + character inside the <timestamp> capture field? What is also strange is that when I move it outside, so that the pattern begins with ^#\\+, I get:
$ lnav ~/.history
error:tcsh_history:invalid sample -- #+1375138067
echo HELLO=BAR
error:tcsh_history:unrecognized timestamp format -- 1375138067
echo HELLO=BAR
format: @%@; matched:
format: %Y-%m-%d %H:%M:%S; matched: 1375
format: %Y-%m-%d %H:%M; matched: 1375
format: %Y-%m-%dT%H:%M:%S.%f%z; matched: 1375
format: %y-%m-%dT%H:%M:%S.%f%z; matched: 13
format: %Y-%m-%dT%H:%M:%SZ; matched: 1375
format: %Y-%m-%dT%H:%M:%S; matched: 1375
format: %Y/%m/%d %H:%M:%S; matched: 1375
format: %Y/%m/%d %H:%M; matched: 1375
format: %a %b %d %H:%M:%S %Y; matched: 1375138067
format: %a %b %d %H:%M:%S %Z %Y; matched: 1375138067
format: %a %b %d %H:%M:%S ; matched: 1375138067
format: %a %b %d %H:%M:%S.%L ; matched: 1375138067
format: %d/%b/%Y:%H:%M:%S +0000; matched: 13
format: %d/%b/%Y:%H:%M:%S %z; matched: 13
format: %b %d %H:%M:%S; matched:
format: %b %d %k:%M:%S; matched:
format: %b %d %l:%M:%S; matched:
format: %b %e, %Y %l:%M:%S %p; matched:
format: %m/%d/%y %H:%M:%S; matched: 13
format: %m/%d/%Y %I:%M:%S:%L %p %Z; matched: 13
format: %m/%e/%Y %l:%M:%S %p; matched: 13
format: %m%d %H:%M:%S; matched: 13
format: %H:%M:%S; matched: 13
format: %M:%S; matched: 13
format: %m/%d %H:%M:%S; matched: 13
format: %Y-%m-%d; matched: 1375
format: %Y-%m; matched: 1375
format: %Y/%m/%d; matched: 1375
format: %Y/%m; matched: 1375
This can be fixed by adding
"timestamp-format" : [
"%s"
],
Why is +1375138067 recognised as a valid timestamp by default but 1375138067 isn't?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels