Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Incorrect 'd'-keys in log lines #5

Open
ndcroos opened this issue Jul 7, 2018 · 4 comments
Open

Incorrect 'd'-keys in log lines #5

ndcroos opened this issue Jul 7, 2018 · 4 comments

Comments

@ndcroos
Copy link
Contributor

ndcroos commented Jul 7, 2018

The values of 'd'-keys in the log lines are 'shifted' by one.
Let me illustrate this with an example.

Suppose the following commands are executed:

cmd n at date n
cmd n+1 at date n+1

Then cmd n-1 gets logged with date n, cmd n gets logged with date n+1 and so on.

entryDateTime's value corresponds to the local zone time 'now' (https://github.com/NorfairKing/hastory/blob/development/hastory-data/src/Data/Hastory/Gather.hs#L19) , instead of when the command
was executed.

One way to solve this issue is to echo the time of execution, so it gets piped into 'hastory gather'.

@NorfairKing
Copy link
Owner

I think #4 will already solve this problem by gathering the command when it's executed instead of afterward.

@ndcroos
Copy link
Contributor Author

ndcroos commented Jul 16, 2018

#4 will solve the problem in this issue for zsh, but not for bash.

@NorfairKing
Copy link
Owner

Why is that? I don't see it.

@ndcroos
Copy link
Contributor Author

ndcroos commented Jul 16, 2018

At this moment, I don't see it either, what the reason of this behaviour is. It is just what I observed by trying both bash and zsh.
EDIT: I used Xfce Terminal on Manjaro for the manual 'bash' test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants