From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 52ec71a4 for ; Sun, 29 Sep 2019 16:45:20 +0000 (UTC) Received: (qmail 12912 invoked by alias); 29 Sep 2019 16:45:10 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24311 Received: (qmail 9177 invoked by uid 1010); 29 Sep 2019 16:45:10 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f50.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25580. spamassassin: 3.4.2. Clear:RC:0(209.85.167.50):SA:0(-1.9/5.0):. Processed in 1.956295 secs); 29 Sep 2019 16:45:10 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.50 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jFYdqsJlr2nvrYj42XSotV3py1xFcZC1lx0bYUqXTS0=; b=z1pxAgDZvI/GfBzlfMhAU/0JEJshqqxT3bGyzh+gdxszntq+y6wLFSIbrwYmxvv79C CP6s3T/Gbs2otJSNoCxNwtvIVm1WfqUYhi6EdJfvZYItKuMRvlyOsEp9BE5zRQNqzf+I MbLQ5ruyeWcY/bawMMuOz2SRrZmmzdc0M17aB8bpDC+QM/0n6bNiKkjli2XO4ZxyRwey bgjXECkl2Os7YwbmqmNobq60Zr4ymwkwnHW68ReAZrx5umO6i3EQ581C0ehh3FpE8job DHUyiIFO6vI2OAFzz8a0eCdXzsA/DFnk2xNX3EF7L1/XLTnecDyV3fPHE7+9Wf/l/xBR 2oeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jFYdqsJlr2nvrYj42XSotV3py1xFcZC1lx0bYUqXTS0=; b=GrISLPA6FXMcZ6Yt+/uxadZUhxxziHoLubTMHQCH43RvNo32BsP3I3PIu8zVC5Lgzu WEA5QlZ2c1cJ9GdFIBwdZjb7OIfq3weUyB96lOEcWyB6OKCYk8UZOnJXGLa5lplOxBeL S4fRsN7lplXkLyzGULWRxteZT828CxSFU4hpBUXWMQgPclRKMQD6msiYOuGp95HU0jI1 Gdkjy0pFe04L4wOthlNo4pOJkRhGqO9cmDSVsHwgcGFVW/7MdKZ7WAf9NOVyucFvLaEK +ifiP+0mhrctdeDUSsIile7OMdTTKbWkmBQGBI6mW3Y2aoPYhNbU4/ZI1BSDoLJZnfgr 9uQg== X-Gm-Message-State: APjAAAWc+QLrXwVd04mj0JJwbbcbhJ22Kj2s8/eEl5fBlqQw34hqLpjl 8ezicGE2P4GIunQhXh0MFxGW7xeFt73Uvqi+HStXyQ== X-Google-Smtp-Source: APXvYqxMEFKFJoo1pGRr8mWuaz36Oavtn7aOLwc6Qa6X3g2k1h1B1rEj99NFX7joYqG9MAhX1omiMv1TPJBDoSo9Z0k= X-Received: by 2002:ac2:5e9e:: with SMTP id b30mr8762528lfq.5.1569775472509; Sun, 29 Sep 2019 09:44:32 -0700 (PDT) MIME-Version: 1.0 References: <306325bb-395d-a16b-a771-0786c23cb46e@eastlink.ca> <8ef96620-e762-d52c-207f-c3ac5620879f@eastlink.ca> <9EEEB6F5-9B9C-4C8E-8593-4917F8AF79DF@dana.is> <486df91b-8c6c-b129-2538-15e4d6126eb9@eastlink.ca> In-Reply-To: <486df91b-8c6c-b129-2538-15e4d6126eb9@eastlink.ca> From: Bart Schaefer Date: Sun, 29 Sep 2019 09:44:20 -0700 Message-ID: Subject: Re: completion is over thinking things. To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Sun, Sep 29, 2019 at 8:30 AM Ray Andrews wrote: > > ... probably half of that stuff is redundant or useless or harmful or > whatever and I don't even know where it came from. "I don't know half of you half as well as I should like, and I like less than half of you half as well as you deserve." Really though, there's nothing bad or alarming in there. This is the one you want to change: > # Original: zstyle ':completion:*' completer _complete _match _approximate > zstyle ':completion:*' completer _expand _complete zstyle ':completion:*' completer _expand _complete _files Note that this only makes completion fall back to _files when nothing else matches; if _expand or _complete finds something, you won't get file names. If you want file names all the time, mixed in with other results, you'll have to write a custom function. The simplest such function might look like: _complete+files() { _alternative 'normal::_complete' 'files::_files' } zstyle ':completion:*' completer _expand _complete+files I would not recommend doing this unless you also keep using the display configuration below (specifically the group-name style), otherwise the way things get mixed together will be too confusing. As written, this also has the drawback that even if _complete already returns file names, _files will add them a second time anyway. > # allow approximate > #Tab completion should be case-insensitive. > # Original: zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' > zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' That's doing what the comment says, it makes completion case-insensitive. It also allows dots, underscores, and hyphens to fill themselves in. > zstyle ':completion:*' auto-description 'specify: %d' > zstyle ':completion:*' format 'Completing %d' > zstyle ':completion:*' group-name '' > zstyle ':completion:*' list-colors '' > zstyle ':completion:*' list-prompt %SAt %p: Hit TAB 'for more', or the char to insert%s > zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s Those are all about what the display looks like. > zstyle ':completion:*' use-compctl false That says not to fall back on the old built-in completions if the compsys functions fail. The rest of what you had is reasonably obvious, I think. The kill-specific styles are from a zsh-users post a few years ago.