sobolevn / wakatime-zsh-plugin

🕒Track how much time you have spent in your terminal!
https://wakatime.com/terminal
MIT License
91 stars 10 forks source link

`last_command` not populated successfully #10

Closed julrich closed 3 years ago

julrich commented 3 years ago

At least for me last_command is always empty. It should be read here: https://github.com/sobolevn/wakatime-zsh-plugin/blob/master/wakatime.plugin.zsh#L29

But this is empty for me. Might be my configuration, or other plugins I've loaded. Googled for a quick bit, and switching to $history[$HISTCMD] solved it for me: https://stackoverflow.com/a/25297732

Seems to be a good way to go about getting the last command, could provide a PR if wanted!

sobolevn commented 3 years ago

@julrich sure! Thanks!

julrich commented 3 years ago

Added a pull-request!