Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#236350: zsh: _prefix completer broken?
- X-seq: zsh-workers 19548
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Bug#236350: zsh: _prefix completer broken?
- Date: Sat, 6 Mar 2004 23:32:46 +0000
- In-reply-to: <4419.1078596182@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E1AzKUu-0003tz-00@xxxxxxxxxxxxxxxxxxxxxxxxx> <20040306013513.GA25297@xxxxxxxxxxx> <20040306160540.GW19320@xxxxxxxxxxx> <1040306173839.ZM5329@xxxxxxxxxxxxxxxxxxxxxxx> <4419.1078596182@xxxxxxxxxxxxxxxxxxxxx>
On Mar 6, 7:03pm, Oliver Kiddle wrote:
} Subject: Re: Bug#236350: zsh: _prefix completer broken?
}
} > zstyle ':completion:*' completer \
} > _oldlist _expand _complete _match _ignored _approximate _prefix
} >
} > However, 4.2.0-pre-3 never gets beyond trying _approximate.
}
} This is the bug I reported in 17846.
Aha.
} For now, I moved _prefix before _approximate.
I still think the trap behavior is wrong, but as a stopgap we can do this:
Index: Completion/Base/Completer/_approximate
===================================================================
--- _approximate 7 Jan 2002 15:18:19 -0000 1.5
+++ _approximate 6 Mar 2004 23:26:05 -0000
@@ -65,7 +65,7 @@
builtin compadd "$_correct_expl[@]" "$@"
}
- trap 'unfunction compadd' EXIT INT
+ trap 'local _x=$?; unfunction compadd; ((! $_x))' EXIT INT
fi
_comp_correct=1
This won't work in general because (( )) can only return 1 or 0, not
some arbitrary exit code, but it's fine for _approximate.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author