Skip to content
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

Exec inside a function does not work #5449

Closed
faho opened this Issue Dec 30, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@faho
Copy link
Member

faho commented Dec 30, 2018

$ function ouch
     exec fish
 end
$ ouch
There are still jobs active:

   PID  Command
     0  ouch

as described by @scorphus on gitter, and oh-my-fish/oh-my-fish#664.

This is caused by us checking for running jobs before doing exec now (1b1bc28), in conjunction with the hierarchical job changes.

I think we might just get away with warning only with background processes (i.e. those where is_foreground() is false). @mqudsi?

The obvious question is if this is important enough to warrant a 3.0.1, or a quick 3.1.

@faho faho added the bug label Dec 30, 2018

@faho faho added this to the fish-3.1 milestone Dec 30, 2018

@faho faho closed this in b007248 Dec 30, 2018

@mqudsi

This comment has been minimized.

Copy link
Contributor

mqudsi commented Dec 30, 2018

I would say if you publish now, it's a quick 3.0.1. If you put it off, it might become a 3.1.

@JamesMcMahon

This comment has been minimized.

Copy link

JamesMcMahon commented Jan 10, 2019

I would second that as this will keep me from upgrading to Fish 3 due to it completely breaking OMF.

The issue behavior described in oh-my-fish/oh-my-fish#664 is not a great user experience:

Yah, iterm2 hangs on startup macOS after updating to fish 3.0.0 with OMF 6.0.

@zanchey zanchey referenced this issue Jan 12, 2019

Closed

fish 3.0.1? #5520

7 of 7 tasks complete

@floam floam modified the milestones: fish 3.1.0, fish 3.0.1 Jan 14, 2019

ridiculousfish added a commit that referenced this issue Jan 20, 2019

ridiculousfish added a commit that referenced this issue Jan 20, 2019

ridiculousfish added a commit that referenced this issue Jan 20, 2019

Only warn on exec for background jobs
If it's a foreground job, it is related to the currently running exec.

This fixes exec in functions, i.e.

    function reload
        exec fish
    end

would previously always ask about the "function reload" job.

Fixes #5449.

Fixes oh-my-fish/oh-my-fish#664.

ridiculousfish added a commit that referenced this issue Jan 20, 2019

ridiculousfish added a commit that referenced this issue Jan 20, 2019

@ridiculousfish

This comment has been minimized.

Copy link
Member

ridiculousfish commented Jan 22, 2019

This went into 3.0.1 as 60ced5d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.