about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_path_files2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 0291762cb..b43449541 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -311,7 +311,7 @@ for prepath in "$prepaths[@]"; do
         if [[ "$rem" = *parent* ]]; then
 	  for i in "$tmp2[@]"; do
 	    if [[ -d "$i" && "$i" = */* ]]; then
-	      remt="${i/*}"
+	      remt="${i%/*}"
 	      while [[ "$remt" = */* ]]; do
 		[[ "$remt" -ef "$i" ]] && break
 		remt="${remt%/*}"