1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

do the PROMPT_COMMAND in the background for better performance

This commit is contained in:
Joel Schaerer 2009-03-06 20:30:11 +01:00
parent b21f004061
commit 87b188cf12

View File

@ -66,9 +66,13 @@ try:
except IOError: except IOError:
path_dict={} path_dict={}
if ('-a','') in optlist: if ('-a','') in optlist: #this can be done in the background
dicadd(path_dict,args[-1]) os.nice(10)
save(path_dict,dic_file) pid=os.fork()
if not pid:
os.setsid()
dicadd(path_dict,args[-1])
save(path_dict,dic_file)
elif ('--stat','') in optlist: elif ('--stat','') in optlist:
a=path_dict.items() a=path_dict.items()
a.sort(key=lambda e:e[1]) a.sort(key=lambda e:e[1])