chore(.zshrc): update hardcoded paths in export statements to use $HOME environment variable for better portability and maintainability

This commit is contained in:
David Ibia
2024-04-28 21:18:28 +01:00
parent 61d0dbb5d7
commit 09caf82822

29
.zshrc
View File

@@ -4,8 +4,9 @@
# Enable 256 colors # Enable 256 colors
# export TERM="xterm-256color" # export TERM="xterm-256color"
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH="/Users/davidibia/.oh-my-zsh" export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will # Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case, # load a random theme each time oh-my-zsh is loaded, in which case,
@@ -116,8 +117,8 @@ export PATH="$HOME/flutter/bin:$PATH"
export PATH="$HOME/bin:$PATH" export PATH="$HOME/bin:$PATH"
###-tns-completion-start-### ###-tns-completion-start-###
if [ -f /Users/davidibia/.tnsrc ]; then if [ -f "$HOME/.tnsrc" ]; then
source /Users/davidibia/.tnsrc source "$HOME/.tnsrc"
fi fi
###-tns-completion-end-### ###-tns-completion-end-###
@@ -142,7 +143,7 @@ alias vim='nvim'
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh [[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
# pnpm # pnpm
export PNPM_HOME="/Users/davidibia/Library/pnpm" export PNPM_HOME="$HOME/Library/pnpm"
export PATH="$PNPM_HOME:$PATH" export PATH="$PNPM_HOME:$PATH"
alias pn=pnpm alias pn=pnpm
# pnpm end # pnpm end
@@ -153,14 +154,14 @@ alias pn=pnpm
# >>> conda initialize >>> # >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !! # !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/davidibia/miniconda3/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)" __conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
eval "$__conda_setup" eval "$__conda_setup"
else else
if [ -f "/Users/davidibia/miniconda3/etc/profile.d/conda.sh" ]; then if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
. "/Users/davidibia/miniconda3/etc/profile.d/conda.sh" . "$HOME/miniconda3/etc/profile.d/conda.sh"
else else
export PATH="/Users/davidibia/miniconda3/bin:$PATH" export PATH="$HOME/miniconda3/bin:$PATH"
fi fi
fi fi
unset __conda_setup unset __conda_setup
@@ -174,7 +175,7 @@ export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/platform-tools
# bun completions # bun completions
[ -s "/Users/davidibia/.bun/_bun" ] && source "/Users/davidibia/.bun/_bun" [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# bun # bun
export BUN_INSTALL="$HOME/.bun" export BUN_INSTALL="$HOME/.bun"
@@ -219,8 +220,8 @@ export PATH=$GEM_HOME/bin:$PATH
export PATH=$HOME/flutter/bin:$PATH export PATH=$HOME/flutter/bin:$PATH
PATH="/U/Users/davidibia/sers/davidibia/perl5/bin${PATH:+:${PATH}}"; export PATH; PATH="$HOME/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/Users/davidibia/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; PERL5LIB="$HOME/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/Users/davidibia/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; PERL_LOCAL_LIB_ROOT="$HOME/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/Users/davidibia/perl5\""; export PERL_MB_OPT; PERL_MB_OPT="--install_base \"$HOME/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/Users/davidibia/perl5"; export PERL_MM_OPT; PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"; export PERL_MM_OPT;