Skip to content

Commit

Permalink
Spit and polish.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanholek committed May 10, 2012
1 parent 926938a commit 62245f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions kmd/completions/quoting.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ def backslash_dequote(text, chars=''):
def backslash_quote(text, chars=''):
"""Backslash-quote 'text'.
If 'chars' is given, only characters in 'chars' are quoted.
Otherwise, all :attr:`rl.completer.filename_quote_characters <rl:rl.Completer.filename_quote_characters>`
are quoted.
"""
for c in (chars or completer.filename_quote_characters):
text = text.replace(c, QUOTED[c])
Expand All @@ -60,7 +58,8 @@ def backslash_quote(text, chars=''):
def is_fully_quoted(text):
"""Return True if all
:attr:`rl.completer.filename_quote_characters <rl:rl.Completer.filename_quote_characters>`
in 'text' are backslash-quoted."""
in 'text' are backslash-quoted.
"""
skip_next = False
size = len(text)
for i in range(size):
Expand Down
2 changes: 1 addition & 1 deletion kmd/kmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def run(self, args=None):

def rejoin(self, args):
"""Rejoin command line arguments."""
line = []
completer.filename_quote_characters = FILENAME_QUOTE_CHARACTERS
line = []
for arg in args:
if not is_fully_quoted(arg):
arg = backslash_quote(arg)
Expand Down

0 comments on commit 62245f2

Please sign in to comment.