summaryrefslogtreecommitdiffstats
path: root/Completion/Commands
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
commited41dafd3c79ebf2ce390ee9af54fe8bb21deb73 (patch)
treea45e062eb30e19f11c04c8bb7d30e36c1b77eb7e /Completion/Commands
parentzsh-workers/9545 (diff)
downloadzsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.gz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.bz2
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.lz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.xz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.zst
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.zip
zsh-workers/9546
Diffstat (limited to 'Completion/Commands')
-rw-r--r--Completion/Commands/_complete_help2
-rw-r--r--Completion/Commands/_correct_word6
-rw-r--r--Completion/Commands/_expand_word6
-rw-r--r--Completion/Commands/_history_complete_word12
4 files changed, 17 insertions, 9 deletions
diff --git a/Completion/Commands/_complete_help b/Completion/Commands/_complete_help
index b172e76db..9d3e47add 100644
--- a/Completion/Commands/_complete_help
+++ b/Completion/Commands/_complete_help
@@ -12,7 +12,7 @@ _complete_help() {
for i in "${(@k)help_funcs}"; do
text="${text}
-tags in context ${i}"
+tags in context :completion:${i}"
for j in "${(@s.:.)help_funcs[$i][2,-1]}"; do
text="${text}${help_tags[${i}${j}]} (${j})"
done
diff --git a/Completion/Commands/_correct_word b/Completion/Commands/_correct_word
index e0fee1fff..46480da47 100644
--- a/Completion/Commands/_correct_word
+++ b/Completion/Commands/_correct_word
@@ -9,6 +9,10 @@
local curcontext="$curcontext"
-[[ -z "$curcontext" ]] && curcontext=":correct-word"
+if [[ -z "$curcontext" ]]; then
+ curcontext="correct-word:::"
+else
+ curcontext="correct-word:${curcontext#*:}"
+fi
_main_complete _correct
diff --git a/Completion/Commands/_expand_word b/Completion/Commands/_expand_word
index b4e22de48..ad334da9d 100644
--- a/Completion/Commands/_expand_word
+++ b/Completion/Commands/_expand_word
@@ -7,6 +7,10 @@
local curcontext="$curcontext"
-[[ -z "$curcontext" ]] && curcontext=":expand-word"
+if [[ -z "$curcontext" ]]; then
+ curcontext="correct-word:::"
+else
+ curcontext="expand-word:${curcontext#*:}"
+fi
_main_complete _expand
diff --git a/Completion/Commands/_history_complete_word b/Completion/Commands/_history_complete_word
index 7867189e8..cc1877911 100644
--- a/Completion/Commands/_history_complete_word
+++ b/Completion/Commands/_history_complete_word
@@ -25,9 +25,9 @@ _history_complete_word () {
direction=older
fi
- zstyle -s ":completion${curcontext}:history-words" stop stop
+ zstyle -s ":completion:${curcontext}:history-words" stop stop
- zstyle -t ":completion${curcontext}:history-words" list || compstate[list]=''
+ zstyle -t ":completion:${curcontext}:history-words" list || compstate[list]=''
if [[ -n "$compstate[old_list]" &&
( -n "$stop" || "$compstate[insert]" = menu ) ]] ; then
@@ -67,14 +67,14 @@ _history_complete_word () {
}
_history_complete_word_gen_matches () {
- if zstyle -t ":completion${curcontext}:history-words" list; then
- if zstyle -t ":completion${curcontext}:history-words" sort; then
+ if zstyle -t ":completion:${curcontext}:history-words" list; then
+ if zstyle -t ":completion:${curcontext}:history-words" sort; then
_description history-words expl 'history word'
else
_description -V history-words expl 'history word'
fi
else
- if zstyle -t ":completion${curcontext}:history-words" sort; then
+ if zstyle -t ":completion:${curcontext}:history-words" sort; then
expl=()
else
expl=('-V' '')
@@ -84,7 +84,7 @@ _history_complete_word_gen_matches () {
[[ -n "$_hist_stop" ]] && PREFIX="$_hist_old_prefix"
local rem_dups
- if zstyle -t ":completion${curcontext}:history-words" remove-all-dups; then
+ if zstyle -t ":completion:${curcontext}:history-words" remove-all-dups; then
rem_dups=''
else
rem_dups='-1'