Esempio n. 1
0
 def __call__(self, text):
     """Return filenames matching 'text'.
     Starts at the current working directory.
     """
     matches = []
     # Dequoting early allows us to skip some hooks
     if completion.found_quote:
         text = self.dequote_filename(text, completion.quote_character)
     if text.startswith('~') and (os.sep not in text):
         matches = completion.complete_username(text)
     if not matches:
         matches = completion.complete_filename(text)
         # HFS Plus uses "decomposed" UTF-8
         if sys.platform == 'darwin':
             if not matches:
                 matches = completion.complete_filename(decompose(text))
             matches = [compose(x) for x in matches]
     return matches
Esempio n. 2
0
 def __call__(self, text):
     """Return filenames matching ``text``.
     Starts at the current working directory.
     """
     matches = []
     # Dequoting early allows us to skip some hooks
     if completion.found_quote:
         text = self.dequote_filename(text, completion.quote_character)
     if text.startswith('~') and (os.sep not in text):
         matches = completion.complete_username(text)
     if not matches:
         matches = completion.complete_filename(text)
     return matches
Esempio n. 3
0
 def __call__(self, text):
     """Return filenames matching ``text``.
     Starts at the current working directory.
     """
     matches = []
     # Dequoting early allows us to skip some hooks
     if completion.found_quote:
         text = self.dequote_filename(text, completion.quote_character)
     if text.startswith('~') and (os.sep not in text):
         matches = completion.complete_username(text)
     if not matches:
         matches = completion.complete_filename(text)
     return matches
Esempio n. 4
0
def complete_filename(text):
    matches = []
    # Dequote immediately to avoid a tilde-expansion bug. This
    # also simplifies subsequent hooks.
    if completion.found_quote:
        text = dequote_filename(text, completion.quote_character)
    # Complete usernames
    if text.startswith('~') and '/' not in text:
        matches = completion.complete_username(text)
    # Complete filenames
    if not matches:
        matches = completion.complete_filename(text)
    return matches
Esempio n. 5
0
def filecomplete(text):
    return completion.complete_filename(text)
Esempio n. 6
0
def filecomplete(text):
    return completion.complete_filename(text)
Esempio n. 7
0
def completefilename(text):
    # Use the built-in filename completion
    return completion.complete_filename(text)
Esempio n. 8
0
def completefilename(text):
    # Use the built-in filename completion
    return completion.complete_filename(text)