Neofetch: Unexpected backslash being inserted into title variable upon Neofetch launch

Created on 24 Mar 2018  路  16Comments  路  Source: dylanaraps/neofetch

Description

For some reason, a backslash is being inserted into the title variable, so the title shows up as kamran\@Aurora instead of kamran@Aurora. I know my username doesn't have a backslash in it, so that's not an issue. I have no idea why this is being caused. The issue happens in both Apple Terminal, and iTerm 2. My config file, and the verbose log, are attached below as a gist link.

Neofetch version

3.3.1-git (Homebrewed)

Screenshot

screen shot 2018-03-24 at 4 28 16 pm

Config file & verbose log

Gist link

Bug

Most helpful comment

It happened even with Apple Terminal, and I didn't change any configuration settings for neofetch or my color settings aside from adding the "weather" thing and uncommenting a few things for the base config. Also the color settings in iTerm at the time were left at defaults too. I'll run those commands later though when I get the chance. At the moment I'm booted into Windows.

All 16 comments

It looks to me like this is an issue with your color settings. Does this occur with --config off?

What's the output of these commands?:

echo "$USER"
whoami
echo "${HOME##*/}"
echo "$HOSTNAME"
hostname

It happened even with Apple Terminal, and I didn't change any configuration settings for neofetch or my color settings aside from adding the "weather" thing and uncommenting a few things for the base config. Also the color settings in iTerm at the time were left at defaults too. I'll run those commands later though when I get the chance. At the moment I'm booted into Windows.

No longer on macOS due to my hard drive corrupting a couple days ago, so until I get macOS reinstalled, I can't test this. Closing for now, will re-open once I find the time to get macOS re-installed.

I'm able to reproduce this issue, ill see if I can figure out when it started

Because this is confirmed bug, I'm reopening this issue.

The relevant lines haven't been edited since 2016. Any idea on how to actually diagnose this?

It can be the coloring part that triggers the extra backslash, like ${title_color}, ${bold}, or maybe ${at_color}.

8c277ac74aaefbeb4981838acb60c62036ddbf4a is the most relevant thing I can find, from December 2017

Try to change all \\e to a \e. I tested it and it works on Linux but I don't know whether it will work on Mac.

Also, changing it to \e triggers SC1117.

Yeah that worked for me. The @ symbol lost its colour and bold from doing that too.
screen shot 2018-04-08 at 4 28 26 pm

I think that was intended since the output for Mac is the same in my testing (granted, it is a Linux system but since we're using bash it should have a similar output apart from fonts or colorscheme)

2018-04-08-133254_804x604_scrot

Do you get the backslash when using \\e?

Not in Linux, but I tested it somewhere else and found out this bug is also happening in an AIX server and my Solaris VBox.
2018-04-08-133900_858x1018_scrot
2018-04-08-134257_1054x826_scrot

This may also happen in BSDs, I'll edit this post later if I found out it does happen there too.

It's an issue with bash 3.2, if bash is installed from homebrew (4.4) the issue doesn't occur

Fixed. Please reopen this issue if the issue still exists on master.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MingcongBai picture MingcongBai  路  5Comments

dylanaraps picture dylanaraps  路  10Comments

dylanaraps picture dylanaraps  路  3Comments

shawniac picture shawniac  路  4Comments

dylanaraps picture dylanaraps  路  8Comments