summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-11-16 23:46:29 +0300
committerIgor Murzov <e-mail@date.by>2011-11-16 23:46:29 +0300
commitb3fcb55dcf3d5a99d9a705a54dd649a976706d3f (patch)
tree74228bc8167bfb836ff31ab1cdd5774556f1f30a
parent1d45cfe760d4e7569a8001778d7772523848889d (diff)
downloadbash-completion-b3fcb55dcf3d5a99d9a705a54dd649a976706d3f.tar.gz
__get_cword_at_cursor_by_ref: Add missing quotes.
Fixes _get_comp_words_by_ref() and sftp tests (Alioth #313102).
-rw-r--r--bash_completion2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash_completion b/bash_completion
index 0e83c9d6..dc054ae1 100644
--- a/bash_completion
+++ b/bash_completion
@@ -324,7 +324,7 @@ __get_cword_at_cursor_by_ref()
if [[ "$i" -lt "$cword" ]]; then
# No, cword lies further;
local old_size="${#cur}"
- cur="${cur#${words[i]}}"
+ cur="${cur#"${words[i]}"}"
local new_size="${#cur}"
index=$(( index - old_size + new_size ))
fi