From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8984 invoked by alias); 2 Jun 2016 05:43:00 -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: 38568 Received: (qmail 22081 invoked from network); 2 Jun 2016 05:42:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=VLLtQe3K19q2xbUSVIKzq8OoPerzyZk3GSAUkK2Nq8c=; b=w4fiIasLXhkk6xWD1W1bSIdOtQgWvwJZHiTapRA6z5O1ZqI4mlfr+Ueb964fIHCIVI ls5Vzp/dqDaCUpay6E7aUs9hIegZd7mOcQ784mT3WiyHoVxyen7f9ccLtEwUY9Cij/da ugdK7llUm4R8gYmYvL81pDNKHlq586fOtKNxjutXZNUDMZc/iawkw6QDg4p5sowOX37G 1Ehw5cVKzzcw32Reke8lS3rs2Sf+9WbK97N8rC6RXWEUuPtq9vd9erL6uMjQvPhI0LQ9 XjZtftTvFpYGEAO2l4AQ64i7m7Ez546CpbbEibe/arIXJ6DctLNtjJ43ZQj3K11p4XBo t9MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=VLLtQe3K19q2xbUSVIKzq8OoPerzyZk3GSAUkK2Nq8c=; b=B2bxsb00Cn1TEchOgo4yxZ/JpRCwoCod8njsefu2a9eOYkX7d1sxeL4clSPm2Xr+d+ o6KSoiGxsBkY8Cfsk2eeMZxcrC9IZlTo3OYfEQnhPHbfitHzojVwAs7BrMbcfd/X0E4g x2RlTF4xtj8F6qZj5GRwtUxrz+xsrDXZdSAe8NHN0WT5x4ieaMx70IYPq2KqEBDhbXxP eCbmvaD51eFe0qQNGD9Jp4+tX8ZFnL75j8aug+G8CRKgFqwoxyqj+QvGADN7B4cemhUh dogatW0d47DY0upVC9MhTySUWbTdJshHAElIeaORomu/EC+P0PXbu7Zs4GP6l5DSePXF fIAA== X-Gm-Message-State: ALyK8tKfHuJKgmEWvOrSTZt4j1Qq1uqof52HLnLqmHKlDidQcxL/SU0KUrmQOUquHLMe4g== X-Received: by 10.98.27.215 with SMTP id b206mr1162597pfb.61.1464846178847; Wed, 01 Jun 2016 22:42:58 -0700 (PDT) From: Bart Schaefer Message-Id: <160601224256.ZM14537@torch.brasslantern.com> Date: Wed, 1 Jun 2016 22:42:56 -0700 In-Reply-To: <20160519211428.GA14104@tarsus.local2> Comments: In reply to Daniel Shahaf "Re: Feature request: readline's completion-prefix-display-length option" (May 19, 9:14pm) References: <5738124C.7020705@topbug.net> <20160519211428.GA14104@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: Feature request: readline's completion-prefix-display-length option MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 19, 9:14pm, Daniel Shahaf wrote: } Subject: Re: Feature request: readline's completion-prefix-display-length } } Deviously clever solutions aside, isn't this exactly what the -d option } to compadd is for? I imagine prior to calling compadd, the following } preprocessing could be invoked: } } if -d not passed: } argument_to_-d = argument_to_-a } for each element of argument_to_-d: } if this element starts with ${PREFIX} } replace the first ${#PREFIX} characters with an ellipsis } } However, I'm not sure where this preprocessing should be invoked from. It'd have to be internal to complete.c:bin_compadd in order to be foolproof; there are too many variations on how to pass in the list matches to make it feasible to do in shell code: literal lists of words, names passed to -a, subscripts on names passed to -a, etc.