about summary refs log tree commit diff
path: root/Completion/Commands/_expand_word
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Commands/_expand_word')
-rw-r--r--Completion/Commands/_expand_word6
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word
index b4e22de48..ad334da9d 100644
--- a/Completion/Commands/_expand_word
+++ b/Completion/Commands/_expand_word
@@ -7,6 +7,10 @@
 
 local curcontext="$curcontext"
 
-[[ -z "$curcontext" ]] && curcontext=":expand-word"
+if [[ -z "$curcontext" ]]; then
+  curcontext="correct-word:::"
+else
+  curcontext="expand-word:${curcontext#*:}"
+fi
 
 _main_complete _expand