From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20532 invoked by alias); 15 May 2017 08:39:02 -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: 41104 Received: (qmail 22413 invoked from network); 15 May 2017 08:39:02 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl 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(85.128.245.120):SA:0(0.0/5.0):. Processed in 2.349891 secs); 15 May 2017 08:39:02 -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=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at zdharma.org does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new using ClamAV (5) Date: Mon, 15 May 2017 10:24:50 +0200 From: Sebastian Gniazdowski To: zsh-workers@zsh.org Message-ID: Subject: Naive question: how hard are namespaces for functions X-Mailer: Airmail (231) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, writing something sophisticated involves multiple functions. E.g. I have = 47 interactive-mode (not at-startup time) functions in Zplugin, to provid= e things like: % zplugin csearch =C2=A0=23 Search for completions of plugins =5B+=5D is installed, =5B-=5D uninstalled, =5B+-=5D partially installed =5B+=5D =5Flocal/zplugin =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0=5Fzplugin =5B-=5D benclark/parallels-zsh-plugin =C2=A0 =C2=A0 =C2=A0 =5Fparallels =5B-=5D or17191/going=5Fplaces =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0=5Ffavrm, =5Fgoto =5B+=5D psprint/zsh-navigation-tools =C2=A0 =C2=A0 =C2=A0 =C2=A0=5Fn-kill= =5B-=5D tevren/gitfast-zsh-plugin =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =5Fg= it So one can disable/enable selected completions. This is nice, but it hurt= s me that compared to zsh -f, =24functions here are very populated. I hav= e much free time so I invest it in Zsh, from this experience I can theore= tically see Zsh becoming more like e.g. Ruby. Modules can be built outsid= e Zsh source as plugins, I plan to add Oracle DBM module either on Github= or in Zsh upstream, there is the fresh zsh/gdbm module (and it loads in = just 0.43 ms, according to zprof, so modules are good way to go), I also = plan to publish the regex re2 module from Phill as plugin. Then there is = ZUI library, I wrote variable browser (https://github.com/zdharma/zbrowse= ) in 4 hours with it. The point is: there is growing discomfort that =24functions and =24parame= ters tend to get more populated. Database, regex, etc. support can grow, = ZUI applications can grow, but it comes down to single bag for all this, = single namespace. Maybe a namespace support at least for =24functions can be easily added=3F= =46ew ready namespaces: - completions, - autosuggestions plugin =24=7B=23functions=5B(I)=5Fzsh=5Fautosuggest*=5D= =7D =3D=3D 253 - zsh-syntax-highlighting,=C2=A0=24=7B=23functions=5B(I)=5Fzsh=5Fhighligh= t*=5D=7D =3D=3D 250 The point is to make =24functions/functions (builtin) usable again. Like = it probably was 5-10 years ago when one could use =24functions to e.g. fi= nd interactively created functions. Now it's impossible. -- Sebastian Gniazdowski psprint /at/ zdharma.org