From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16524 invoked by alias); 7 Nov 2014 10:32:32 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33630 Received: (qmail 26592 invoked from network); 7 Nov 2014 10:32:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=rNpohgiTy/gpUTpP94byHnFDYTwk2+tazj/GoklOZWk=; b=nWQe/weRypYriQoBgy72WbTJgbukTChaZD+3ygUAoM2lafewPyQw3GejmWme5Qv6kw sqjudyc0esMqgjpVyCdLGXa5piu1KqygCxDs/srRnX76IXlsx2lta5XfdH95PudS2pRk AA4D0g6rEnD78w/r25X8gGetHpfopKxgKJRoDUyvCAEqsMNzyX22viSmgTIalXfav92R 0xDzVwHRMJQQdTVcktEwNwx/uM+7YHWzo9zUml4FimqjMS+UOGGHp94cIjUpUEu+aTyP aL3lUv9b9Tx+mO9+OGdyzZAANf2zk2GYcC5jb65G9hFot4ZGjtLVOT1OAN6nHlrB5DOh tKGQ== MIME-Version: 1.0 X-Received: by 10.107.165.19 with SMTP id o19mr11721990ioe.1.1415356344976; Fri, 07 Nov 2014 02:32:24 -0800 (PST) Date: Fri, 7 Nov 2014 11:32:24 +0100 Message-ID: Subject: _expand with dynamic named directories (and other issue) From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 ~[foo]/ with _expand in the completer style currently expands ~[foo] into whatever it expands into, and doesn't enter path completion. It works correctly for ~/ (eg, leaves the ~/ prefix alone). Against my own better judgment I looked at _expand and found out about keep-prefix. Setting that to 'true' indeed fixes the problem I have, but it seems from the description that it should do what I want when set to 'changed' as well. The code in the file doesn't make it clear to me why the [foo] makes a difference. The following is independent of _expand but ~[foo] tab discards the brackets and just does named directory completion on foo, for example expanding to ~foobar if that was a named directory. This may be dependent on glob_complete to some degree, in that i don't get ~foobar from ~[foo] without it set, but other weird things happen instead, for example ~[cvids] turns into ~dl. If anything at this point, I would either expect a / to be added or for it to expand into the full path via _expand. -- Mikael Magnusson