I accidentally overwrote my .zshrc
file after a misexecuted command, which contains several hundred lines of configs. However, I still have 5 terminals that had zsh open before this incident, and as a result, they are unaffected. However, any new shell I open loses the entire zsh config, and I have no backup for it.
I could simply continue using these 5 terminals, but I think there must be some form of way to extract the zshrc from memory, as ostensibly zsh loads the file into memory when run and stores it there until it's killed. I've tried this:
sudo dd if=/dev/mem bs=1M count=256|hexdump -C > ramfile
But all I've gotten is data unrelated to my zshrc.
Any solutions would be much appreciated.