Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy up echo statements #20

Open
mvogelgesang opened this issue Apr 19, 2024 · 0 comments
Open

tidy up echo statements #20

mvogelgesang opened this issue Apr 19, 2024 · 0 comments

Comments

@mvogelgesang
Copy link
Owner

When reading through create.sh, it gets very busy with color variables wrapping both sides of the text. Instead, create a function which allows the text to be read as the first argument and any wrapping colors and follow on commands at the end.

Use cases

  • Question
    • echo -e "${oc_COLOR_QUESTION}Describe this goals for this project${oc_COLOR_NOCOLOR}"
  • Warning with redirected output or error
    • echo -e "${oc_COLOR_WARN}Invalid selection, try again${oc_COLOR_NOCOLOR}" >&2
  • Error
    • echo -e "${oc_COLOR_WARN}jq could not be found. Install with homebrew.${oc_COLOR_NOCOLOR}\n\n brew install jq\n\n"
  • Confirmation message
    • echo "The namespace for this project is set to $namespace."
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

No branches or pull requests

1 participant