Skip to content

Use colour codes that also works with OSX#4

Open
vergissberlin wants to merge 4 commits into
tlatsas:masterfrom
vergissberlin:master
Open

Use colour codes that also works with OSX#4
vergissberlin wants to merge 4 commits into
tlatsas:masterfrom
vergissberlin:master

Conversation

@vergissberlin

Copy link
Copy Markdown

Hi,

there is a problem with the colour codes on OS X. I get following output:

sleeping for 2 secs...                                                                                                                                                          [\e[1;32mDONE\e[0m]

My pull request fixed that.

Thank you!
André

@vergissberlin

Copy link
Copy Markdown
Author

Okay, I am very inspired of the possibilities, so I added also a timer function. :-)
Please give me feedback.

Comment thread spinner.sh
sp='\|/-'
delay=${SPINNER_DELAY:-0.15}
delay=${SPINNER_DELAY:-0.25}
counter=0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this error with zsh

$ source fidget.sh

$ spinner_start sleep 1
_spinner:40: unrecognized modifier `i'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gianpaj
Okay, but it's made for bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants