diff options
Diffstat (limited to 'Completion/Base')
-rw-r--r-- | Completion/Base/Core/_main_complete | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete index d6a100777..977ab49ee 100644 --- a/Completion/Base/Core/_main_complete +++ b/Completion/Base/Core/_main_complete @@ -68,6 +68,16 @@ if [[ "$compstate[insert]" = tab* ]]; then compstate[insert]="${compstate[insert]//tab /}" fi +# Second attempt at GLOB_COMPLETE + +if [[ "$compstate[pattern_match]" = "*" && + "$_lastcomp[unambiguous]" = "$PREFIX" && + -n "$_lastcomp[unambiguous_cursor]" ]]; then + integer upos="$_lastcomp[unambiguous_cursor]" + SUFFIX="$PREFIX[upos,-1]$SUFFIX" + PREFIX="$PREFIX[1,upos-1]" +fi + # Special completion contexts after `~' and `='. if [[ -z "$compstate[quote]" ]]; then |