Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: exclude current directory in _external_pwds



If one of the external zsh processes has the same current directory as
the active zsh, it isn't especially useful to complete that directory.
This filters it out.

Oliver

diff --git a/Completion/Base/Completer/_external_pwds b/Completion/Base/Completer/_external_pwds
index a9dc859..dfc1abe 100644
--- a/Completion/Base/Completer/_external_pwds
+++ b/Completion/Base/Completer/_external_pwds
@@ -36,7 +36,7 @@ case $OSTYPE in
     fi
   ;;
 esac
-dirs=( ${(D)dirs} )
+dirs=( ${(D)dirs:#$PWD} )
 
 compstate[pattern_match]='*'
 _wanted directories expl 'current directory from other shell' \



Messages sorted by: Reverse Date, Date, Thread, Author