Here are ten shell commands, functions, and aliases that I use frequently on the job to save time and perform actions more consistently. Hopefully the

Ten Useful Shell Shortcuts

submited by
Style Pass
2023-01-27 17:30:22

Here are ten shell commands, functions, and aliases that I use frequently on the job to save time and perform actions more consistently. Hopefully they are helpful for you to use or to inspire you to create your own automations!

This function will prepend anything in your branch name before the second dash and prepend it to a commit message. For example, if you are on the git branch username/TICKET-707-validate-policy-name-on-create-and-rename and run

This command combines lsof and kill commands to kill any process running on an input port. Useful for fixing EADDRINUSE errors, but be careful with this!

This is a simple alias that checks out the last git branch that you were on and is useful in switching between main and feature branches.

Similarly checking the status of a git repo is such a frequent action that it’s also worth making a two keystrokes (“s” + “enter”).

This function will ask you for a Jira ticket and title and then open Google Chrome to https://bitbucket.org/branch/create?issueKey=username/ticketnumber&issueType=Story&issueSummary=branchdescription , a page where you can quickly create a branch on remote repos you have access to. This function is useful to quickly create branches and opening Chrome from the command line to specific URL is useful for other applications as well.

Leave a Comment