Jump-Location - A Change Directory (CD) PowerShell Command that reads your mind
There's a lovely little utility called autojump for *nix consoles that makes the 'cd' command very smart. More that just auto-completion, it's a kind of "auto guessing." Hence, autojump. There is some beginning Windows support, but instead I turned to Tim Kellogg's open source PowerShell implementation "Jump-Location."
What a joy.
First, I was like "jump-location?" I'm not going to type that. But then, of course, duh. Aliases.
Jump-Location is aliased to just j, which means I can now do awesome stuff like this:
c:\> j sc
c:\users\scott> j g
c:\users\AppData\Local\GitHub> j des
c:\users\scott\Desktop>
But there's more. It's actually watching how long you are in a directory and keeping stats. You can see the weighted stats with "jumpstat" and the "database" is just a text file in ~\jump-location.txt.
If "j d" isn't enough to get me into C:\GitHub\DisProject then I can do "j g d" and I'm there. It's amazing.
Installation is easy, and I hope it gets on PsGet soon for even easier installation. Just unzip, unblock, ensure that your PowerShell execution policy allows scripts, and run ./install.ps1.
NOTE: Don't run install from your desktop, or a temp folder. Put the Jump-Location folder somewhere where it will live, and it's going to add a line like this to your user profile ("C:\Users\YOU\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1") like this, so you'll want to install from a final path:
Import-Module 'C:\Users\Scott\Dropbox\utils\Jump-Location-0.5.1\Jump.Location.psd1'
I'm excited about this great little utility. Head over to https://github.com/tkellogg/Jump-Location and STAR it in GitHub, and give it a go! Tim, the author, is on Twitter at @kellogh. Other contributors include Sergey Vorobyev.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
It appears that the .zip doesn't contain the necessary .dlls.
Trying to build the project in VisStudio 2013 is equally problematic -- necessary nuget packages aren't updated, and even when they are, the project doesn't build.
Like I say, very disappointing.
Import-Module : Could not load file or assembly 'file:///C:\users\[someguywhoreadshansleman]\OneDrive\Powershell\JumpLocation\Jump.Location.dll' or one of its dependencies. Operation is not
supported. (Exception from HRESULT: 0x80131515)
At C:\users\[someguywhoreadshansleman]\OneDrive\Powershell\JumpLocation\Load.ps1:14 char:2
+ Import-Module $dllpath -Global -DisableNameChecking
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand
Basically it's bookmarking for directories. So I'll type 'go db' to go to c:\projects\database or 'go de' for c:\users\[username]\desktop etc. I had to set up these 'bookmarks' manually but I only have maybe half a dozen and they rarely change.
https://github.com/vincpa/z
Has anybody used Z before, how does it compares to AutoJump?
I think it was the father of all these little tools that make navigating through tons of folders a breeze.
Also, I think WCD (Wherever Change Directory) runs on both Windows and *nix machines.
I'd rather use Windows Explorer and use the "ConEmu Here" right-click integration.
Note that the Chocolatey package doesn't uninstall properly and leaves the entry it created in the PS profile.
Just go to My Documents -> WindowsPowerShell and edit the "Microsoft.PowerShell_profile.ps1" file in a text editor.
I just moved the jump-location lines to the top and restarted powershell. Hopefully that works for you too.
"The term 'scaffold' is not recognized as the name of a cmdlet, function, script file, or operable program"
Our requirement is to automate T4scaffolding and generated files move to another shared folder using junkin.
Please reply ASAP.
Thanks, JIVESH
I did find a bug in it. It doesn't properly handle folders with parenthesis in the name. It'll add it to the database but will throw an error when you try to use jump-location to navigate there.
Maybe some day I'll find the time to fork the source and fix that but not this day.
Comments are closed.