nathanstilwell / color-logger

A bash function to log in color
Do What The F*ck You Want To Public License
12 stars 6 forks source link

error when put package content into bash script before business code #4

Open naughtyGitCat opened 4 years ago

naughtyGitCat commented 4 years ago

./uninstall.sh: line 34: text_colors: default: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 39: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: black: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 30: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: red: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 31: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: green: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 32: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: yellow: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 33: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: blue: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 34: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: purple: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 35: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: cyan: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 36: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: white: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 37: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: bright_red: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 91: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: bright_green: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 92: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: bright_yellow: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 93: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: bright_blue: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 94: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: bright_purple: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 95: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: bright_cyan: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 96: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: bright_white: must use subscript when assigning associative array ./uninstall.sh: line 34: text_colors: 97: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: default: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 49: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: black: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 40: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: red: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 41: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: green: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 42: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: yellow: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 43: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: blue: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 44: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: purple: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 45: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: cyan: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 46: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: white: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 47: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_black: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 100: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_red: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 101: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_green: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 102: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_yellow: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 103: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_blue: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 104: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_purple: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 105: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_cyan: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 106: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: bright_white: must use subscript when assigning associative array ./uninstall.sh: line 54: background_colors: 107: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: default: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: 0: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: bold: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: 1: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: italics: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: 3: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: underline: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: 4: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: blink: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: 5: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: reverse: must use subscript when assigning associative array ./uninstall.sh: line 63: emphasis: 7: must use subscript when assigning associative array

Laktus commented 2 years ago

Hey, i created a bash compatible version here: https://github.com/Laktus/color-logger

@nathanstilwell Should we add this bash compatible version maybe in a different branch onto your main project? Great work by the way, used your logger in one of our projects and it works like a charm :)

nathanstilwell commented 2 years ago

@laktus Sorry for the very slow reply. I have been out of town for the past two weeks. I think a bash compatible version of color-logger is very interesting. Why don't you make a pull request and we can find a way to keep it on the main branch. I've been using Fish shell lately, so perhaps we could have several versions to install based on the shell.

nathanstilwell commented 2 years ago

@naughtyGitCat Please see the (Requirements)[https://github.com/nathanstilwell/color-logger#requirements] for using color-logger. Are you seeing this error using Bash 4.0+?

Laktus commented 2 years ago

@nathanstilwell Had the same error using bash version 4.4.23, i will try creating a pull request with my changes

naughtyGitCat commented 2 years ago

GNU bash, version 4.1.2(1)-release-(x86_64-redhat-linux-gnu)