jimhester / per-directory-history

Per directory history for zsh, as well as global history, and the ability to toggle between them with ^G.
zlib License
259 stars 36 forks source link

Corrupt history file causes inability to execute commands #16

Closed kfrz closed 8 years ago

kfrz commented 8 years ago

Using xterm or uxvrt, with zsh, I can't execute commands to fix this error. Maybe not a bug, I'm on a VM running Debian Jessie Stable. Using antigen.

Error I get when I open a shell is _per-directory-history-addhistory:2: corrupt history file /home/kf/.directory_history/home/kf/history

I'd attach my .rc files but I can't get to any of my files on this system, or execute commands.

If there's a simple "login without profile configurations or bypass zsh altogether" type UNIX-y solution I just don't know, I'd be happy to hear about it.

EDIT: I was able to open emacs via i3 and edit the conf files I needed, but maybe this is an issue for someone else too?

kfrz commented 8 years ago

At some point it entered the following into my history files: : 1467243015:0;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Removing this corruption in emacs fixes the issue.

piegamesde commented 5 years ago

Please reopen. Once the history is corrupted, there is no way to execute commands to fix this. Proper error handling should make it so that you can still use zsh normally, except for the missing history.