[zsh] Move func/ directory to zsh/functions

This commit is contained in:
Eryn Wells 2026-01-18 08:43:02 -07:00
parent 91da2fc583
commit 7c08c5131f
53 changed files with 1 additions and 1 deletions

View file

@ -1,34 +0,0 @@
# Eryn Wells <eryn@erynwells.me>
autoload -Uz binary_exists
autoload -Uz darwin-os-version
autoload -Uz darwin-os-build
autoload -Uz darwin-hardware-model
init_profile_darwin_say_hello() {
local cat_program=cat
if binary_exists lolcat; then
cat_program=lolcat
fi
local hello_message="It's `date +'%H:%M on %A, %B %d'`."
local hardware_model=`darwin-hardware-model`
if [[ -n "$hardware_model" ]]; then
hello_message+="\nThis machine is a $hardware_model."
fi
local os_version=`darwin-os-version`
if [[ -n "$os_version" ]]; then
local os_build=`darwin-os-build`
if [[ -n "$os_build" ]]; then
hello_message+="\nYou're running macOS $os_version ($os_build)."
else
hello_message+="\nYou're running macOS $os_version."
fi
fi
print "$hello_message\n" | $cat_program
}
init_profile_darwin_say_hello "$@"