Skip to content

Instantly share code, notes, and snippets.

@Shaz3e
Created December 29, 2024 12:28
Show Gist options
  • Save Shaz3e/5af1d4341fa4c750ae3e2a6d2738ffbd to your computer and use it in GitHub Desktop.
Save Shaz3e/5af1d4341fa4c750ae3e2a6d2738ffbd to your computer and use it in GitHub Desktop.
Create Shortcut Command in Mac

Open terminal Type: echo $SHELL If the output is /bin/zsh, you're using Zsh (default on macOS Catalina and later). Otherwise, you might be using Bash.

For Zsh:

nano ~/.zshrc

For Bash:

nano ~/.bash_profile

Add the Alias: Add the following line to create an alias for example php artisan:

alias art="php artisan"

Save and Close:

In Nano, press Ctrl + O to save, then press Enter. Press Ctrl + X to exit.

Apply the Changes: Reload your shell configuration by running:

source ~/.zshrc   # For Zsh
source ~/.bash_profile  # For Bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment