If you work frequently in the terminal, you probably use bash aliases to shorten long commands. But managing them can be frustrating โ editing .bashrc, searching through files, forgetting what you created last month...
aliasctl solves these problems with an elegant, colorful, and intuitive interface that makes alias management a pleasure, not a chore.
โจ What Does It Offer?
Intuitive Interface
Forget about manually editing configuration files. aliasctl gives you a beautiful menu with clear options and a modern color palette that makes work enjoyable.
Core Features
๐ View Aliases โ See all your aliases in an elegant table with color formatting. Each alias is clearly displayed with its name and corresponding command.
โ Easy Addition โ Create a new alias in seconds with an interactive dialog that guides you step by step.
๐๏ธ Quick Removal โ Delete unnecessary aliases quickly and easily, without worrying about breaking anything.
โ๏ธ Direct Editing โ For advanced users, you can open the alias file directly in your favorite editor.
๐ FZF Integration โ If you have fzf installed, you get powerful fuzzy search through all your aliases in real-time.
๐ Built-in Help โ Embedded documentation showing where aliases are stored and how to load them.
Why It's Different
- Visual Appeal โ Beautiful color scheme with box-drawing characters and emojis
- Validation โ Checks input data and prevents errors
- Informative โ Clear messages for every action
- Safety โ Cannot create two aliases with the same name
- Convenience โ Everything in one place, without opening multiple files
๐ Installation
Download and install the script with a single command:
wget https://gist.fedia.eu/urocibg/6a5335aab5a2461c9ffc84792c16e468/raw/HEAD/aliasctl
sudo mv aliasctl /usr/local/bin/aliasctl
sudo chmod +x /usr/local/bin/aliasctl
Then simply type in your terminal:
aliasctl
๐ก How It Works
aliasctl stores all your aliases in a separate file ~/.fedya_aliases. This keeps your .bashrc clean and organized.
To automatically load aliases every time you enter the terminal, add this line to your ~/.bashrc:
[ -f ~/.fedya_aliases ] && source ~/.fedya_aliases
๐ฏ Who Is It For?
- Beginners โ who want an easy way to manage their aliases
- Advanced Users โ who appreciate good UX and automation
- System Administrators โ who work with multiple systems and want consistency
- Developers โ who use dozens of aliases every day
๐ Usage Examples
Imagine you frequently use:
-
git statusโ create aliasgs -
docker-compose up -dโ create aliasdup -
systemctl restart nginxโ create aliasrn
With aliasctl, creating, viewing, and managing these aliases takes seconds, not minutes.
Quick Start Guide
1. Launch aliasctl
aliasctl
You'll be greeted with a beautiful menu:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Bash Alias Manager v2.0 โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ 1๏ธโฃ View all aliases โ
โ 2๏ธโฃ Add new alias โ
โ 3๏ธโฃ Remove alias โ
โ 4๏ธโฃ Edit aliases file โ
โ 5๏ธโฃ Search aliases (FZF) โ
โ 6๏ธโฃ Help โ
โ 0๏ธโฃ Exit โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2. Create Your First Alias
Select option 2 and follow the prompts:
Enter alias name: gs
Enter command: git status
โ Alias 'gs' successfully created!
3. View Your Aliases
Select option 1 to see a formatted table:
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Alias โ Command โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ gs โ git status โ
โ dup โ docker-compose up -d โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโ
4. Search with FZF (Optional)
If you have fzf installed, select option 5 for instant fuzzy search through all your aliases.
๐ฆ Requirements
- Bash shell
- Linux system (Fedora, Ubuntu, Debian, etc.)
- Optional:
fzffor fuzzy search
Advanced Features
Input Validation
aliasctl prevents common mistakes:
- No duplicate alias names
- No empty commands
- No special characters that could break your shell
Automatic Backup
Before making any changes, aliasctl creates a backup of your aliases file, so you can always restore if something goes wrong.
Custom Editor Support
Use your preferred editor for direct editing:
export EDITOR=vim # or nano, emacs, etc.
๐ฎ Future Possibilities
The tool is under active development. Planned features:
- Export/import aliases
- Categorization and groups
- Synchronization between machines
- Backup and restore
- Usage statistics
Real-World Workflow
Here's how aliasctl fits into your daily routine:
Morning:
# Check your aliases before starting work
aliasctl
# Select option 1 to review what you have
During Work:
# Found a long command you use often?
aliasctl
# Select option 2, add it as an alias in seconds
Code Review:
# Need to find that Docker alias?
aliasctl
# Select option 5 for FZF fuzzy search
Common Alias Ideas
Get inspired by these popular aliases:
Git Shortcuts:
gs โ git status
ga โ git add .
gc โ git commit -m
gp โ git push
gl โ git log --oneline --graph
Docker Management:
dps โ docker ps
dpa โ docker ps -a
dup โ docker-compose up -d
ddn โ docker-compose down
System Administration:
ll โ ls -lah
ports โ netstat -tulanp
myip โ curl ifconfig.me
๐ค Conclusion
aliasctl is more than a simple script โ it's a tool that makes your daily terminal work more productive and enjoyable. The beautiful interface, easy usage, and powerful features make it an indispensable assistant for anyone working on the command line.
Try it today and see how a small tool can make a big difference!
๐ Read the full article in Bulgarian: aliasctl - ะะพะดะตัะตะฝ ะผะตะฝะธะดะถัั ะทะฐ Bash ะฐะปะธะฐัะธ
If you found this helpful, check out more hands-on IT guides at itpraktika.com ๐
What's your favorite bash alias? Share in the comments! ๐ฌ
Top comments (0)