Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: have '&' automatically disown?



On 7 February 2010 22:06, Greg Klanderman <gak@xxxxxxxxxxxxxx> wrote:
>>>>>> On February 7, 2010 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
>
>> If you start going looking for them you'll still find them.
>
> Certainly not the end of the world...
>
>> I don't know if that's good enough for your needs or not.
>
> nohup + nocheckjobs does most of what I care about I guess.
> I just noticed the later before starting this thread.
>
>> I can well believe all of this, but it's not clear to me why its
>> relevant.
>
> Because if I turn monitor back on I can completely wedge my shell.
>
>> If it means you still need job control to work continuously, then
>> certainly turning off "monitor" isn't an option.
>
> I don't actually want to use job control on the jobs started while
> monitor was off, but since they are still there, chances are I will at
> some point shoot myself in the foot.
>
> Would it make sense to just auto-disown when monitor is off?

This will probably get really annoying quickly...

_self_insert() { [[ ! -o monitor && $KEYS = '&' ]] &&
RBUFFER=!$RBUFFER; zle .$WIDGET; ((CURSOR++)) }

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author