Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I cut and paste environment variables into the shell to authenticate to different accounts. Originally, I was trying to trigger an event by looking for specific words (ie. AWS_SECRET_ID) but that didn't seem to work reliably.


If you're switching between envs with cut and paste, maybe you could do likewise with the badge?

   echo -e "\x1B]1337;SetBadgeFormat=$(echo "production" | base64)\007"

   echo -e "\x1B]1337;SetBadgeFormat=$(echo "development" | base64)\007"
Consider giving yourself some bash functions with appropriate names, which set the env vars and switch the badge too. Then instead of pasting each time, you'll just use the function name in the shell.

https://linuxize.com/post/bash-functions/




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: