about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_path_files8
1 files changed, 4 insertions, 4 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 91d070283..892450f53 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -420,13 +420,13 @@ for prepath in "$prepaths[@]"; do
     fi
 
     if [[ "$tpre" = */* ]]; then
-      PREFIX="${donepath}${linepath}${cpre}${tpre%%/*}"
-      SUFFIX="/${tsuf#*/}"
       tmp2="${cpre}${tpre%%/*}"
+      PREFIX="${donepath}${linepath}${tmp2}"
+      SUFFIX="/${tpre#*/}${tsuf#*/}"
     else
-      PREFIX="${donepath}${linepath}${cpre}${tpre}"
-      SUFFIX="${tsuf}"
       tmp2="${cpre}${tpre}"
+      PREFIX="${donepath}${linepath}${tmp2}"
+      SUFFIX="${tsuf}"
     fi
 
     if (( tmp4 )) ||