Alias Manager is a Python script that helps you efficiently manage command-line aliases in your ~/.bashrc file. It organizes aliases into groups (e.g., Git commands, Docker commands, etc.), preventing duplication and ensuring better readability by maintaining an auto-generated section.
- Group-based Alias Management: Adds aliases in categorized sections.
- Avoids Duplicates: Ensures that existing aliases are not duplicated.
- Auto-Generated Section: Keeps aliases structured under a dedicated marker.
- Interactive Menu: Allows users to easily add, list, and create custom aliases.
-
Clone this repository:
git clone https://github.com/yourusername/alias-manager.git cd alias-manager -
Make sure you have Python installed (Python 3 recommended).
-
Run the script:
python3 alias_manager.py
When running the script, you will be presented with an interactive menu:
- Add aliases from predefined groups: Choose from main commands, Git commands, and Docker commands.
- Create custom alias: Define a new alias and command manually.
- List all aliases: View existing aliases in
~/.bashrc. - Exit: Quit the script.
alias l='ls'
alias cl='clear'alias gst='git status'
alias ga='git add'alias dps='docker ps'
alias dc='docker container'- The script first checks for a special marker in
~/.bashrc:-----AUTO GENERATED BY AV PYTHON SCRIPT -----
- If the marker doesn’t exist, it adds one.
- When adding aliases, the script organizes them under sections like:
-----MAIN COMMANDS----- alias l='ls' alias cl='clear'
- Custom aliases can be manually added through the menu.
If you'd like to improve or extend this script, feel free to fork the repository and submit a pull request.
This project is open-source and available under the MIT License.
Developed by me.