.zshrc
· 1.3 KiB · Bash
Eredeti
# Homebrew
export HOMEBREW_PREFIX="$HOME/homebrew"
export HOMEBREW_HOME="$HOMEBREW_PREFIX/bin"
export PATH="$HOMEBREW_HOME:$PATH"
# Zsh Plugins
source $HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# Starship
eval "$(starship init zsh)"
# Fnm
eval "$(fnm env --use-on-cd --shell zsh)"
# Aliases
alias sc="source ~/.zshrc"
alias date="print -z Current time is $(date)"
alias home="cd $HOME"
alias dev="cd $HOME/Workspace"
# Aliases As Inline Function
# alias zshconfig='f(){ $@ ~/.zshrc; }; f'
# Or Complete Definition Function
zshconfig () {
# Define el editor por defecto y una lista de editores permitidos.
local editor="${1:-nvim}"
local valid_editors=("nvim" "code" "nano" "vim")
# Verifica si el editor solicitado es válido; si no, usa el predeterminado.
if [[ ! " ${valid_editors[@]} " =~ " ${editor} " ]]; then
editor="nvim"
fi
# Abre el archivo de configuración.
"$editor" "$HOME/.zshrc"
}
# Alias GIT
alias gconfig="nvim ~/.gitconfig"
alias gs="git status"
alias gi="git init"
alias gall="git add ."
alias gfetch="git fetch -a"
alias gpull="git pull"
alias gpush="git push"
alias gcom='f(){ git commit -m "$@"; }; f'
# Added by Antigravity
export PATH="/Users/josemidev/.antigravity/antigravity/bin:$PATH"
| 1 | # Homebrew |
| 2 | export HOMEBREW_PREFIX="$HOME/homebrew" |
| 3 | export HOMEBREW_HOME="$HOMEBREW_PREFIX/bin" |
| 4 | export PATH="$HOMEBREW_HOME:$PATH" |
| 5 | |
| 6 | # Zsh Plugins |
| 7 | source $HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
| 8 | source $HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh |
| 9 | |
| 10 | # Starship |
| 11 | eval "$(starship init zsh)" |
| 12 | |
| 13 | # Fnm |
| 14 | eval "$(fnm env --use-on-cd --shell zsh)" |
| 15 | |
| 16 | # Aliases |
| 17 | alias sc="source ~/.zshrc" |
| 18 | alias date="print -z Current time is $(date)" |
| 19 | alias home="cd $HOME" |
| 20 | alias dev="cd $HOME/Workspace" |
| 21 | |
| 22 | # Aliases As Inline Function |
| 23 | # alias zshconfig='f(){ $@ ~/.zshrc; }; f' |
| 24 | |
| 25 | # Or Complete Definition Function |
| 26 | zshconfig () { |
| 27 | # Define el editor por defecto y una lista de editores permitidos. |
| 28 | local editor="${1:-nvim}" |
| 29 | local valid_editors=("nvim" "code" "nano" "vim") |
| 30 | |
| 31 | # Verifica si el editor solicitado es válido; si no, usa el predeterminado. |
| 32 | if [[ ! " ${valid_editors[@]} " =~ " ${editor} " ]]; then |
| 33 | editor="nvim" |
| 34 | fi |
| 35 | |
| 36 | # Abre el archivo de configuración. |
| 37 | "$editor" "$HOME/.zshrc" |
| 38 | } |
| 39 | |
| 40 | # Alias GIT |
| 41 | alias gconfig="nvim ~/.gitconfig" |
| 42 | alias gs="git status" |
| 43 | alias gi="git init" |
| 44 | alias gall="git add ." |
| 45 | alias gfetch="git fetch -a" |
| 46 | alias gpull="git pull" |
| 47 | alias gpush="git push" |
| 48 | alias gcom='f(){ git commit -m "$@"; }; f' |
| 49 | |
| 50 | # Added by Antigravity |
| 51 | export PATH="/Users/josemidev/.antigravity/antigravity/bin:$PATH" |