Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Completion: Small fixes for _files, _object_files
- X-seq: zsh-workers 42984
- From: dana <dana@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: [PATCH] Completion: Small fixes for _files, _object_files
- Date: Mon, 11 Jun 2018 06:01:46 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=XIUo8K6eqB17ob01+uDATasHrCcsMaUpESnWuhBP/lA=; b=J2o7/xgBDqwuM3nrCFAWzSWfKq4sRUH5mPlQ0ACQyfzgoSLBViXgOTkRr4mxIMGZKp iKMQwLFWCrdLVgxC5zKok4nabZ5B6JOVbNO5vCIg+mvxfb1+yhWLxfhlDWK4cxwjim2g YtAal0Qtculz4+YDN3KcGptfnUOwddWmPAa1YOiU8u+Sft/bQsfwLB7iVIHSRjq2VuTK WqTvSo07QYsf7/lc0Uds/xG655EEKTaF8ySxaTyAxJRW9qIKjVVCCmtF00crv6f7xNvb CXzqTAFZN0e55YghVO/I6WoMxkWCxxmK1Euocqmkn1z9XQezyheQL/9h6mas9nZrkb2C w7xw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I noticed that _object_files doesn't respect the description set through
_arguments, nor the default one in the function itself. This seems to fix it
(and i made a similar change in _files) — i *think* this is the order these
should be passed in generally, isn't it?
dana
diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files
index 2b0c5580a..5df22ea46 100644
--- a/Completion/Unix/Type/_files
+++ b/Completion/Unix/Type/_files
@@ -121,7 +121,7 @@ for def in "$pats[@]"; do
done
fi
else
- _path_files "$expl[@]" -g "$pat" "$opts[@]" && ret=0
+ _path_files -g "$pat" "$opts[@]" "$expl[@]" && ret=0
fi
done
(( ret )) || break
diff --git a/Completion/Unix/Type/_object_files b/Completion/Unix/Type/_object_files
index 595265116..6b931372f 100644
--- a/Completion/Unix/Type/_object_files
+++ b/Completion/Unix/Type/_object_files
@@ -9,4 +9,4 @@ __object_file() {
$REPLY = (core*|*.core) ]]
}
-_files -g '*(-.e,__object_file,)'
+_files -g '*(-.e,__object_file,)' "$@" "${(@)expl}"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author