Neofetch: Neofetch 3.0 shell command broken with /bin/zsh shell

Created on 24 Jan 2017  路  10Comments  路  Source: dylanaraps/neofetch

Description

The neofetch output seems to be broken on the shell command. I'm using Neofetch 3.0 installed through homebrew and using the same config file as in master. My current shell script is as folows:

$ echo $SHELL
/bin/zsh

Neofetch version

Neofetch 3.0

Screenshot

The cropped output:
screen shot 2017-01-24 at 08 19 34

if I comment the shell command on config, the output is not cropped:
screen shot 2017-01-24 at 08 22 21

Verbose log

The verbose log is found here: http://pastebin.com/sifHL6EJ

Config file

And the config file used here: http://pastebin.com/K2YF33jv

Bug

All 10 comments

Thanks for opening this. :)

  • Does the issue still occur with neofetch --shell_version off?
  • What's the output of this command?: zsh --version

With neofetch --shell_version off the issue is gone.
screenshot 2017-01-24 10 02 35

*note: I'm now at work in a different machine, but I had the same issue as in my personal machine.

What's the output of zsh --version? This is the only command that gets run in the shell function, which makes it the only possible cause of the issue.

zsh 5.3.1 (x86_64-apple-darwin15.6.0)

Weird.

What about this?

  • "$SHELL" --version

Also what version of bash do you have installed?

  • bash --version

I have homebrew zsh installed but not used. Thats why zsh --version is different

$ "$SHELL" --version
zsh 5.0.8 (x86_64-apple-darwin15.0)
$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.

The shell function might include something incompatible with bash 3 and that's why it's suddenly exiting. I'll install bash 3 and see if I can reproduce this.

I can reproduce this with bash 3, working on a fix now. :+1:

This was the offending line: shell="${shell/ ${SHELL##*/}}", I'm not sure why this caused bash to crash. The issue should be fixed now, try out the latest master and let me know if it still occurs. :)

Edit: Here's the error from bash 3:

bash3: bad substitution: no closing `}' in  ${SHELL##*

Edit2: More digging, this is (probably) a parser bug in bash 3!

Source: http://stackoverflow.com/a/32481879

Edit3: This was also an issue in bash 4.2 and was fixed sometime after.

Source: http://unix.stackexchange.com/questions/137506/how-to-combine-bashs-process-substitution-with-here-document

Closing this, reopen it if you're still experiencing the issue. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JacksonMcKay picture JacksonMcKay  路  9Comments

dylanaraps picture dylanaraps  路  3Comments

dylanaraps picture dylanaraps  路  10Comments

xstreamx picture xstreamx  路  4Comments

dylanaraps picture dylanaraps  路  8Comments