In the development, sometimes some commands are longer, more difficult to remember, in order to fast development, need to customize some terminal commands, to achieve fast operation! The following is a small series with macOS custom terminal method, interested partners welcome reference!

Git commit

Git commit -m ‘feat: XXX ‘// Commit ‘feat: XXX

steps

1. Run the command in the MAC root directory ~

Open.zshrc // Q:.zshrc is what? // A: Used for customization and personalized configuration. You can define aliases, paths, etc.

// Q: no. ZSHRC // A: CD ~ &&touch.zshrc

2. In this file, configure the user-defined commands

Alias [new name]=”[original command]”

4. Run the command to take effect

source .zshrc

Configure the reference

Alias root=” CD ~/project/h5″ // Paths to save all my projects Alias clone=”git clone” alias commit=”git add. && git commit -m” alias run=”npm run” alias dev=”npm run dev” alias rtest=”npm run release:test” alias ruat=”npm run release:uat” alias rprod=”npm run release:prod” alias i=”npm install” alias ui=”npm uninstall”

This is the macOS custom terminal command method, I hope to help you.