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

jobs -l seems to always return 1 #6104

Closed
PhilLavoie opened this issue Sep 10, 2019 · 1 comment · Fixed by #6105
Closed

jobs -l seems to always return 1 #6104

PhilLavoie opened this issue Sep 10, 2019 · 1 comment · Fixed by #6105
Labels
bug Something that's not working as intended
Milestone

Comments

@PhilLavoie
Copy link

Environment

fish: 3.0.2
OS: Ubuntu 18.04

Description

When using the -l switch with the jobs command, it seems that one always has a status code of 1, regardless of if there is or isn't a background job.
I would expect it to be 0 when there is at least one background job, as described here: https://fishshell.com/docs/current/commands.html#jobs

How to reproduce

> sh -c 'env HOME=$(mktemp -d) fish'
Welcome to fish, the friendly interactive shell
> sleep 20 &
> jobs -l
Job	Group	CPU	State	Command
1	27183	0%	running	sleep 20 &
> echo $status 
1
@zanchey zanchey added the bug Something that's not working as intended label Sep 11, 2019
@zanchey zanchey added this to the fish 3.1.0 milestone Sep 11, 2019
@zanchey
Copy link
Member

zanchey commented Sep 11, 2019

Yes, I see this in current master as well.

zanchey added a commit to zanchey/fish-shell that referenced this issue Sep 11, 2019
zanchey added a commit to zanchey/fish-shell that referenced this issue Sep 11, 2019
mqudsi pushed a commit that referenced this issue Sep 14, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants