Skip to content

My personal collection of useful PowerShell aliases and functions to enhance productivity

Notifications You must be signed in to change notification settings

LyneQ/PowerShell-Aliases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

PowerShell-Aliases

PowerShell Windows

Overview

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.

Features

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/LyneQ/PowerShell-Aliases.git
  2. Navigate to the directory:

    cd PowerShell-Aliases
  3. Install required modules:

    Install-Module -Name Get-ChildItemColor -Scope CurrentUser
  4. Copy the alias.ps1 file to your PowerShell profile directory:

    cp alias.ps1 $PROFILE.CurrentUserAllHosts
  5. Source the aliases file: Add the following line to your Microsoft.PowerShell_profile.ps1:

    . ($PSScriptRoot + "\alias.ps1")

Finding Microsoft.PowerShell_profile.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.

Updating PowerShell

To ensure better compatibility, it is recommended to update PowerShell to the latest version. Follow these steps:

  1. Download the latest version of PowerShell: Visit the PowerShell GitHub releases page and download the latest stable release for your operating system.

  2. Install PowerShell: Follow the installation instructions provided on the GitHub releases page for your specific operating system.

  3. Verify the installation: Open a new PowerShell session and run the following command to verify the version:

    $PSVersionTable.PSVersion

Usage

Directory Shortcuts

  • Go to Becode directory:

    becode
  • Go to Projects directory:

    projects
  • Go to Home directory:

    home

Command Shortcuts

  • Clear the screen and show directory contents:
    cls

IDE Shortcuts

  • Open current directory with WebStorm:

    ws
  • Open file with NeoVim:

    vi <file_path>

Git Shortcuts

  • 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

Contributing

Contributions are welcome! Please fork this repository and submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, feel free to open an issue or contact me directly.


Happy scripting!

About

My personal collection of useful PowerShell aliases and functions to enhance productivity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published