[Rubygems-developers] Suggestions regarding new CLI

Chad Fowler chad at chadfowler.com
Sun Jun 20 06:31:46 EDT 2004



On Sun, 20 Jun 2004, Gavin Sinclair wrote:

# I'm playing with gem2 currently and have some observations and
# suggestions.  (I'm writing 'gem' instead of 'gem2'.)
#
#
# 1. The output of 'gem --help' is rather busy.  I recommend this instead
#    (indented only for clarity here):
#
#         Usage:
#           gem <command> [options]
#
#         Examples:
#           gem install -n log4r
#           gem install -n log4r --version '> 1.0.5'
#           gem query -n log
#           gem build -n example.gemspec
#
#         Further help:
#           gem --help install etc.          (help on specific command)
#           gem --help-commands              (list all commands)
#           gem --help-options               (help on common options)
#           gem --help-examples              (many examples of usage)
#
#         Further information:
#           http://rubygems.rubyforge.org
#

Looks OK to me.

#
# 2. 'gem --version' should work like a normal command line app.  My
#    preference is to do what --rubygems-info does currently.
#
#    Oops, it does work, but it's not documented anywhere, and it
#    doesn't return anything useful.  At the moment, it displays
#    'gem2 1.8.2'.
#
#

Is that the ruby version?

# 3. 'gem install log4r' is far preferable to 'gem install -n log4r'.
#    The same goes for all or nearly all other commands.  In cases like
#    this, 'log4r' is not an *option*, it's part of the command.
#
#

I agree with that.  I assumed it was because it was difficult to parse
that way.


# 4. 'gem -h' does not work.
#
#
# 5. The options --force, --gen-rdoc, and --test should accept inverses
#    (as in --no-force, etc.).  Currently --install-stub and
#    --no-install-stub are separate commands, rather than two sides of
#    the same one.
#

I'm not sure I agree about --force, but generally it's probably good to do
this.

#
# 6. Since --run-tests has been abbreviated to --test, --gen-rdoc could
#    become --rdoc.
#

Agreed.

#
# 7. I think --search and --list were a useful pair and it's a shame to
#    see them collapsed into 'query'.  I commonly ask for all gems
#    starting with a particular letter, and it's not obvious that I
#    should use a regular expression to achieve this.  Nor is it
#    desirable.
#

The regex thing is a side effect of the simple way we've done matching.
You're probably right.

#
# 8. This appears in the output for 'gem --help uninstall':
#
#       -v, --version VERSION            Specify version of gem to install
#
#    Note the typo.  I don't know whether this is merely superficial.
#

I may be too jet lagged...what's the typo?

#
# 9. Commands should be able to be abbreviated.  This can be either by
#    specifying abbreviations like CVS does (e.g. commit -> ci), or by
#    allowing unambiguous commands (q, qu, que all resolve to query).
#


I prefer abbreviations, but generally aggree that would be a nice feature.

#
# Most importantly, I think gem2 should not replace gem (and therefore
# should not be released) until these things are sorted out and the
# proper documentation (on the wiki) is in place.
#

That was the plan.  If I have time in Germany (where I"ll have net
access), that's the kind of stuff I was going to work on leading up to a
release.

# When this new UI is released, I'm guessing it will be version 0.7.
# Until then, we should just release 0.6.2 etc. containing the bug
# fixes.
#
# Cheers,
# Gavin
#
# _______________________________________________
# Rubygems-developers mailing list
# Rubygems-developers at rubyforge.org
# http://rubyforge.org/mailman/listinfo/rubygems-developers
#


More information about the Rubygems-developers mailing list