# 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
source ~/.powerlevel10k/powerlevel10k.zsh-theme
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
#funciones para abrir la carpeta de indicadores
function indicadores() {
cd /var/www/html/jobran/indicadores/ && ls -lt --color=auto
}
function proyectos() {
cd /var/www/html/jobran/ && ls -lt --color=auto
}
php-server() {
local framework=$1
local port=${2:-8000}
local ruta=$3
case "$framework" in
yii2)
ruta=${ruta:-backend/web}
php -S localhost:$port -t "$ruta"
;;
laravel)
ruta=${ruta:-public}
php -S localhost:$port -t "$ruta"
;;
*)
echo "⚠️ Framework no reconocido: '$framework'"
echo "Usa: yii2 o laravel"
;;
esac
}
#Alias para iniciar el servidor PHP para Yii2
#alias php-s-yii2='php -S localhost:8001 -t "backend/web"'
#alias php-s-laravel='php -S localhost:8001 -t "public"'
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
sudo
history-substring-search
colored-man-pages
composer
laravel
docker
extract
)
# 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 -h localhost -U postgres -W"
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"
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter