最近社内の一部でpecoが流行っているので、流行に乗ってlaunchctl start/stopの対象をペコるシェル関数を作ってみた。 function launchctl-start() { local SERVICE_NAME SERVICE_NAME=$(launchctl list | grep "^-" | peco | head -n 1 | cut -f 3) if [ -n "$SERVICE_NAME" ]; then echo "Start ${SERVICE_NAME}" launchctl start $SERVICE_NAME else return 1 fi } function launchctl-stop() { local SERVICE_NAME SERVICE_NAME=$(launchctl list | grep -v "^-" | peco |