addet coding aliasses

This commit is contained in:
pika 2024-08-02 16:58:07 +02:00
parent 19763f0a58
commit 79473ef90f

View file

@ -192,18 +192,21 @@ if command -v hugo >/dev/null 2>&1
end end
set IP (ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1) # set IP (ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1)
function get_ip
command ip a | command grep 'inet ' | command grep -v '127.0.0.1' | command awk '{print $2}' | command cut -d/ -f1 | head -n 1
end
if command -v php >/dev/null 2>&1 if command -v php >/dev/null 2>&1
alias phpserve="php artisan serve --host=$IP" alias phprun="php artisan serve --host=(get_ip) --port=8000"
end end
if command -v npm >/dev/null 2>&1 if command -v npm >/dev/null 2>&1
alias npmrun="npm run dev -- --host=$IP" alias npmrun="npm run dev -- --host=(get_ip) --port=8001"
end end
# ─< c stands for bin/cake >────────────────────────────────────────────────────────────── # ─< c stands for bin/cake >──────────────────────────────────────────────────────────────
alias cake='bin/cake' alias cake='bin/cake'
alias c='cake' alias c='cake'
alias cs='c server -p 1313' alias cs='c server -p 1313 --host=(get_ip)'
# ─< VSCodium >───────────────────────────────────────────────────────────────────────────── # ─< VSCodium >─────────────────────────────────────────────────────────────────────────────
if command -v codium >/dev/null 2>&1 if command -v codium >/dev/null 2>&1