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?
stashprobably keeps the history in memory while running, and writes it to the history file later. This means that deleting the history file from
stashdoes not clear the history, because the copy in memory is not cleared. To clear the history you can probably run something like
import os; os.remove(os.path.expanduser("~/Documents/.stash_history"))in the Python prompt (while
stashis not running). I don't remember where exactly the
.stash_historyfile is located, so you may need to adjust the path.
The history file is by default located under stash installation root, i.e.
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.