[ANN] release: a "which" command written in ruby--very useful forwindows users at least

Discussion in 'Ruby' started by Roger Pack, Aug 17, 2009.

  1. Roger Pack

    Roger Pack Guest

    Announcing the release of "ruby which"[1]

    Ruby-which is the linux "which" command re-written in ruby [and

    -- An executable locator (which command) for windows that actually works!

    There seems to be a lack of a "which" command for windows that
    actually work--they sometimes skip batch files entirely [batch file?
    what's that?] or don't list extensions, leaving you in doubt. Despite
    running "which yyy" you never know what you're really running when you
    next run yyy in the command line--is it yyy.exe or some other yyy.bat
    that wasn't reported by "which"?

    Try it--you might really like it.

    To install:

    C:\>gem install rogerdpack-whichr

    C:\>whichr executable_name_here [extension can be included, but is optional]


    C:\>whichr ruby
    higher in the list will be executed first

    Feedback welcome rogerdpack on github/gmail
    [1] not to be confused with this

    Also Related: http://github.com/Pistos/ruby-which -- this library
    discovers the location of installed ruby libraries, i.e. which gem
    folder they're in
    "C:\>rwhich ruby-which

    Roger Pack, Aug 17, 2009
    1. Advertisements

  2. Roger Pack

    Eric Hodel Guest

    $ gem which fileutils
    $ gem which nokogiri
    (checking gem nokogiri-1.3.2 for nokogiri)
    # incidentally, it's TTY smart:
    $ gem which nokogiri | cat
    Eric Hodel, Aug 17, 2009
    1. Advertisements

  3. Roger Pack

    Roger Pack Guest

    $ gem which fileutils
    Nice. I've noted the usefulness of "gem which" in the README file now.

    Also have updated whichr to v 0.1.2 now to incorporate a few of Alexey
    Borzenkov's suggestions.

    respect's ENV['PATHEXT'] now on windows

    Roger Pack, Aug 18, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.