4.2 KiB
4.2 KiB
📝 Changelog for Alias File Revision
Version: Updated Alias File (Current Date: 2024-11-17)
✨ Added
-
📁 File and Directory Management:
..
,...
,....
: Navigate up one, two, or three directories.back
: Go back to the last directory.la
: List all files (excluding.
and..
) with human-readable sizes.lsd
: List only directories.
-
🌟 Git Shortcuts for Productivity:
gs
: Git status.ga
: Git add.gc
: Git commit with a message.gl
: Pretty Git log (graph format).
-
🖥️ System Monitoring & Management:
dfh
: Disk usage in human-readable format.duh
: Folder sizes in human-readable format.journal
: View critical system logs.meminfo
: View memory usage in MB.cpuinfo
: Show CPU information.
-
⚙️ Configuration Shortcuts:
bashrc
,zshrc
,vimrc
,profile
: Quickly edit configuration files.reload
: Reload.zshrc
file without restarting the shell.
-
💡 Quality of Life Improvements:
cls
: Clear the terminal screen.now
: Show the current date and time.cwd
: Copy the current working directory to the clipboard.- Fun shortcuts like
shrug
(¯\_(ツ)_/¯),lenny
( ͡° ͜ʖ ͡°),flip
(╯°□°)╯︵ ┻━┻, andunflip
┬─┬ ノ( ゜-゜ノ).
❌ Removed
-
⚠️ Dangerous or Redundant Aliases:
del
:alias del='mv -t ~/.local/share/Trash'
- 🔒 Reason: Risk of unintended file deletion by masking commands. Use dedicated trash utilities like
trash-cli
instead.
- 🔒 Reason: Risk of unintended file deletion by masking commands. Use dedicated trash utilities like
cleanup
:alias cleanup="paru -Rns $(paru -Qtdq) && paru -Sc"
- 🚨 Reason: Automatically removing orphaned packages and cache without review is unsafe. Run
paru -Qtdq
manually for review instead.
- 🚨 Reason: Automatically removing orphaned packages and cache without review is unsafe. Run
flushdns
:alias flushdns="sudo systemctl restart systemd-resolved"
- ❌ Reason: This is specific to
systemd-resolved
and may not apply to all systems. Avoid aliases dependent on a single environment.
- ❌ Reason: This is specific to
timer
: A long-running alias that could confuse users:alias timer="echo 'Timer started. Stop with Ctrl+C.' && date +%s && while true; do sleep 1; done"
- 🛑 Reason: Infinite loops can cause confusion. Use a script or dedicated timer tool instead.
-
🤪 Fun Aliases Removed:
party
: A whimsical alias with no functional use.- Reason: Focus on meaningful and productive aliases.
🔄 Changed
-
🚀 System-Specific or Unsafe Aliases Adjusted:
rm
command is now safer (not included directly in aliases):- Suggest replacing
rm
with a custom safeguard function (safe_rm
) to block dangerous commands likesudo rm -rf /
.
- Suggest replacing
-
🛠️ Alias Loading Order Improved:
- Plugins and framework sources (
zsh-autosuggestions
,zsh-syntax-highlighting
) now load before aliases and custom functions to avoid conflicts.
- Plugins and framework sources (
📚 Reorganized
- 🔧 Improved File Structure for Readability:
- Organized aliases into categories: File Management, Git Shortcuts, System Monitoring, Package Management, Quality of Life, and Fun.
- Placed system-specific commands (e.g.,
paru
aliases) into a dedicated section. - Removed ambiguity by grouping similar aliases together for better maintainability.
🎯 Why These Changes?
- 🛡️ Safety: Prevent unintended consequences from ambiguous or dangerous aliases (e.g.,
del
andcleanup
). - ✅ Clarity: Focus on aliases that are genuinely useful for day-to-day tasks.
- 🌐 Compatibility: Make the alias file system-agnostic by avoiding environment-specific commands (e.g.,
systemd-resolved
forflushdns
). - ⚡ Efficiency: Provide shortcuts for frequently used tasks without overloading the configuration.
🚀 Future Improvements
- 🛠️ Add dynamic checks for system-specific commands to prevent sourcing incompatible aliases.
- 🧹 Introduce more safeguards for dangerous operations (e.g., using
safe_rm
to block destructive file deletions). - 🌟 Expand aliases with productivity-enhancing shortcuts for commonly used tools or workflows (e.g., Docker, Kubernetes, etc.).