From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9648 invoked by alias); 6 Jan 2011 06:07:37 -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: 28575 Received: (qmail 5666 invoked from network); 6 Jan 2011 06:07:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Thu, 6 Jan 2011 01:07:09 -0500 (EST) From: "Benjamin R. Haskell" To: "Alexey I. Froloff" cc: zsh-workers@zsh.org Subject: Re: [PATCH] Completion/Unix/Commands/_ri: updated for Ruby 1.9.2 In-Reply-To: <20110106003014.GA11154@altlinux.org> Message-ID: References: <1293748882-3197-1-git-send-email-raorn@altlinux.org> <20110104113222.GA7499@altlinux.org> <20110106003014.GA11154@altlinux.org> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII On Thu, 6 Jan 2011, Alexey I. Froloff wrote: > On Wed, Jan 05, 2011 at 04:27:35PM -0500, Benjamin R. Haskell wrote: >> Maybe it makes sense, but it seems weird that the tests are >> conditioned on running Ruby scripts rather than looking at `ri >> --version`. > ri --version reports something weird. I don't know since when things > were changed, checking for modules that have been removed or added > seems to be fair enough. > > Are you thinking there's too much (and too direct) ruby invocations? Yes, that was the concern. I guess it's not really that much. The repetitive portion that keeps the arguments that the user has already passed: ${(kv)opt_args[(I)-d|--doc-dir|...etc...]} made me think at first glance that there was more coding than there actually is. >> And how does this fare against different Ruby implementations? Would >> JRuby 1.9.2 necessarily use the same 'ri' conventions as MRI Ruby >> 1.9.2? > Yes. Latest JRuby supports both 1.8 and 1.9 Ruby versions and have > copies of standard runtime libraries (both versions) which includes > RI. Okay. (Didn't know whether Ruby implementations had different arguments [ala C++ compilers].) >> And more generally, since it's looking in directories that would only >> contain Ruby documentation, would it hurt to include both .yaml and >> .ri for versions that support .ri? > I thought about it, yes. Newer RI doesn't read .yaml documentation. > It wouldn't hurt, but it would complete something that can't be shown. Saynomore. I was in the process of trying to install 1.9.2 alongside 1.8.7 on my Gentoo machine, so I couldn't check as much: if the newer version can't read it, it makes sense to not show it. > This patch will un-break ri completion for latest stable MRI Ruby > version. I wrote this completion and I am responsible for that. Was still broken for me until I added the patch that I just sent. > However, I am not satisfied with current implementation, I'm working > on it. Out of curiosity, what don't you like at this point? -- Best, Ben