summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Utility/_pick_variant2
-rw-r--r--Completion/Unix/Type/_path_files4
2 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Base/Utility/_pick_variant b/Completion/Base/Utility/_pick_variant
index a80cddb26..01fa2b98f 100644
--- a/Completion/Base/Utility/_pick_variant
+++ b/Completion/Base/Utility/_pick_variant
@@ -25,7 +25,7 @@ for cmd pat in "$var[@]"; do
   if [[ $output = *$~pat* ]]; then
     (( $+opts[-r] )) && eval "${opts[-r]}=$cmd"
     _cmd_variant[$opts[-c]]="$cmd"
-    return
+    return 0
   fi
 done
 
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index 2ce2c0cb2..fceebec4c 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -670,9 +670,9 @@ for prepath in "$prepaths[@]"; do
 	         "$pfxsfx[@]" $Mopts )
 	  if [[ -z "$listsfx" ]]; then
             for i in "$tmp1[@]"; do
-	      tmpdisp=("${i%%/*}")
+	      tmpdisp=("$i")
 	      _list_files tmpdisp "$prepath$realpath$testpath"
-	      compadd "$tmp4[@]" -s "/${i#*/}${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
+	      compadd "$tmp4[@]" -s "${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp"
 	    done
           else
             [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*"