So I've taken a closer look at https://github.com/jethrokuan/z/issues/107. The cause of the issue is actually that if there's a common path it's logged to stderr (see the block I've removed). This seems like a bit of a mismatch for stderr, from the fish docs stderr is meant to be used for:
Standard error (stderr) for writing errors and warnings. Defaults to writing to the screen.
and I don't think the common path really counts as either. Removing it fixes the prompt messing up when completing.
Behaviour before this change:
Behaviour after this change:
As you can see the prompt is now no longer messed up when there's a common path prefix.
Now I'm not really that familiar with awk or this plugin, so I'm not sure if we need to do some further cleanup after this change. Or if this change would break anything (other than removing the common path logging via stderr from z -l). See these lines for something that I think we could clean up: https://github.com/jethrokuan/z/blob/master/functions/__z.fish#L140-L143. We could also do that after this PR.
So I've taken a closer look at https://github.com/jethrokuan/z/issues/107. The cause of the issue is actually that if there's a common path it's logged to stderr (see the block I've removed). This seems like a bit of a mismatch for stderr, from the fish docs stderr is meant to be used for:
and I don't think the common path really counts as either. Removing it fixes the prompt messing up when completing.
Behaviour before this change:
Behaviour after this change:
As you can see the prompt is now no longer messed up when there's a common path prefix.
Now I'm not really that familiar with awk or this plugin, so I'm not sure if we need to do some further cleanup after this change. Or if this change would break anything (other than removing the common path logging via stderr from
z -l
). See these lines for something that I think we could clean up: https://github.com/jethrokuan/z/blob/master/functions/__z.fish#L140-L143. We could also do that after this PR.Let me know what you think.