zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Make dynamic directory completion work in command position as well
@ 2011-06-02 15:53 Mikael Magnusson
  0 siblings, 0 replies; only message in thread
From: Mikael Magnusson @ 2011-06-02 15:53 UTC (permalink / raw)
  To: zsh-workers

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


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

only message in thread, other threads:[~2011-06-02 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-02 15:53 PATCH: Make dynamic directory completion work in command position as well Mikael Magnusson

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).