Post

My new favorite alias: alias gho="gh pr view >/dev/null 2>&1 && gh pr view -w || gh pr create --web" If there already is a PR for your current branch, open it in the browser, if not, open the create view. It even prompts you to push your branch to the remote in case you forgot.

Also neat if you work in different repos with different package managers: alias st="if [[ -f pnpm-lock.yaml ]]; then pnpm start; elif [[ -f yarn.lock ]]; then yarn start; else npm start; fi" This runs the start script depending on localy used package manager.

By now I found an even better way to do this using @antfu.me 's ni. alias st="nr start" alias dev="nr dev"

0 reposts0 likes