-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add --passive option for backgrounding #25
Conversation
Maybe --background would be a better name, then? Good catch. btw on OS X i get somewhat different (still broken) backgrounding behavior from the unpatched version: it immediately pauses, then foregrounding shows |
(I should have mentioned I'm on Arch Linux and Ruby 1.9.3) |
Yeah, good point. There's a similar terminological knot around the Maybe Hopefully I'll be more clever after a cup of coffee. |
I suppose |
--deaf ? |
Since we're clearly having trouble describing this option, here's another thought: Auto-detect whether the process was backgrounded. Not sure how that could be done - but perhaps there's some check on |
http://www.unixguide.net/unix/faq/3.7.shtml I think I have tty-detecting code in Wrong somewhere... |
Hmph. On OS X, in a backgrounded process, STDIN.tty? returns true. Back to |
Same on my Linux machine, which kinda makes sense because it's still attached to the terminal - what we want is to determine whether we're running interactively, which I haven't found a solution for yet. |
I looked into Highline, which reportedly [1] was the cleanest way to do this, and found that a recent commit [2] inadvertently removed the feature [3]. [1] http://stackoverflow.com/questions/174933/how-to-get-a-single-character-without-pressing-enter/3983726#3983726 |
I kinda need this in a sorts, when I open up a Pry session in the middle of a live HTTP session the polling for c, r and other friends makes it impossible to work with Pry (not to mention the fact that I can't use c and r without the system assuming I want to restart,) so much so I had to program my own watcher even though I would rather work with Rerun because it probably thinks about stuff I don't care about (I just kill everything and restart it.) Just an option to entirely disable the c, r and other polling would suffice to making this happy, edit: or... maybe you could do like Guard did and integrate with Pry (not saying it's a great idea but who wouldn't love a side debugger to test things out quickly) and just make c, r and others commands inside of Pry. |
👍 I started to use rerun in a proof of concept project and it works great but I feel the same pain as @envygeeks. Is there a chance that this will be merged at some point (no rush, I can use the fork for now)? 😄 |
Yeah, I'll take care of it today. |
add --passive option for backgrounding
I think I will go back to |
Sounds good - done > perfect etc. |
Didn't want to rush you, but thanks! :) 👍 |
It was my pleasure. I've been learning iOS and working in Ruby for a few hours was a welcome relief. I'll push it as soon as RubyGems.org is back online (see http://news.ycombinator.com/item?id=5139583 ). |
It appears rerun doesn't like to be backgrounded:
Presumably that's happening within the
key_pressed
method when attempting to read STDIN.Thus this new
--passive
option* disables the on-the-fly commands entirely.* not sure whether
-b
is a good short variant, but-p
was taken