zsh: Try splitting zprofile by OS
This commit is contained in:
parent
60faca005f
commit
8599d7c7cf
7 changed files with 40 additions and 13 deletions
|
|
@ -1,6 +1,5 @@
|
|||
- shell:
|
||||
-
|
||||
command: brew/install
|
||||
- command: brew/install
|
||||
stdout: true
|
||||
stderr: true
|
||||
quiet: false
|
||||
|
|
@ -12,3 +11,4 @@
|
|||
~/.config/aerospace: aerospace/
|
||||
~/.config/karabiner: karabiner/
|
||||
~/.config/tridactyl: tridactyl/
|
||||
~/.profile: etc/profile.darwin
|
||||
|
|
|
|||
|
|
@ -32,12 +32,10 @@
|
|||
~/.ignore: etc/ignore
|
||||
~/.my.cnf: mysql/.my.cnf
|
||||
~/.npmrc: npm/.npmrc
|
||||
~/.profile: etc/profile
|
||||
~/.psqlrc: psql/.psqlrc
|
||||
~/.rgignore: etc/rgignore
|
||||
~/.tmux.conf: tmux/.tmux.conf
|
||||
~/.vimrc: vim/.vimrc
|
||||
~/.vim: vim/
|
||||
~/.zprofile: zsh/.zprofile
|
||||
~/.zshenv: zsh/.zshenv
|
||||
~/.zshrc: zsh/.zshrc
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
has() {
|
||||
command -V "$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
if has gnome-keyring-daemon; then
|
||||
eval "$(gnome-keyring-daemon --start)"
|
||||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
has() {
|
||||
command -V "$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
source_if() {
|
||||
if [ -e "$1" ]; then
|
||||
source "$1"
|
||||
33
etc/profile.linux
Normal file
33
etc/profile.linux
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
has() {
|
||||
command -V "$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
source_if() {
|
||||
if [ -e "$1" ]; then
|
||||
source "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
path_if() {
|
||||
if [ -d "$1" ]; then
|
||||
case ":$PATH:" in
|
||||
*:"$1":*)
|
||||
;;
|
||||
*)
|
||||
PATH="${1}${PATH:+:$PATH}"
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh"
|
||||
|
||||
path_if "$HOME/bin"
|
||||
path_if "$HOME/.local/bin"
|
||||
|
||||
unset -f source_if
|
||||
unset -f path_if
|
||||
|
||||
if has gnome-keyring-daemon; then
|
||||
eval "$(gnome-keyring-daemon --start)"
|
||||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
- link:
|
||||
~/.config/user-dirs.dirs: etc/user-dirs.dirs
|
||||
~/.profile: etc/profile.linux
|
||||
./alacritty/os.toml: alacritty/linux.toml
|
||||
./zsh/os.zshrc: zsh/linux.zshrc
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ ${prompt}"
|
|||
export RPROMPT=''
|
||||
|
||||
# aliases
|
||||
source $HOME/.zprofile
|
||||
source $HOME/.config/zsh/aliases
|
||||
|
||||
source $HOME/.config/zsh/j.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue