Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Make dynamic directory completion work in command position as well
- X-seq: zsh-workers 29438
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: Make dynamic directory completion work in command position as well
- Date: Thu, 2 Jun 2011 17:53:14 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:x-mailer; bh=3ZVpcCibWBVx0FVuBom1NNeMPx/1mJOOcWJ9rc8rFsE=; b=ivMoo8xYr3qNzl13I1ZFBTtJupzmihjQO5aQzLMaqBXB4xI3WDvhVrj17MdxQeWwc4 AJR3LYEAoqW3zcdclrhRyZVpgkLcDNjJAWnHW4dFqp3w/loYria7Ge/LOFGW78N6Owyt grpwrpCp6pSjpBvvAqEUWPlZkUuDC5zkHlbxw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer; b=raI3i0Kv7HifKj8Jr7pUa/Ynx6GMdzGsqsXaP1xiD7BL66brH1bP/20W+WGXdhFKpj Gk86CyAp6m1UnnCDQW+SG3aGB++VcyeA3CyuEF9Lg4AUE8Ib2bO0h3fdSq6ayuOZ9Tjr zpJqTfyKKS3rxOfKpxzO6CKOnZ3s8qE9TH9Cc=
- 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
This will still complete dynamic dirs when autocd isn't set, but since
the alternative is completing ~[parameters] I don't think it hurts much.
Ie, this is what it did before,
% ~[COLUMNS]
zsh: no directory expansion: ~[COLUMNS]
---
Completion/Zsh/Context/_subscript | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript
index 31da97e..2e0743e 100644
--- a/Completion/Zsh/Context/_subscript
+++ b/Completion/Zsh/Context/_subscript
@@ -18,7 +18,7 @@ compset -P '\(([^\(\)]|\(*\))##\)' # remove subscript flags
# or colon list.
integer pos=$((CURSOR+1))
while [[ pos -gt 1 && $BUFFER[pos-1] != '[' ]]; do (( pos-- )); done
-if [[ $BUFFER[1,pos-1] = *[[:space:]:=]##\~\[ ]]; then
+if [[ $BUFFER[1,pos-1] = ((#s)|*[[:space:]:=]##)\~\[ ]]; then
_dynamic_directory_name
elif [[ "$PREFIX" = :* ]]; then
_wanted characters expl 'character class' \
--
1.7.4-rc1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author