Skip to content

jcoglan/claw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claw

Installation

sudo gem install hoe claw

Usage

spec = Oyster.spec do
  name "claw -- search and open files"
  author "James Coglan <jcoglan@googlemail.com>"

  synopsis "claw DIRECTORY -c EDITOR"

  description <<-EOS
    claw gives you a handy way to search your filesystem and open files using
    any program you like. I wrote it to help me edit large projects in gEdit,
    but you can use it for other things too, including opening files in a browser
    or running them using your testing tools.

    To start a claw session, we need the directory to search and a command to
    open files with. Some examples:

      claw . -c gedit
      claw features -c cucumber
      claw public -c firefox

    This starts a terminal session that provides commands for querying the
    filesystem in the directory you've chosen. Commands begin with a colon
    followed by a single letter and any arguments the command expects.

    Commands are:

      :f -- searches by filename, using a fuzzy match on each
            file's basename.

      :t -- searches by text by shelling out to `grep` and using
            the supplied pattern to find matching files.

      :c -- changes the command, e.g. ":c firefox" tells claw to
            use Firefox to open files you select.

      :q -- quits claw, returning you to your shell.

    The search commands print lists of numbered search results; typing a number
    into the terminal opens the corresponding file from the most recent search
    using the current file-opening command.
  EOS

  string :command, :desc => "Command used to open files"
end

License

(The MIT License)

Copyright © 2009 James Coglan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Command-line tool for searching and opening files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages