diff --git a/aliases.fish b/aliases.fish index d580c0d..80883cb 100644 --- a/aliases.fish +++ b/aliases.fish @@ -192,18 +192,21 @@ if command -v hugo >/dev/null 2>&1 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 - alias phpserve="php artisan serve --host=$IP" + alias phprun="php artisan serve --host=(get_ip) --port=8000" end 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 # ─< c stands for bin/cake >────────────────────────────────────────────────────────────── alias cake='bin/cake' alias c='cake' -alias cs='c server -p 1313' +alias cs='c server -p 1313 --host=(get_ip)' # ─< VSCodium >───────────────────────────────────────────────────────────────────────────── if command -v codium >/dev/null 2>&1