A collection of personal terminal scripts, aliases, and configurations for macOS, Ubuntu (WSL), Windows Command Prompt, and PowerShell.
- Git Aliases: Standard shortcuts (
ga,gc,gb,gcm,gpo, etc.) to speed up development. - Login Templates: Helper functions for testing request-based authentication tools (e.g., Teleport
tsh). - Proxy Toggles: Easily toggle network proxies on and off (available in Unix-based setups).
Want to try the scripts out without modifying your system profiles?
- macOS & Ubuntu: Run
source macos/.zshrcorsource ubuntu/.zshrcin your current terminal. The changes only last until you close the window. - Windows (Command Prompt): Run
windows\aliases.batin your current CMD window. - Windows (PowerShell): Run
. .\windows\profile.ps1in your current PowerShell window.
You can also safely run the installers in Dry Run mode to see what files would be modified without actually changing anything:
- Bash:
./install.sh --dry-run - PowerShell:
.\install.ps1 -DryRun
- Clone the repository to a permanent location on your machine.
- Run the install script for your platform:
macOS & Ubuntu (WSL)
cd custom-scripts
chmod +x install.sh
./install.shWindows (Command Prompt & PowerShell) Open PowerShell (as Administrator for best results) and run:
cd custom-scripts
.\install.ps1If you prefer to install manually, you can copy the respective configuration files to your system:
- macOS:
cp macos/.zshrc ~/.zshrc - Ubuntu:
cp ubuntu/.zshrc ~/.zshrc - Windows (CMD): Add a registry key in
HKCU\Software\Microsoft\Command ProcessorforAutoRunpointing towindows\aliases.bat. - Windows (PS): Add
. "C:\Path\To\custom-scripts\windows\profile.ps1"to your$PROFILE.
(Note: On Ubuntu, ensure zsh is installed sudo apt install zsh and set as the default shell chsh -s $(which zsh)).
Standard aliases available across all platforms:
ga->git addgcm "msg"->git commit -m "msg"gb->git branchgpo->git push origingpl->git pull
Smart Fallbacks (PowerShell only) Because PowerShell has built-in aliases that conflict with common Git shortcuts, the Windows PowerShell profile includes "smart fallback" logic:
gcm: If you pass a valid PowerShell command (e.g.,gcm ls), it acts asGet-Command. Otherwise, it acts asgit commit -mand automatically stitches your words together so you don't need quotes (e.g.,gcm added new feature).gc: If you pass an existing file path (e.g.,gc README.md), it safely acts asGet-Contentto read the file. Otherwise, it acts asgit checkout. (Note: To discard changes on an existing file, you must type out the fullgit checkout filenameto prevent accidental data loss).
# Example usage for logging into Teleport with a Request ID
tshLogin <request-id># Enable Proxy
use-proxy
# Disable Proxy
no-proxy
# Status
proxy_status # (Returns 🟢 or 🔴)Batch file for Windows Command Prompt.
- Contains standard aliases, login template, and helper functions.
PowerShell profile script.
- Contains standard functions, aliases, and login template formatted for PowerShell.
macOS zsh configuration.
- Standard aliases, proxy toggles, and login templates.
Ubuntu (WSL) zsh configuration.
- Standard aliases, proxy toggles, and login templates.
This project is licensed under the MIT License. See the LICENSE file for details.
Happy coding! ~Hasimy