zsh-workers
 help / color / mirror / code / Atom feed
From: "Benjamin R. Haskell" <zsh@benizi.com>
To: "Alexey I. Froloff" <raorn@altlinux.org>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] Completion/Unix/Commands/_ri: updated for Ruby 1.9.2
Date: Thu, 6 Jan 2011 01:07:09 -0500 (EST)	[thread overview]
Message-ID: <alpine.LNX.2.01.1101052337490.2792@hp> (raw)
In-Reply-To: <20110106003014.GA11154@altlinux.org>

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


  reply	other threads:[~2011-01-06  6:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30 22:41 Alexey I. Froloff
2011-01-04 11:32 ` Alexey I. Froloff
2011-01-05 21:27   ` Benjamin R. Haskell
2011-01-06  0:30     ` Alexey I. Froloff
2011-01-06  6:07       ` Benjamin R. Haskell [this message]
2011-01-06  6:01 ` [PATCH] Completion/Unix/Commands/_ri: missed format change Benjamin R. Haskell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.01.1101052337490.2792@hp \
    --to=zsh@benizi.com \
    --cc=raorn@altlinux.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).