8000 `jobs` can print commands on multiple lines · Issue #9808 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

jobs can print commands on multiple lines #9808

@pacien

Description

@pacien

If a command spanning over multiple lines is sent to background, the jobs
command also prints that command over multiple lines in its output. This makes
parsing it harder.

As a consequence, count (jobs) does not return the expected result in that
case. (A workaround is to use count (jobs -g) instead).

For example, this returns a count of 2 instead of 1 job:

> sleep \
    1000 &

> jobs
Job	Group	CPU	State	Command
1	2667403	0%	running	sleep \
1000 &

> count (jobs)
2

It could be nicer to force the content of the "Command" field to stay on one
line.

Fish version 3.6.1 on Linux (NixOS).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0