G2-Games / welcome.sh

A nice welcome script for Bash and Zsh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Greeting is sometimes blank

G2-Games opened this issue · comments

commented

image

I am now getting this sometimes when running welcome.sh however it no longer prints an error.

Originally posted by @tripplehelix in #5 (comment)

commented

Would assume this issue is related to array lengths, however I can't seem to reproduce

commented

The issue is with arrays in Zsh being indexed from 1 instead of 0

commented

Using msg=${greetings[$greetingsNumber]} causes issues because the shells handle arrays differently. Changing it to msg=${greetings[@]:$greetingsNumber:1} works the same in both shells.

commented

@tripplehelix fixed! Updating to v1.1.2 should fix it.

Lots of patches right now 😅