Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Remove _message call from _mkdir
- X-seq: zsh-workers 34877
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: Remove _message call from _mkdir
- Date: Sun, 12 Apr 2015 12:46:28 -0700
- In-reply-to: <150412101826.ZM21679@torch.brasslantern.com>
- 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
- References: <5528B4C2.3010001@gmail.com> <150411134410.ZM27516@torch.brasslantern.com> <5529A5C2.3090603@gmail.com> <150412101826.ZM21679@torch.brasslantern.com>
On Apr 12, 10:18am, Bart Schaefer wrote:
}
} > It works perfectly with all
} > commands but mkdir, which simply refuses to offer hidden files, ever.
}
} Which turns out to be that _mkdir calls _message which breaks out of the
} loop over _completers in _main_complete, so the _ignored completer in your
} style is never reached.
}
} _message really ought to be called only when there is no possibility of
} other completions being generated, not merely to suggest what ought to
} be typed at that point.
Unless someone has a better suggestion?
diff --git a/Completion/Unix/Command/_mkdir b/Completion/Unix/Command/_mkdir
index b5f7519..58d6c74 100644
--- a/Completion/Unix/Command/_mkdir
+++ b/Completion/Unix/Command/_mkdir
@@ -61,7 +61,7 @@ case "$state" in
[[ $variant == zsh && ${#${${words[2,-1]}:#-*}} -gt 0 ]]; then
_wanted directories expl \
'parent directory (alternatively specify name of directory)' \
- _path_files -/ && ret=0 || _message 'name of directory'
+ _path_files -/ && ret=0
fi
;;
esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author