zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: exclude current directory in _external_pwds
@ 2016-11-30 23:48 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2016-11-30 23:48 UTC (permalink / raw)
  To: Zsh workers

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' \


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-30 23:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-30 23:48 PATCH: exclude current directory in _external_pwds Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).