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
can print commands on multiple lines
#9808
Comments
Hi, I started looking into implementing this, and there are a few things that are needed to be considered, and I would like to hear other poeple opinios on them.
|
The default behavior shouldn't break like this so not a flag. In general we try to make the default behavior good, adding flags is extremely tempting if you don't want to decide, but makes for a poor experience.
If we were to replace, we would escape it like
I don't believe this specific thing is all that useful to pipe so I don't think this is needed. For the most part you'll see Escaping is fine. |
There are a few other placces that print a command string to the user. Some that I found:
As they are not suppose to be parsed by a script, I'm not sure we want to escape them. |
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 thatcase. (A workaround is to use
count (jobs -g)
instead).For example, this returns a count of 2 instead of 1 job:
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).
The text was updated successfully, but these errors were encountered: