示例#1
0
文件: prompt.py 项目: tj90241/vx
 def complete(self):
     import glob
     if not self.completing:
         self.completing = True
         contents = self.contents
         self.old_contents = contents
         vx.clear_contents_window(self)
         self.files = glob.glob('{}*'.format(contents))
         if len(self.files) == 0:
             self.completing = False
     if len(self.files) == 0:
         self.completing = False
         vx.clear_contents_window(self)
         self.add_string(self.old_contents)
     else:
         completion = self.files.pop()
         vx.clear_contents_window(self)
         self.add_string(completion)
示例#2
0
文件: prompt.py 项目: philipdexter/vx
 def complete(self):
     import glob
     if not self.completing:
         self.completing = True
         contents = self.contents
         self.old_contents = contents
         vx.clear_contents_window(self)
         self.files = glob.glob('{}*'.format(contents))
         if len(self.files) == 0:
             self.completing = False
     if len(self.files) == 0:
         self.completing = False
         vx.clear_contents_window(self)
         self.add_string(self.old_contents)
     else:
         completion = self.files.pop()
         vx.clear_contents_window(self)
         self.add_string(completion)
示例#3
0
文件: prompt.py 项目: tj90241/vx
 def _history_pullback(self):
     if len(_exec_prompt._history) > 0:
         vx.clear_contents_window(self)
         self.add_string(_exec_prompt._history[-1])
示例#4
0
文件: prompt.py 项目: philipdexter/vx
 def _history_pullback(self):
     if len(_exec_prompt._history) > 0:
         vx.clear_contents_window(self)
         self.add_string(_exec_prompt._history[-1])