Skip to content

Commit

Permalink
Merge pull request #8 from Megaf/development
Browse files Browse the repository at this point in the history
Fix #7
  • Loading branch information
Megaf authored Sep 29, 2022
2 parents 23853f0 + 754b6cf commit cbdd72c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libsay
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# libsay - Version: 1.3-202209.28.193000
# libsay - Version: 1.3-202209.30.003700
# Library that adds the command "say" to print nice looking messages.
# Not only that, it add a bunch of nice functions to the shell or a script.
#
Expand Down Expand Up @@ -393,9 +393,9 @@ EOM
[[ "$opt" = "--align="* || "$opt" = "-a="* ]] && align="${opt#*=}" && shift 1
done
unset -v opt
[[ ! "$(set_colour)" =~ $colour ]] && echo "Can't reconise colour '$colour'" && unset -v colour bg_colour align && return 1
[[ ! "$(set_colour)" =~ $bg_colour ]] && echo "Can't reconise colour '$bg_colour'" && unset -v colour bg_colour align && return 1
[[ ! "$valid_aligns" =~ $align ]] && echo "'$align' is an invalid alignment" && unset -v colour bg_colour align && return 1
[ -n "$colour" ] && [[ ! "$(set_colour)" =~ $colour ]] && echo "Can't reconise colour '$colour'" && unset -v colour bg_colour align && return 1
[ -n "$bg_colour" ] && [[ ! "$(set_colour)" =~ $bg_colour ]] && echo "Can't reconise colour '$bg_colour'" && unset -v colour bg_colour align && return 1
[ -n "$align" ] && [[ ! "$valid_aligns" =~ $align ]] && echo "'$align' is an invalid alignment" && unset -v colour bg_colour align && return 1
unset -v valid_aligns

if [ ! -t 0 ]; then # Checks if input is coming from the standard input.
Expand Down

0 comments on commit cbdd72c

Please sign in to comment.