def quote_completions(self, completions, cword_prequote, first_colon_pos):
comp_wordbreaks = os.environ.get('<STR_LIT>', os.environ.get('<STR_LIT>', self.wordbreaks))<EOL>if USING_PYTHON2:<EOL><INDENT>comp_wordbreaks = comp_wordbreaks.decode(sys_encoding)<EOL><DEDENT>punctuation_chars = '<STR_LIT>'<EOL>for char in punctuation_chars:<EOL><INDENT>if char not in comp_wordbreaks:<EOL><INDENT>comp_wordbreaks += char<EOL><DEDENT><DEDENT>if cword_prequote == '<STR_LIT>':<EOL><INDENT>if first_colon_pos:<EOL><INDENT>completions = [c[first_colon_pos+<NUM_LIT:1>:] for c in completions]<EOL><DEDENT>for wordbreak_char in comp_wordbreaks:<EOL><INDENT>completions = [c.replace(wordbreak_char, '<STR_LIT:\\>'+wordbreak_char) for c in completions]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if cword_prequote == '<STR_LIT:">':<EOL><INDENT>for char in '<STR_LIT>':<EOL><INDENT>completions = [c.replace(char, '<STR_LIT:\\>'+char) for c in completions]<EOL><DEDENT><DEDENT>completions = [cword_prequote+c.replace(cword_prequote, '<STR_LIT:\\>'+cword_prequote) for c in completions]<EOL><DEDENT>continuation_chars = '<STR_LIT>'<EOL>if len(completions) == <NUM_LIT:1> and completions[<NUM_LIT:0>][-<NUM_LIT:1>] not in continuation_chars:<EOL><INDENT>if cword_prequote == '<STR_LIT>' and not completions[<NUM_LIT:0>].endswith('<STR_LIT:U+0020>'):<EOL><INDENT>completions[<NUM_LIT:0>] += '<STR_LIT:U+0020>'<EOL><DEDENT><DEDENT>return completions<EOL>
If the word under the cursor started with a quote (as indicated by a nonempty ``cword_prequote``), escapes
occurrences of that quote character in the completions, and adds the quote to the beginning of each completion.
Otherwise, escapes all characters that bash splits words on (``COMP_WORDBREAKS``), and removes portions of
completions before the first colon.

If there is only one completion, and it doesn't end with a **continuation character** (``/``, ``:``, or ``=``),
adds a space after the completion.

This method is exposed for overriding in subclasses; there is no need to use it directly.