Zimfw: Failure to output content without newline

Created on 29 Aug 2017  Â·  13Comments  Â·  Source: zimfw/zimfw

I'm running the zsh-zim-git package from the arch aur.

OS: Arch Linux 
Kernel: x86_64 Linux 4.12.8-2-ARCH

Name            : zsh-zim-git
Version         : r317.95f1e3c-1

Name            : zsh
Version         : 5.4.1-1

zimrc
zshrc

Description

Failure to output file content with cat from a file that doesn't have a newline.

Steps to reproduce

% zsh -f
moro% cat JUNK
Testing%
moro% exit
% cat JUNK
%

First create a file with the content Testing without a newline. Run zsh -f or bash and then cat that file to output content. Exit back to zim configured zsh and run cat again.

Downgrading to zsh-5.3.1-2 solves the issue. I'm guessing it's some sort of compability problem with the newest zsh version?

question

Most helpful comment

@ericbn Awesome that you found the source of the problem. Cheers for the help! I'll create an issue for the lean theme.

All 13 comments

I can't reproduce this. Try re-installing the -git package, or instead install zim per the README.md instructions; the aur zsh package isn't well supported.

@Eriner I've now tried reinstalling zsh-zim-git but that still produces the same problem. I also tried installing the package per user via git (following the README) and that behaves exactly the same.

Do note that this is ONLY when I use zsh version 5.4.1-1 or 5.4.2-1. It works perfectly fine on version 5.3.1-2.

In that case, it seems that it's an upstream zsh problem, and not a zim problem. Perhaps create a ticket upstream? Does it behave this way without zim?

@Eriner It does not behave this way without zim, which you can see above when using zsh -f. I've already aired this issue on the #zsh channel on freenode and the consensus there was that this very likely is related to zim.

@sQVe The only reason I have questions about this is because I'm unable to reproduce this issue using your config files. Until I can reproduce it, seeing as the main trigger here is an upgrade in the zsh version, I'm not sure what needs to be fixed to correct the issue you're experiencing.

@Eriner Yeah. I totally get the problem. I just want this issue to be fixed sometime in the future and keep away from a blame loop.

Is there anything I can do to help gather more information about this?

Sure, use the debug module.
You can email me the tar.gz. You can get my email from the git commits.

I also have this issue:

mmerfort@tp-mmerfort î‚° /tmp î‚° echo -n "bla"
mmerfort@tp-mmerfort î‚° /tmp î‚° zsh -lf
tp-mmerfort% echo -n "bla"
bla% tp-mmerfort%

I'm able to reproduce this with zsh 5.4.2 and any of our custom themes: eriner, gitster, magicmace, minimal, and steeef.

I can see nopromptsp is set in my zim-initalized shell, although I could not find any code in zim setting that up.

~ > setopt | grep -Ei 'prompt.?sp'
nopromptsp

This fixes it:

~ > setopt prompt_sp
~ > echo -n "bla"
bla%
~ >

This was introduced in this commit: https://github.com/zsh-users/zsh/commit/43e55a9bcd2c90124a751f2597d2f33cb6e3c042#diff-bb10d67e7a8561b66a53a805f3c77a40R233

When using the prompt_opts array, now zsh will set nopromptsp unless the array contains a sp.

This is still an issue with external themes, that need to apply the correction themselves. @sQVe, you might want to report this to the lean theme (that you're using, according to your zimrc file).

@ericbn Awesome that you found the source of the problem. Cheers for the help! I'll create an issue for the lean theme.

Was this page helpful?
0 / 5 - 0 ratings