Upgraded this to be two shell functions that I have in my bash profile that don’t require Raycast Text snippets (which were borking in the VSCode Terminal)
# Echo all processes using a given portfunction up() { local port=$1 local pids=$(lsof -t -i :$port) if [[ -n $pids ]]; then echo "Processes using port $port:" echo "$pids" else echo "No processes found using port $port." fi}# Kill All Processes Using Portfunction kp() { local port=$1 local pids=$(lsof -t -i :$port) if [[ -n $pids ]]; then echo "Processes using port $port:" echo "$pids" echo "Killing processes..." kill $pids echo "Processes killed." else echo "No processes found using port $port." fi}