Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NickNameManager

Revision History

Author Version Date Description

skr444

1.2

2022-07-27

Updated Changes.

skr444

1.1

2022-02-09

Added change list Changes.

skr444

1.0

2022-01-29

Created document.

1. NickNameManager

Project URL

https://github.com/skr444/nicknamemanager.git

Latest stable version

3.1.0

Minimum Powershell version

5.1

1.1. Abstract

This module is the successor of the ch2.ps1 script, which was converted into a Powershell module as a training exercise. The ch2.ps1 script was created to make a very simple path shortcut navigation. While it was fun to make and is still used occasionally, it does not hand the torch to the excellent z module from badmotorfinger, which I highly recommend if you like Powershell.

1.2. Features

  • Allows creation, management and usage of user defined path aliases.

  • Stores path aliases in a user defined text file.

  • Offers convenience functions for easier shell navigation.

  • Works on Windows and Linux.

  • Supported path placeholders:

    • {user} will be replaced with the current user name.

    • {<SpecialFolder>} will be resolved with the path defined by SpecialFolder.

1.2.1. SpecialFolder

All the Environment.SpecialFolder values are supported as placeholders and can be resolved by the module. Check the available values with:

[System.Enum]::GetNames([System.Environment+SpecialFolder])

Check the samples/nicknames.txt file for an example.

1.3. Installation

  1. Run the build script.

  2. Decide which Powershell profile you want to install this module in.

    • Find available Powershell module locations with $Env:PSModulePath -split ';'

  3. Copy the entire output folder NickNameManager to the chosen module folder.

    • See the module available for import with Get-Module -ListAvailable.

  4. Open a Powershell console and import the module with Import-Module -Name NickNameManager.

    • The module will only be available for the duration of the session.

  5. Use the Add-NickNameManagerToProfile cmdlet to make the module available for future sessions.

    • This cmdlet is only available when the module has been imported into the current session.

1.3.1. Customization

  • Optionally import your nick name entries from an old script (e.g. ch2.ps1) or other file using the Import-NickNames cmdlet.

  • Change the storage file path by adding $NickNameStoreFullpath = "<my-custom-path>" to the profile after the import instruction.

1.4. Known bugs

None at the moment.

1.5. Changes

Please keep latest changes at the top.

Date Version Changes

2022-07-27

3.1.0

Added new feature: Special folder resolver

  • Allows starting a path with a special folder placeholder.

  • Refactored folder resolution function to allow adding more placeholder types.

2022-02-09

3.0.1

Replaced Get-Partition in the Get-LocalDriveLetters function with Get-PSDrive because:

  • Get-Partition is not Powershell 7 compatible.

  • Get-PSDrive is Powershell 7 compatible and works on Linux.

2022-01-29

3.0.0

Initial version of ch2.ps1 as a module.

About

User defined path aliases for Powershell

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages