Esempio n. 1
0
File: prompt.py Progetto: 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
File: prompt.py Progetto: tj90241/vx
 def _history_pullback(self):
     if len(_exec_prompt._history) > 0:
         vx.clear_contents_window(self)
         self.add_string(_exec_prompt._history[-1])
Esempio n. 4
0
 def _history_pullback(self):
     if len(_exec_prompt._history) > 0:
         vx.clear_contents_window(self)
         self.add_string(_exec_prompt._history[-1])