Git Product home page Git Product logo

restart's Introduction

Restart

On MS Windows, restart runs your shell command, then re-runs it any time filesystem change is detected.

EXAMPLE: restart ruby test.rb

This will run ruby test.rb, then re-run it after the test.rb file changes (or any other files change in current working directory or any subdirectories under it).

Installation

gem install restart

It is highly recommended that you also install the wdm gem, which enables listen to receive filesystem event notifications from Windows instead of polling the filesystem for changes:

gem install wdm

Usage

restart [options] <your shell command>

OPTIONS:
  -d, --dir DIR[,DIR...]       Directory tree to watch for filesystem changes.
                               Examples:
                                 restart -d app rackup
                                 restart -d .,../test,../lib rake test
                                 restart -d .,../test -d../lib rake test
                                 restart -d . -d ../test -d ../lib rake test

  -f, --file EXT[,EXT...]      Only watch files with given extension, plus files
                               with matching name that do not have an extension.
                               Examples:
                                 restart -f Rakefile rake
                                 restart -f rb ruby test.rb
                                 restart -f rb,yml ruby app.rb
                                 restart -f rb -f yml ruby app.rb

  -i, --ignore REGX[,REGX...]  Ignore file paths matching regular expression.
                               Examples:
                                 restart -i \.pid$,\.coffee$
                                 restart -i \.pid$ -i \.coffee$

  -c, --clear                  Clear screen between each run.
  -e, --explain                Show current values for all options and quit.
  -v, --version                Display version and quit.
  -h, --help                   Display this help message and quit.

restart's People

Contributors

vais avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

billiam

restart's Issues

How target just a single file?

I'm not clear as to how to just target a single file.

I have ~/app.rb that I want to run in the terminal every time it is saved. No subdirectories, nothing else. Just that file. From the docs it seems -i but the regex for "all subdirectory files" is unclear. I'm also seeing .rvm/ trigger the item.

Any insight appreciated. Cheers

Win32api ctrl_c call kills restart process

The restart process itself is being killed in my environment when the win32api console control event is triggered:

ctrl_c = Win32API.new('Kernel32', 'GenerateConsoleCtrlEvent', 'II', 'I')
...
ctrl_c.call(0, 0)

Commenting the call out allows the backup process.kill to be used instead, and then works as expected.

Not sure what the fix for this should be, or if it's unique to my environment (ruby under mingw32).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.