mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(zsh): Finished reorganise zsh with a same entry point for all platforms
This commit is contained in:
parent
bd5ca49c3e
commit
2b21b63a13
22 changed files with 503 additions and 369 deletions
33
tools/zsh/common.zshrc
Normal file
33
tools/zsh/common.zshrc
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# $DOTFILES/zsh/common.zshrc
|
||||
# This is the entry point for all zsh configuration files
|
||||
# 这是所有zsh配置文件的入口点
|
||||
|
||||
# Location: $ZDOTDIR/.zshrc (default: $HOME/.zshrc)
|
||||
# Linking:
|
||||
# ln -sf $DOTFILES/tools/zsh/common.zshrc $ZDOTDIR/.zshrc
|
||||
|
||||
export DOTFILES=$HOME/.dotfiles
|
||||
|
||||
case "$(uname)" in
|
||||
Linux)
|
||||
if grep -q Microsoft /proc/version || [[ -n "$WSL_DISTRO_NAME" ]]; then
|
||||
# WSL-specific configuration
|
||||
source "$DOTFILES/platforms/wsl/zshrc"
|
||||
else
|
||||
# Native Linux configuration
|
||||
source "$DOTFILES/platforms/linux/zshrc"
|
||||
fi
|
||||
;;
|
||||
Darwin)
|
||||
# macOS-specific configuration
|
||||
source "$DOTFILES/platforms/mac/zshrc"
|
||||
;;
|
||||
# CYGWIN*|MINGW*|MSYS*)
|
||||
# source "$DOTFILES/platform/wsl.zsh"
|
||||
# ;;
|
||||
esac
|
||||
|
||||
for file in $DOTFILES/tools/zsh/mod/*.zsh; do
|
||||
source $file
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue