Refactor zsh4humans to foxshell - complete rebrand with new repository integration

This commit is contained in:
Arctic 2025-07-04 11:56:44 -05:00
parent 0610f4aeab
commit 2b6ea4f5a3
7 changed files with 908 additions and 51 deletions

26
.zshenv
View file

@ -1,4 +1,4 @@
# Documentation: https://github.com/romkatv/zsh4humans/blob/v5/README.md.
# Documentation: https://git.foxdale.tech/Arctic/foxshell/blob/main/README.md.
#
# Do not modify this file unless you know exactly what you are doing.
# It is strongly recommended to keep all shell customization and configuration
@ -16,30 +16,30 @@ if [ -n "${ZSH_VERSION-}" ]; then
: ${ZDOTDIR:=~}
setopt no_global_rcs
[[ -o no_interactive && -z "${Z4H_BOOTSTRAPPING-}" ]] && return
[[ -o no_interactive && -z "${FOXSHELL_BOOTSTRAPPING-}" ]] && return
setopt no_rcs
unset Z4H_BOOTSTRAPPING
unset FOXSHELL_BOOTSTRAPPING
fi
Z4H_URL="https://raw.githubusercontent.com/romkatv/zsh4humans/v5"
: "${Z4H:=${XDG_CACHE_HOME:-$HOME/.cache}/zsh4humans/v5}"
FOXSHELL_URL="https://git.foxdale.tech/Arctic/foxshell/raw/branch/main"
: "${FOXSHELL:=${XDG_CACHE_HOME:-$HOME/.cache}/foxshell}"
umask o-w
if [ ! -e "$Z4H"/z4h.zsh ]; then
mkdir -p -- "$Z4H" || return
>&2 printf '\033[33mz4h\033[0m: fetching \033[4mz4h.zsh\033[0m\n'
if [ ! -e "$FOXSHELL"/foxshell.zsh ]; then
mkdir -p -- "$FOXSHELL" || return
>&2 printf '\033[33mfoxshell\033[0m: fetching \033[4mfoxshell.zsh\033[0m\n'
if command -v curl >/dev/null 2>&1; then
curl -fsSL -- "$Z4H_URL"/z4h.zsh >"$Z4H"/z4h.zsh.$$ || return
curl -fsSL -- "$FOXSHELL_URL"/foxshell.zsh >"$FOXSHELL"/foxshell.zsh.$$ || return
elif command -v wget >/dev/null 2>&1; then
wget -O- -- "$Z4H_URL"/z4h.zsh >"$Z4H"/z4h.zsh.$$ || return
wget -O- -- "$FOXSHELL_URL"/foxshell.zsh >"$FOXSHELL"/foxshell.zsh.$$ || return
else
>&2 printf '\033[33mz4h\033[0m: please install \033[32mcurl\033[0m or \033[32mwget\033[0m\n'
>&2 printf '\033[33mfoxshell\033[0m: please install \033[32mcurl\033[0m or \033[32mwget\033[0m\n'
return 1
fi
mv -- "$Z4H"/z4h.zsh.$$ "$Z4H"/z4h.zsh || return
mv -- "$FOXSHELL"/foxshell.zsh.$$ "$FOXSHELL"/foxshell.zsh || return
fi
. "$Z4H"/z4h.zsh || return
. "$FOXSHELL"/foxshell.zsh || return
setopt rcs