dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
21.85k stars 1.76k forks source link

Terminal prompt occurs midway through Neofetch image on Kinetic Kudu Beta. #2209

Open ajstrongdev opened 1 year ago

ajstrongdev commented 1 year ago

Description

The terminal prompt "chadano@ubuntu:~$" occurs midway through Neofetch Image on Ubuntu 22.10 Kinetic Kudu Beta.

Neofetch version

Neofetch 7.1.0

Ubuntu 22.10 Kinetic Kudu Beta

Screenshot

image

Config file

Unedited, default config file.

Verbose log

https://pastebin.com/5B3k0vxH

ItzSwirlz commented 1 year ago

I've confirmed this aswell and assigned Launchpad Bug 1991457 to this: https://bugs.launchpad.net/ubuntu/+source/neofetch/+bug/1991457

ConHuevosGuey commented 1 year ago

Confirming this bug occurs as well. The terminal prompt always ends up the line under the machine specifications and cuts through the logo produced regardless. neofetch

OberstKrueger commented 1 year ago

neofetch-error

This also occurs on macOS.

ghost commented 1 year ago

Also occurs on fedora image

sneedachuckoindahouse commented 1 year ago

/usr/bin/neofetch: line 3985: bad substitution: no closing `}' in ${block_spaces// /${blocks}nl} probably something similar to bug for bash 5.2+. try fixes came up in #2195.

kjoonlee commented 1 year ago

If neofetch --disable cols works for you when you hide the color bars, then I think it’s the same issue as #2195. (edit: and you can work around 2195 by editing the neofetch script yourself)

Worst case: neofetch --disable title underline distro model kernel uptime packages shell resolution de wm term term_font cpu gpu memory

touhouEUROBEAT commented 1 year ago

If neofetch --disable cols works for you when you hide the color bars, then I think it’s the same issue as #2195.

Worst case: neofetch --disable title underline distro model kernel uptime packages shell resolution de wm term term_font cpu gpu memory

Experienced the same issue on fedora. --disable cols solved it for me.

Sir-Thom commented 1 year ago

for me it seem to "solve the problem by replacing this line 3803 and 304 " but it is not really fixing it. :

 [[` "$blocks"  ]] && cols+="${block_spaces// /${blocks}nl}"
 [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}"

by this:

 [[ "$blocks"  ]] && cols+="${block_spaces// /${blocks}nl]}"
 [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl]}"

I just closed the squared bracket

JacksonBarker commented 1 year ago

@Sir-Thom 's solution of closing the square bracket no longer results in an error when executing get_cols(). However, this resulted in the added square brackets becoming visible in the output. (See below)

image

There did not appear to be any issues resulting from removing the square brackets entirely, and that also resolved the error.

[[ "$blocks"  ]] && cols+="${block_spaces// /${blocks}mnl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}mnl}"

I will not take any action in the form of a pull request myself, because I am not aware of the purpose of aforementioned the square brackets. But, if someone else is able to determine that they serve no purpose, that is the solution that worked for me.

Sir-Thom commented 1 year ago

@JacksonBarker it seem that by correcting the line to this ( just added \ before [mnl)

     # Convert the spaces into rows of blocks.
        [[ "$blocks"  ]] && cols+="${block_spaces// /${blocks}\[mnl}"
        [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\[mnl}"

        # Add newlines to the string.
        cols=${cols%%nl}
        cols=${cols//nl/
        # Add newlines to the string.
        cols=${cols%%nl}
        cols=${cols//nl/
[${text_padding}C${zws}}

seem to fixes more correctly the issue it gave me those result

image

note: my first square is the same color as my background.

GentleHoneyLover commented 1 year ago

Same issue on OpenSUSE MicroOS:

Screen Shot 2022-10-22 at 13 10 26

Passing --disable cols parameter "fixes" it:

Screen Shot 2022-10-22 at 13 13 31
hykilpikonna commented 1 year ago

The column cutoff issue on Bash ≥5.2 is fixed in HyFetch 1.4.3 / neowofetch 7.3.3 by the pull request https://github.com/hykilpikonna/hyfetch/pull/24.

image

HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.

Read the "Running Updated Original Neofetch" section for more info!

OberstKrueger commented 1 year ago

On macOS, this is working properly after upgrading to bash 5.2.9.

Rongronggg9 commented 1 year ago

It is a bug of Bash 5.2. Bash 5.2.4 has fixed it.

Debian has packaged Bash 5.2.15-2 and accepted it into testing ("Bookworm") and unstable ("Sid") recently. If you are using these Debian suites, upgrade your Bash installation.

Ubuntu is a package thief. It steals packages from Debian unstable ("Sid") constantly. So they rarely do anything until Debian packaged a new version that fixed the issue. That's exactly what this case is. For now, Bash 5.2.15-2 has been stolen from Debian, patched with Ubuntu-specific patches, and entered the proposed repository of "Lunar Lobster". Probably in a few days, it will enter the main repository of "Lunar Lobster", and some extra days after that it should be able to enter the "Kinetic Kudu" repository.