-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is mine 0? #3
Comments
me too |
1 similar comment
me too |
@ATQQ @1017neroliu @80imike Can you show me the results of these commands? |
@YiNNx me too
|
echo $HISTFILE
/home/nero/.bash_history cat $HISTFILE | tail -20
ls
bash cmd-wrapped
./cmd-wrapped
ls
cd ..
ls
rm ./*
rm -rf ./*
ls
unzip cmd-wrapped-linux-x86_64.zip
ls
cd cmd-wrapped-linux-x86_64/
ls
./cmd-wrapped
./cmd-wrapped 2022
clear
./cmd-wrapped
clear
clearexit
exit |
I've figured out what the problem is. Zsh history won't keep track of the time for each command if the additional option called If this option wasn't configured earlier, it's likely unable to retrieve the timestamps for historical commands, so as the history stats for cmd-wrapped. Sorry for that :( |
I'm having the same problem, note that I'm using BASH and it's a server with multiple users in the home directory, I'm just one of them |
As for bash, you need to set the |
I added the |
@YiNNx |
I am very sorry that I did not read the prompt information output from the terminal carefully when I used it. After I set the $HISTTIMEFORMAT, the time stamps of all commands changed to the current time, so I can only check the report of 2024 |
@Freedom-Blue Well, this setting will enable bash to record the time from the time point you configure it, but the earlier commands' timestamps can't be retrieved. Maybe now you can view the 2024's stats... |
You're right, I can only look at 2024 data after I set it up 😂,Thanks for the pointer!🤞 |
Already add a note for this in README. |
got it, seems that |
It seems like your history file is correctly recording the timestamp. 🤔 The output should not be zero. What about the result of 2024? |
That's so weird that on all my three machines, only the latest few commands have the timestamp whenever. Maybe some NixOS magic or so on, I will enable Mannally adding fake timestamps for test works for me. |
👌 Got it |
Mine is 0, too. I use oh-my-zsh, and a custom HISTFILE like this (set in .zshrc)
And this histfile has thousands of lines of cmd with timestamp(earliest is around 2022), but it's still 0; |
I think you are right. Judging from history.rs, the Lines 36 to 61 in 18119a8
If you set a filename other than For a temporary fix, you can create a symlink to the real # Ensure to change the file path and name
ln -s ~/.histfile ~/.zsh_history
cmd-wrapped 2023 -s zsh
# It should work now For a well-rounded fix, I think @YiNNx could add support for reading |
Never mind, did not notice #17 just now, it should be solved with the upcoming |
@Vinfall Now fixed by #18. Thanks for the suggestion! |
The text was updated successfully, but these errors were encountered: