configurar OhmyZsh el plugin powerlevel10k en nano ~/.zshrc

PHOTO EMBED

Tue Sep 09 2025 14:22:47 GMT+0000 (Coordinated Universal Time)

Saved by @jrg_300i

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
source $ZSH/oh-my-zsh.sh

#alias
# Alias para abrir la carpeta de indicadores
alias indicadores='cd /var/www/html/jobran/indicadores && ls'

# Alias para iniciar el servidor PHP para Yii2
alias yii-server='php -S localhost:8001 -t "backend/web"'


plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
  sudo
  history-substring-search
  colored-man-pages
  composer
  laravel
  docker
  extract
)


source $ZSH/oh-my-zsh.sh

# Activar globbing avanzado
setopt extendedglob
setopt globdots
setopt nomatch

# Alias Laravel
alias art="php artisan"
alias tinker="php artisan tinker"
alias serve="php artisan serve"
alias migrate="php artisan migrate"
alias seed="php artisan db:seed"
alias fresh="php artisan migrate:fresh --seed"

# Alias Composer
alias cdu="composer dump-autoload"
alias ci="composer install"
alias cu="composer update"

# Alias PostgreSQL
alias psqlc="psql -U postgres"
alias pgstart="sudo systemctl start postgresql"
alias pgstop="sudo systemctl stop postgresql"
alias pgrestart="sudo systemctl restart postgresql"
alias pgstatus="sudo systemctl status postgresql"
alias psql-iniciar="psql -h localhost -U postgres -W" 

# Cargar configuración de Powerlevel10k
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh


# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh


content_copyCOPY