Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Forgetting about compinit with manual alteration of _comps
- X-seq: zsh-users 21267
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Forgetting about compinit with manual alteration of _comps
- Date: Wed, 10 Feb 2016 12:02:38 +0100
- Cc: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ZlGDWDiQQAgXqLEiFaNXxrwhVVRgmR86doNulY0Kwu4=; b=iADRAMBhRRGiueloS/Z/b3GE4mRQoSsRcRRoaRYfnhFaROky3FgXpw1E3yu1PdLG47 Fj/NfdlKPzJX1dmLdE83Doc32aanEHgNp2SjzubJcQRhtPyeZ1z9t/CMOouWtG6HjJsa IuoeY7j/67tA++qknudK1Gny6YmPQi+g9ahVDA0GfMLDNWKLeQ4nRHQrIriUekeqOmac ymHMeP8Be7uIvURZLtUOaCjAejbeAzVOd8I0BVcw5YD/e1uwmH5qO2cWik9xIvUH49T5 V1MSjSRG3GbrSzQeBgCiPQlw/RRkzI8Azq5Qfawmiku4XEXfZkGY9M/3kNkFBG7hsi2W 6Rkg==
- In-reply-to: <CAHYJk3ScBSP5ZoeZ-bJwfjQAGQgMvr34yC52d+rhnPyWH1D00w@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBLufmR3wLZ8mVGpGq1o1DgB8ci3bH3X6cyzbMyEOoZZg__29303.1625486494$1455013779$gmane$org@mail.gmail.com> <20160210092322.GB6339@tarsus.local2> <CAKc7PVDL3XfFmc7h23hjbybJ15k_hc_SZXkM-3WqzFCgOZshVw@mail.gmail.com> <CAHYJk3ScBSP5ZoeZ-bJwfjQAGQgMvr34yC52d+rhnPyWH1D00w@mail.gmail.com>
On 10 February 2016 at 11:32, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> Another thought is designing a plugin interface designed around how
> zsh actually works, rather than bending over backwards to accomodate
> cargo culted code that barely works in the first place.
That's quite true, sadly. Most of the plugins are written very poorly.
One reason for Zplugin to exist, with the debugging functionalities
that are intended to quickly identify a junk plugin. Other thought is
that writing robust zsh code isn't that simple. Let's forget about
possibility of KSH_ARRAYS, which will break probably all plugins.
There are other robustness-demanding options like GLOB_SUBST, where
simple echo ${fg_bold[red]}"Hello"$reset_color will cause problems. I
would create a list of options that would be repeated loudly for green
Zsh programmers. Not that I knew all this myself always, only recently
I discovered that SH_GLOB disables parentheses at parse time. The
point is that flexibility of Zsh can be converted into quality control
tool. Let fresh programmers know just few options (KSH_ARRAYS,
GLOB_SUBST, SH_GLOB, POSIX_IDENTIFIERS, that's only four) and they
will write better code regardless of their will. Plus patterns, which
will allow to leave ABS scripting that utilizes sed, etc. Of course,
this results in {} being all over the place, around
${#every_identifier}, etc. But not quite, when one writes plugin he
can use setopt localoptions and configure zsh according to his needs.
Exposed code would have {} everywhere, resulting in whole
/usr/share/functions/* working with emulate sh.
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author