-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
- Fish version:
fish --version
echo $version
fish, version 3.5.0
3.5.0
- OS: MacOS Monterey, 12.4
- Terminal: Terminal.app (MacOS default terminal)
Hi! Thanks for fish. I really like it. 馃悷
After upgrading to fish v3.5.0, after stopping foreground jobs (e.g. ctrl-z) such as vim or less, two empty lines are printed before the prompt shows.
Example:
sklirg@box:~
鉃 less foo
fish: Job 1, 'less foo' has stopped
sklirg@box:~
鉃
After digging a bit, it seems like 32ed0b8 (the fix for #8817) might be the culprit, at least running fish --debug='*' prints out two empty lines in the middle of the output after stopping the job (less foo + ctrl z):
...
proc-internal-proc: Created internal proc 7 to write output for proc 'string'
iothread: enqueuing work item (count is 1)
iothread: notifying thread: 0x100d3c580
exec-job-exec: Executed job 0 from command 'string repeat \n --count=(math (count (fish_prompt)) - 1) >&2'
proc-job-run: Run job 0 (string repeat \n --count=(math (count (fish_prompt)) - 1) >&2), UNCOMPLETED, INTERACTIVE
topic-monitor: TID 1 local 0,21,6 : current 0,21,6
topic-monitor: TID 1 becoming reader
iothread: pthread 0x16f753000 got work
proc-internal-proc: Internal proc 7 exited with status 0
I searched for the string repeat code and saw it was changed between v3.5.0 and v3.4.1, so I tried downgrading to v3.4.1 and it works as expected there.
Furthermore, executing the referenced (changed) function directly in the shell (with some dummy variables) produce different output between the versions:
sklirg@box:~
鉃 fish
sklirg@box:~
鉃 fish --version && echo $version
fish, version 3.5.0
3.5.0
sklirg@box:~
鉃 fish_job_summary 1 1 3 4
sklirg@Magla:~
鉃 /usr/local/bin/fish
sklirg@box:~
鉃 /usr/local/bin/fish --version && echo $version
fish, version 3.4.1
3.4.1
sklirg@box:~
鉃 fish_job_summary 1 1 3 4
sklirg@box:~
鉃
Downgrading to v3.4.1 also solves the issue with two blank lines before the prompt:
sklirg@box:~
鉃 /usr/local/bin/fish --version && echo $version
fish, version 3.4.1
3.4.1
sklirg@box:~
鉃 less foo
fish: Job 1, 'less foo' has stopped
sklirg@box:~
鉃
The same happens with the suggested empty config/$HOME:
sklirg@box:~
鉃 sh -c 'env HOME=$(mktemp -d) fish'
sklirg@box:/U/sklirg
鉃 touch foo
sklirg@box:/U/sklirg
鉃 less foo
fish: Job 1, 'less foo' has stopped
sklirg@box:/U/sklirg
鉃 fg
Send job 1 (less foo) to foreground
sklirg@box:/U/sklirg
鉃 fish --version && echo $version
fish, version 3.5.0
3.5.0
sklirg@box:/U/sklirg
鉃 /usr/local/bin/fish
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
sklirg@box /U/sklirg> env | grep HOME
XDG_CONFIG_HOME=/var/folders/8t/sqnb2_j56q94_gcl33j0n_dh0000gp/T/tmp.JnygqqGq/.config
HOME=/var/folders/8t/sqnb2_j56q94_gcl33j0n_dh0000gp/T/tmp.JnygqqGq
sklirg@box /U/sklirg> less foo
fish: Job 1, 'less foo' has stopped
sklirg@box /U/sklirg> fg
Send job 1 (less foo) to foreground
sklirg@box /U/sklirg> /usr/local/bin/fish --version && echo $version
fish, version 3.4.1
3.4.1
sklirg@box /U/sklirg>
If you need anything else from me, hit me up and I'll do my best to help :)