From bedd4cf2c57a89bec8bd98e6ed65082164b69d93 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 8 May 2000 08:44:52 +0000 Subject: make _expand call _complete when called from _expand_word; add ignore-line style to ignore words already on the line (11244) --- Completion/Core/_description | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Completion/Core/_description') diff --git a/Completion/Core/_description b/Completion/Core/_description index 6ee1026bd..9ea478ec5 100644 --- a/Completion/Core/_description +++ b/Completion/Core/_description @@ -29,9 +29,16 @@ zstyle -s ":completion:${curcontext}:$1" matcher match && opts=($opts -M "${(q)match}") [[ -n "$_matcher" ]] && opts=($opts -M "${(q)_matcher}") -if [[ -z "$_comp_no_ignore" ]] && - zstyle -a ":completion:${curcontext}:$1" ignored-patterns _comp_ignore; then - opts=( $opts -F _comp_ignore ) +if [[ -z "$_comp_no_ignore" ]]; then + if zstyle -a ":completion:${curcontext}:$1" ignored-patterns _comp_ignore; then + opts=( $opts -F _comp_ignore ) + zstyle -t ":completion:${curcontext}:$1" ignore-line && + _comp_ignore=( "$_comp_ignore[@]" "$words[@]}" ) + elif zstyle -t ":completion:${curcontext}:$1" ignore-line; then + _comp_ignore=( "$words[@]}]" ) + else + _comp_ignore=() + fi else _comp_ignore=() fi -- cgit v1.2.3