##// END OF EJS Templates
%cd completer now shows bookmark completions on %cd -b
vivainio -
Show More
@@ -109,6 +109,12 b" ip.set_hook('complete_command', runlistpy, str_key = '%run')"
109
109
110 def listdirs(self, event):
110 def listdirs(self, event):
111 relpath = event.symbol
111 relpath = event.symbol
112
113 if '-b' in event.line:
114 # return only bookmark completions
115 bkms = self.db.get('bookmarks',{})
116 return bkms.keys()
117
112 if relpath.startswith('~'):
118 if relpath.startswith('~'):
113 relpath = os.path.expanduser(relpath).replace('\\','/')
119 relpath = os.path.expanduser(relpath).replace('\\','/')
114 found = [f.replace('\\','/')+'/' for f in glob.glob(relpath+'*') if os.path.isdir(f)]
120 found = [f.replace('\\','/')+'/' for f in glob.glob(relpath+'*') if os.path.isdir(f)]
General Comments 0
You need to be logged in to leave comments. Login now