Came just to talk up KAUF. As an avid home-assistant user it was the easiest smart bulb I’ve ever set up and not only do the bulbs not need an app but the home-assistant esphome integration detected them as soon as i had configured Wi-Fi in their webui.
Found them totally by chance looking for smart bulbs for desk lamps that are E26 socket but A15 bulb size and found very few choices at the time. What a happy accident!
This is why i refuse to use zsh. I have nothing against it but if i get paged at 3 in the morning and need to access a production server I need my as little friction as possible.
When Amazon or canonical or whoever start to ship servers with zsh instead of bash then I’ll look into it, but ultimately bash, like sh, have a different target audience than zsh. Bash and sh are designed as system admin or ops utilities first and zsh is more geared towards developers. They are incredibly similar in design and syntax, it’s really just philosophically, who is this tool best suited for?
Fwiw if we could start it all from scratch and have our choice of today’s options, i think oils does a lot right, and the way it’s implemented especially wrt whitespace parsing is actually consistent and sane and has a robust test suite to back it up, especially compared to the old guard.
But again, until somebody starts shipping oils I’m going to keep using bash.
My philosophy for things like aliases and functions is to only create them for things that i cannot commit to memory and type quickly. For example a common alias is
ll
which often expands tols -l
. What this does to me is i tend to use that reflexively only to find out i need a different invocation anyway likels -1
orls -alFH
.But let’s say i need to know what server in my ceph cluster is the manager currently so i can go to the WebUI that’s something I’ll probably not be able to remember:
# relies on yq4 ceph_dash () { if [[ -z ${CEPH_DASHBOARD_ADDR:-} ]]; then CEPH_DASHBOARD=$(ceph mgr services | yq '.dashboard'); CEPH_DASHBOARD_IP=$(sed -E 's|https?://([0-9\.]+):8443/?|\1|' <<< "$CEPH_DASHBOARD"); CEPH_DASHBOARD_HOST=$(nslookup "$CEPH_DASHBOARD_IP" | sed -E 's/^.+name = ([^\.]+).+$/\1/' | head -1); CEPH_DASHBOARD_ADDR=$(sed -E "s|$CEPH_DASHBOARD_IP|$CEPH_DASHBOARD_HOST|" <<< "$CEPH_DASHBOARD"); export CEPH_DASHBOARD_ADDR; fi; if [[ ${XDG_SESSION_TYPE:-} == tty || -n ${FORCE_TTY:-} ]]; then echo "$CEPH_DASHBOARD_ADDR"; else xdg-open "$CEPH_DASHBOARD_ADDR"; fi }
This is more complicated than it needs to be but basically once the mgr is determined it’ll be stable so i cache the result. If i find it has moved i can unset
$CEPH_DASHBOARD_ADDR
or prepend the function call likeCEPH_DASHBOARD_ADDR= ceph_dash
. The hostname nslookup is optional but nice to have. Then if you have a desktop it should open in the default browser or whatever you have that handler pointed to. If it’s just a tty it’ll echo it out for you. You can also doFORCE_TTY=anything ceph_dash
to get the echo even if you have a desktopAnywhere i administer ceph i need to have the _admin keys available so i have a script to place those and my functions all in one go.
All that being said, my mentor who got me into tech is neurodivergent like myself and he has like a whole bespoke framework where depending on the folder he’s in certain aliases and functions will be available and a special global scope. He’s gone in on zsh because it helps him to pair with other engineers, and both of those decisions suit him. We work on a team together now again and i wouldn’t dream of imposing my decisions on him any more than I’d allow it in reverse.
You end up learning cool stuff that way, like i asked him how he handles the on-call situation, he had been doing bash for decades and he can model the subtle and not so subtle differences between bash and zsh. As for aliases and functions he keeps a copy of his global set in his sshconfig that runs if the server allows running RemoteCommand on connection which i thought was super cool.