Hey, couldn't find a github link but i made some changes to the file for ZSH. if someone wants to be able to use this with ZSH just replace the file term_hist.py with this:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import unicodedata
import codecs
from os.path import expanduser
from workflow import Workflow, ICON_WEB, web, ICON_WARNING
def main(wf):
"""Execute the query on bash_history and return results
"""
args = wf.args
query = " ".join(args)
home = expanduser("~")
results = []
with codecs.open(home+"/.zsh_history", "r", encoding='ISO-8859-2') as f:
searchlines = reversed(f.readlines())
for i, line in enumerate(searchlines):
if query in line:
histstart = line.encode("utf-8","ignore").partition(":0;")
results.append(histstart[2])
for i in range(len(results)):
wf.add_item(results[i],
subtitle="",
arg = results[i],
valid=True,
icon="icon.png")
wf.send_feedback()
return 0
if __name__ == u"__main__":
wf = Workflow()
sys.exit(wf.run(main))