Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Deleting Stash history
-
I wanted to delete my stash history and naively thought that if I cat /dev/null > .stash_history, that would do it. However, if I do that, the .stash_history file is truncated and shows 0B but when I restart stash all of the history is recreated. What I am overlooking?
-
stash
probably keeps the history in memory while running, and writes it to the history file later. This means that deleting the history file fromstash
does not clear the history, because the copy in memory is not cleared. To clear the history you can probably run something likeimport os; os.remove(os.path.expanduser("~/Documents/.stash_history"))
in the Python prompt (whilestash
is not running). I don't remember where exactly the.stash_history
file is located, so you may need to adjust the path. -
@ihf
@dgelessus is right. StaSh keeps all history in memory while running and write them to the history file when it quits.The history file is by default located under stash installation root, i.e.
~/Documents/site-packages/stash/.stash_history
To delete the history, maybe you can try this:
After you truncating the history file, try manually restart pythonista while stash is still running, i.e. double click home and swipe pythonista out of the task list. That will most likely end stash without it performing any tasks on exit. -
@ywangd Unfortunately, manually restarting Pythonista does not do the trick.
@dgelessus That worked.Thank you.