Welcome to my personal collection of useful PowerShell aliases and functions designed to enhance productivity. This repository contains a set of custom commands and shortcuts to streamline your workflow in PowerShell.
- Directory Shortcuts: Quickly navigate to frequently used directories.
- Command Shortcuts: Simplify common tasks with custom commands.
- IDE Shortcuts: Open projects in WebStorm with ease.
- Git Shortcuts: Manage your Git repositories with simple commands.
-
Clone the repository:
git clone https://github.com/LyneQ/PowerShell-Aliases.git
-
Navigate to the directory:
cd PowerShell-Aliases
-
Install required modules:
Install-Module -Name Get-ChildItemColor -Scope CurrentUser
-
Copy the
alias.ps1
file to your PowerShell profile directory:cp alias.ps1 $PROFILE.CurrentUserAllHosts
-
Source the aliases file: Add the following line to your
Microsoft.PowerShell_profile.ps1
:. ($PSScriptRoot + "\alias.ps1")
The Microsoft.PowerShell_profile.ps1
file is typically located in the following directory:
- Windows:
C:\Users\<YourUsername>\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
If the file does not exist, you can create it manually in the specified directory.
To ensure better compatibility, it is recommended to update PowerShell to the latest version. Follow these steps:
-
Download the latest version of PowerShell: Visit the PowerShell GitHub releases page and download the latest stable release for your operating system.
-
Install PowerShell: Follow the installation instructions provided on the GitHub releases page for your specific operating system.
-
Verify the installation: Open a new PowerShell session and run the following command to verify the version:
$PSVersionTable.PSVersion
-
Go to Becode directory:
becode
-
Go to Projects directory:
projects
-
Go to Home directory:
home
- Clear the screen and show directory contents:
cls
-
Open current directory with WebStorm:
ws
-
Open file with NeoVim:
vi <file_path>
-
Display help for All git shortcut alias:
gth
-
Show Git status:
gts
-
Commit changes with a message:
gtc "Your commit message"
-
Push changes to the remote repository:
gtps
-
Pull changes from the remote repository:
gtpl
Contributions are welcome! Please fork this repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, feel free to open an issue or contact me directly.
Happy scripting!