Siddhesh Patil is an Android Engineer at Paytm Insider. Works on Paytm consumer and business apps. He is the organzier of Kotlin Mumbai, a developer community in Mumbai, India. Find talks, articles and latest developments in Android and Kotlin on this website siddroid.com

Siddroid

Articles on Android, Kotlin and open-source projects

article

Home

explore

Browse

search

Search

Siddroid

About

Siddhesh Patil is an Android Engineer at Paytm Insider. Works on Paytm consumer and business apps. He is the organzier of Kotlin Mumbai, a developer community in Mumbai, India. Find talks, articles and latest developments in Android and Kotlin on this website siddroid.com

Siddroid

article

Home

explore

Browse

search

Search

Siddroid

About

Hacktoberfest: Speed up your workflows with ZSH and command line aliases!

  ·  3 min read

  ·  249 views

Setting up ZSH on Mac and improving your productivity and workflows

Using ZSH and OHMYZSH and Command line aliases

Workflows can get tedious, often at times you’ll find yourself switching between tools to accomplish your tasks. Any Android developer would be familiar with the vicious cycle that is coding, executing, commiting, pushing your changes, raising your PRs! Many a times switching branches, forking new ones and what not!

Most of us are familiar with using Git and we have our choices of tools as well. Since the last two months, my workflows have been enjoyable and fast. Before using ZSH and command line aliases I would be resorting to tools like Sourcetree, Github GUI or the standard VCS provided in Android Studio.

During a team meet I saw my CTO, Neehar at Paytm Insider use commands like “glog” “gs” etc while demonstrating a branching strategy. He went on to explain how command line aliases are making things easier for him. I was amazed, I had never thought about it. To my surprise many of my colleagues were already using ZSH or other shells with their own alias setups.

It made me think the amount of time I spend looking at these interfaces and switching between tools throughout the day to accomplish simple tasks.

I setup ZSH along with OHMYZSH and made simple aliases for things like:

  • switching between projects
  • Basic git functionality like checking out branches, creating new ones, looking at statuses, reviewing logs in graph view etc
  • creating bundles without accessing bundle tool directly

The amount of optimization you can do with your workflow is completely upto you. If you find yourself using a commandline utility a lot of times, make an alias for it!

Setting up ZSH with OHMYZSH

Setting up ZSH with OHMYZSH is super easy

ZSH can be setup via brew

brew install zsh

OHMYZSH installation guide you can find in their Github readme.

Setting aliases

Do the alias setup once you install OHMYZSH. To setup aliases you’ll have to find .zshrc file in your user’s root. To access this on mac just use:

CMD + Shift + H

To access your user root in finder. Then

CMD + Shift + .

To access your hidden files

Edit your .zshrc file, there are sample aliases in the default file.

Event details

This event was a cross colaboration between various communities in India like Google Developer Group Mumbai, Tensorflow User group Mumbai, Flutter Mumbai and Kotlin Mumbai of course!

I went on to talk about commandline aliases and another co-organizer of Kotlin Mumbai, Chintan Parmar talked about contributing to Kotlin based projects during Hacktoberfest.

Post the talk we had a productive discussion between communities about open-source contributions.

You can view the slides here:

About the author

Siddhesh Patil is an Android Engineer at Paytm Insider. Works on Paytm consumer and business apps. He is the organzier of Kotlin Mumbai, a developer community in Mumbai, India. Find talks, articles and latest developments in Android and Kotlin on this website siddroid.com

Siddhesh is an Android Engineer and Kotlin Advocate from Mumbai. He currently makes apps for Paytm and Insider.in, working on Paytm's chat, payments, merchant and entertainment ticketing businesses. Over the years he has published several apps for Android that have helped clients reach their targets. Companies like Axis Bank, Yes Bank, ICICI have benifited from apps he has developed.

He also organizes an open-community for developers called Kotlin Mumbai, often participating as a speaker and helping everyone learn Android and Kotlin.

This publication was last updated on June 5, 2021

Share on