Neofetch: Directory not terminated by "/" lead to error

Created on 10 Jun 2016  路  7Comments  路  Source: dylanaraps/neofetch

When a directoy is passed as argument without "/" at the end, the expression L.2268

files=("$image"*.{png,jpg,jpeg})

leads to an error. For example, in this call

neofetch --image mydir

$image is resolved as mydir only and then $files to mydir*.{png,jpg,jpeg} instead of mydir/*.{png,jpg,jpeg}.

A solution could be something like this:

files=("${image%/}"/*.{png,jpg,jpeg})

Sorry for raising a ticket about this, I'm not sure if it is relevant or not.

Bug

Most helpful comment

cool :) thanks for the reactivity, neofetch is just awsome!

All 7 comments

I've got an idea for how this could be done, but I'm not sure if the current behaviour is expected or not. I'll test this in a bit.

Your solution worked perfectly, feel free to open a pull request with the changes.

Want me to quickly add this or do you want to open a PR?

Just add it to master, works fine.

Don't bother with a PR, it sounds a little "oversized" to me for only 5 chars :) You can directly add it!

Done, thanks guys.

cool :) thanks for the reactivity, neofetch is just awsome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KevinParnell picture KevinParnell  路  9Comments

SolitudeSF picture SolitudeSF  路  4Comments

dylanaraps picture dylanaraps  路  3Comments

Monty picture Monty  路  4Comments

iraquitan picture iraquitan  路  10Comments