From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18738 invoked by alias); 10 Dec 2016 02:57:01 -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: X-Seq: 22179 Received: (qmail 9049 invoked from network); 10 Dec 2016 02:57:01 -0000 X-Qmail-Scanner-Diagnostics: from nm23-vm1.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.82.97.16):SA:0(0.0/5.0):. Processed in 1.802315 secs); 10 Dec 2016 02:57:01 -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=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.97.16 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1481338227; bh=QdcV6FRRCfOS+IUIepUEV836xJi6NI1+xx3uR9qhm/w=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=ZkFOWYemPqdHDb8M4cbPEeln35ntE8YpCwnL9i26T8RuwDlgCzbCwG8qJEslIMCvdEmUsb5VBRGI6uZ3URU1k6JDA+XtFmu2Zfy8Wl6zgQC6PpYz3NWgIJjhzcn3hi8bEOL5Z0PQrA1eXOSK1BMLuc6nsbJj3aEvlN5LSJN8neiBe4WTTRcRtiJOVnupSlSSYPU+Lo5CmUwuwAGEAfoKtm6C+bddcatHoGcDuZhJ+ug+7E/w+pqrH9/x4+kWfOAKUVNB0kDO9Ez/M0g1z34I2h2opgmFCR9F8Z3AFPEIBVh8R3sWUn9Ldc65Xg1TDtfluFeVqwd2A0vJn1exLFnOhA== X-Yahoo-Newman-Id: 544269.74885.bm@smtp116.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: E_BTDGAVM1mJIy2Aw.pPiZ9hiZpM4COhIPQzvheSPgQgy2D OIhU_4dCHOyk_MSFi8jPWItdWhG6qx.TdLyWnW.EeRn49tHq5_SPnGpEYQcg adOdQ.kNnhi33AGJJWaMbXyPaEecYGBkVzhlRg8Euewo.fdwDz.4jzkoYtko LlC32ioP_DiROqWPMeC77_k67DwnBMAPKzPlckcKCuZFeLglrfAUeeKh8lh5 5mp9svGDWeyHeyfdtvpvQZXwZUOmwuLcpiqh464nFu_Bu4jV5JZG3mRKu6J5 c8avtFEmj78wleQ.m25eRoijeskJwhk3k0wxTn30cDUqb_mUI6Az3VRsRLMR WNv4fWgz95K_q0ML84wQ4IPjv5werWI839Qpx5aXiNfwNhb4TuXEd0FXbequ dcMZhJasPsFejOdU1PuxTZGK7.tlL.iY7HMJEckD0aYiAIXyZUkweDs360V2 CjL6i1BXr2KbJCvbeuYyvPfXKTSRWYgmAJGe7D.VD_57jGkABxa8L5UW0Nzs QRf_71ilNDL.luUHTMweNhXUNs5lAUzz5FnY6ZIiy X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <161209165454.ZM9226@torch.brasslantern.com> From: Oliver Kiddle References: <20161209122958.GD19559@256bit.org> <57127.1481294647@hydra.kiddle.eu> <584AC8AC.9050406@eastlink.ca> <62522.1481300922@hydra.kiddle.eu> <584AEDBF.2050402@eastlink.ca> <161209165454.ZM9226@torch.brasslantern.com> To: zsh-users@zsh.org Subject: Re: off topic MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <95361.1481338226.1@hydra.kiddle.eu> Date: Sat, 10 Dec 2016 03:50:26 +0100 Message-ID: <95362.1481338226@hydra.kiddle.eu> Bart wrote: > I've had the below kicking around for a while, was planning to post it > after 5.3 was out but might as well offer it for comments. This is > It's also designed to be source-able at any point either before or > after the user's own zstyles without stomping on anything. Rather than a source-able file, would it perhaps make sense to embrace the concept of plugins. It's a concept that people are familiar with from other software. With vim for example, it is common to have a list in .vimrc, e.g: call plug#begin('~/.vim/plugged') Plug 'surround.vim' Plug 'tommcdo/vim-exchange' ... The various existing zsh plugin managers are similar. One well known plugin named sensible.vim is similar to what you posted: defaults everyone can agree on. I think it also tends to result in better maintained plugins when people keep their own plugin in their own github area vs. an omz pull request and then assuming that the omz people will look after it thereafter. As a first step, we could add an Etc/plugin-guide file to outline conventions such as how structure a plugin, use of add-zsh-hook, how to avoid trampling on the rest of the user's setup. default_zstyle could perhaps be included in Misc (or added as an option to zstyle). Name of path variable which is used when searching for plugins, etc. The omz convention seems to be a single file with the extension .plugin.zsh which is sourced but there may be more to it than that. We also need to think about the order in which commands are run. We could include a rudimentary plugin manager. So people would do something like: autoload -U pluginit; pluginit plug zsh-syntax-highlighting plug zsh-viexchange Or they could continue using zplugin or whatever else if they want fancy features like coloured github updates. And if we've kept things simple, it could work to just source a single file for a plugin. Finally, we could include the odd plugin in the distribution for anything which could be considered fairly core - such as the sensible defaults plugin. > default_zstyle ':completion:*' matcher-list '' 'r:|[-._,]=** r:|=**' \ > 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._,]=** r:|=**' \ > 'r:|[-._,]=** r:|=** l:|=*' Given correction, _approximate and this, it ends up fairly aggressive in changing what was typed. I'd take something more conservative. Perhaps just lower -> upper case matching and r: stuff with a limited set of tags. You have to know that the r: stuff is there to use it except when it does unexpected things. On the completer, I'd sooner have _oldlist in and skip _correct. _extensions is fairly harmless too. If _approximate is included, we should allow for mistyped prefixes: zstyle ':completion::approximate*:*' prefix-needed false The part I probably would object most to is the ugly inclusion of the word "Completing " in the completion headings :) > default_zstyle ':completion:*' format '%BCompleting %U%d%u%b' I just use %B%d%b Oliver