Deleting Stash historybrowsing

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 from stash does 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 stash 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.