Skip to content

Instantly share code, notes, and snippets.

@ZenBerry
ZenBerry / gist:c7fc8233361b7ca3cd55a53ce607b122
Created February 9, 2026 06:52
A MacOS terminal hook to show an active nvm node version dynamically
# add it to ~/.zshrc
# then run: source ~/.zshrc
# expected result: (node v22.22.0) user@computer ~ %
# should change dynamically as you run nvm use *version*
autoload -U add-zsh-hook
setopt PROMPT_SUBST
node_prompt() {
if command -v node >/dev/null 2>&1; then
@ZenBerry
ZenBerry / gist:d60b11c9503c365bab7212ac2446e1af
Last active January 30, 2026 23:49
info.zenberry simple helper in terminal
# Add this to ~/.zshrc:
function chpwd() {
if [ -f info.zenberry ]; then
printf "\033[1minfo.zenberry:\033[0m %s\n" "$(cat info.zenberry)"
fi
}
# Then reload: source ~/.zshrc
# This will print the contents of info.zenberry every time you cd into a folder that has this file inside. Useful for quickly reminding yourself how to start your app properly etc.