Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: exclude current directory in _external_pwds
- X-seq: zsh-workers 40053
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: exclude current directory in _external_pwds
- Date: Thu, 01 Dec 2016 00:48:48 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1480549729; bh=50vv78UfPQsXU/pyG+41SaZuQKN4gkfR8cm0j9JSKN0=; h=From:To:Subject:Date:From:Subject; b=R3IKY5B0eUo66lME4ox4U5lKnfto5tW2qhWOBRpu48mWEql8DjzqRe/+e1379mP4u5fOwBTaUi00nlsJc9bQlwSjQJBasYcQYZExDd+pBLW+K242DsDyIHb8Lxr6JNDPe/c2rxS2T1EAAJEDYkxUorQwxIpQ+qqJZfaQ5+98jg4MNf51FU87sO7fP3ixofsYkk/b2qZszeEUAoT4cfiBb7ieXOSpVQguRlSy9rFzitH6VHOc92skvgjp67xUmBBUex1uNZH1pTaDvnimspgH6jeujhk8ITtHjOicg2fgTTd0odhWsihyFEH/SGlm+VcC5BxvbW3mIw0EiwH/spnPdg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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