Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

powercode/CDPath

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDPath

PowerShell module to make navigating your system a breeze.

The main function of the module is Set-CDPathLocation (below referenced by 'cd') and supports the following:

  • Go to previous location without pushd/popd (cd -)
  • Go upwards multiple levels (cd ....)
  • Go to a directory in a predefined path
  • Integration with TabExpansion++

Usage

Assuming you've installed the module somewhere in your module path, just import the module in your profile, e.g.:

Import-Module CDPath

To setup the CDPath, i.e. the parent directories of the directories you most often navigate to, call

# a user who has github projects and a directory where corporate source code is stored
# may set up the path like this 
Set-CDPath -Path ~\Documents\GitHub,d:\corpsrc,~\documents

The CDPath is persisted at ~/Documents/WindowsPowerShell/cdpath.txt

Imagine the following directory structure

~/Documents/
	GitHub
		PSReadLine
		TabExpansionPlusPlus
		CDPath
	WindowsPowerShell
		ArgumentCompleters
		Modules
D:\CorpSrc
	PSApi
	ToolingApi
	Frontend
	Backend

Navigation can then be done like this:

# go to PSReadline
PS> cd psr

 go to ~\Documents\WindowsPowerShell\Modules
cd win mod

# go to D:\CorpSrc\ToolingApi
cd too

# go to ~\Documents\GitHub\TabExpansionPlusPlus
cd tab
# go up three levels
cd ....
# go back to previous directory 
cd -

About

PowerShell module to make navigating your system a breeze

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.