USER0308 / ulauncher-plugin-jump

自己编写的Ulauncher的一个插件,快速跳转/打开到指定目录/文件,基于python2.7
0 stars 0 forks source link

list_choice.py "tmp_path" error #3

Open chinkiko opened 5 years ago

chinkiko commented 5 years ago

https://github.com/USER0308/ulauncher-plugin-jump/blob/ab78968cc34dae355dec94eee3aad2e9cf1466fd/list_choice.py#L68 https://github.com/USER0308/ulauncher-plugin-jump/blob/ab78968cc34dae355dec94eee3aad2e9cf1466fd/list_choice.py#L73

| 2019-01-24 20:09:02,912 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event ItemEnterEvent Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ulauncher/api/client/Client.py", line 52, in on_message self.extension.trigger_event(event) File "/usr/lib/python2.7/site-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event action = listener.on_event(event, self) File "/home/cleonh/.cache/ulauncher_cache/extensions/com.github.user0308.ulauncher-plugin-jump/main.py", line 53, in on_event List_choice().write_path(data) File "/home/cleonh/.cache/ulauncher_cache/extensions/com.github.user0308.ulauncher-plugin-jump/list_choice.py", line 73, in write_path write_file = open(tmp_path,"w") # open for write IOError: [Errno 21] 是一个目录: 'tmp'

chinkiko commented 5 years ago

I changed Line68 to "tmp_path = "tmp.txt" , and problem solved. BTW, for fuzzy search ? what about fzf? and how about adding a feature of querying zsh jump history?

USER0308 commented 5 years ago

@CleonH According to this,IOError: [Errno 21] 是一个目录: 'tmp',I think there is a folder named 'tmp' in the same directory, so that it cannot create the tmp file. Renaming the folder or changing the value of tmp_path is OK. As for fuzzy search, I haven't finished it since a little busy these day. But you can fuzzy search the record which you had searched before and wrote into the data file. For example, you may visit /home/user/A/abc, and next time you can visit it by h u a c. Last question, I didn't use zsh so I am sorry for this.