This repository contains a collection of useful aliases and shortcuts designed to enhance your command-line experience. The provided .bash_aliases file includes shortcuts for various tasks, including file operations, Laravel Artisan commands, Composer operations, custom scripts, and SSH-related actions.
This repository provides a set of convenient aliases and shortcuts to simplify your command-line tasks. The aliases are organized into categories such as file operations, Laravel Artisan commands, Composer shortcuts, custom scripts, and SSH-related actions. These shortcuts are designed to save you time and effort by allowing you to execute common commands with fewer keystrokes.
To set up the aliases on your macOS system, follow these steps:
Before making any changes, it's recommended to back up your existing configuration files to avoid any accidental data loss. Open your terminal and execute the following commands:
cp ~/.bash_aliases ~/.bash_aliases.bak
cp ~/.zshrc ~/.zshrc.bakCopy the .bash_aliases file from this repository:
touch ~/.bash_aliases
code ~/.bash_aliasesOpen your .zshrc file in a text editor. If you're using Visual Studio Code, you can use the following command:
code ~/.zshrcAdd the following lines at the end of the .zshrc file to load the aliases:
# Source bash aliases if available
if [ -f ~/.bash_aliases ]; then
builtin source ~/.bash_aliases
fiAfter saving the changes to your .zshrc file, reload the configuration to apply the changes without restarting your terminal:
source ~/.zshrcOnce the aliases are installed, you can start using them in your terminal. Here are a few examples:
-
To edit your aliases configuration:
edit-aliases
-
To run a Laravel Artisan command:
a migrate
-
To install a Composer package:
cr package-name
-
To run custom scripts from vendors:
pint
Refer to the full list of aliases and their explanations in the .bash_aliases file.
The .bash_aliases file includes an alias-help function that provides a quick overview of all defined aliases. You can use the following command to display the alias help:
alias-help