Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

5,443

Downloads of v 0.6.0.20180509:

1,954

Last Update:

10 May 2018

Package Maintainer(s):

Software Author(s):

  • Tim Kellogg

Tags:

admin powershell module jump location ps autojump

Jump.Location (PowerShell Module)

  • 1
  • 2
  • 3

0.6.0.20180509 | Updated: 10 May 2018

Downloads:

5,443

Downloads of v 0.6.0.20180509:

1,954

Maintainer(s):

Software Author(s):

  • Tim Kellogg

Jump.Location (PowerShell Module) 0.6.0.20180509

  • 1
  • 2
  • 3

All Checks are Passing

3 Passing Tests


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Jump.Location (PowerShell Module), run the following command from the command line or from PowerShell:

>

To upgrade Jump.Location (PowerShell Module), run the following command from the command line or from PowerShell:

>

To uninstall Jump.Location (PowerShell Module), run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade jump-location -y --source="'INTERNAL REPO URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade jump-location -y --source="'INTERNAL REPO URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install jump-location
  win_chocolatey:
    name: jump-location
    version: '0.6.0.20180509'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'jump-location' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '0.6.0.20180509'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller jump-location
{
    Name     = "jump-location"
    Version  = "0.6.0.20180509"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'jump-location':
  ensure   => '0.6.0.20180509',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Package Approved

This package was approved by moderator gep13 on 11 May 2018.

Description

If you spend any time in a console you know that cd is by far the most common command that you issue. I'll open up a console to it's default location in C:\Users\tkellogg or C:\Windows\system32 and then issue a cd C:\work\MyProject. Set-JumpLocation is a cmdlet lets you issue a j my to jump directly to C:\work\MyProject.

It learns your behavior by keeping track of how long you spend in certain directories and favoring them over the ones you don't care about. You don't have to use Jump-Location as a replacement for cd. Use cd to go local, and use Set-JumpLocation to jump further away.

Jump-Location is a PowerShell implementation of autojump.

NOTE: This is an automatically updated package. If you find it is out of date by more than a week, please contact the maintainer(s) and let them know the package is no longer updating correctly.


tools\.skipAutoUninstaller
 
tools\chocolateyBeforeModify.ps1
$ErrorActionPreference = 'Stop'

$moduleName = 'Jump.Location'      # this could be different from package name
Remove-Module -Name $moduleName -Force -ErrorAction SilentlyContinue
tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'

$toolsDir         = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$moduleName       = 'Jump.Location'  # this may be different from the package name and different case

# module may already be installed outside of Chocolatey
Remove-Module -Name $moduleName -Force -ErrorAction SilentlyContinue

$sourcePath = Join-Path -Path $toolsDir -ChildPath "$modulename\*"
$destPath   = Join-Path -Path $env:ProgramFiles -ChildPath "WindowsPowerShell\Modules\$moduleName"

if ($PSVersionTable.PSVersion.Major -ge 5)
{
    $manifestFile = Join-Path -Path $toolsDir -ChildPath "$moduleName\$moduleName.psd1"
    $manifest     = Test-ModuleManifest -Path $manifestFile -WarningAction Ignore -ErrorAction Stop
    $destPath     = Join-Path -Path $destPath -ChildPath $manifest.Version.ToString()
}

Write-Verbose "Creating destination directory '$destPath' for module."
New-Item -Path $destPath -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null

Write-Verbose "Moving '$moduleName' files from '$sourcePath' to '$destPath'."
Move-Item -Path $sourcePath -Destination $destPath -Force

if ($PSVersionTable.PSVersion.Major -lt 4)
{
    $modulePaths = [Environment]::GetEnvironmentVariable('PSModulePath', 'Machine') -split ';'
    if ($modulePaths -notcontains $destPath)
    {
        Write-Verbose "Adding '$destPath' to PSModulePath."
        $newModulePath = @($destPath, $modulePaths) -join ';'

        [Environment]::SetEnvironmentVariable('PSModulePath', $newModulePath, 'Machine')
        $env:PSModulePath = $newModulePath
    }
}
tools\chocolateyUninstall.ps1
$ErrorActionPreference = 'Stop'

$moduleName = 'Jump.Location'
$sourcePath = Join-Path -Path $env:ProgramFiles -ChildPath "WindowsPowerShell\Modules\$moduleName"

Write-Verbose "Removing all version of '$moduleName' from '$sourcePath'."
Remove-Item -Path $sourcePath -Recurse -Force -ErrorAction SilentlyContinue

if ($PSVersionTable.PSVersion.Major -lt 4) {
    $modulePaths = [Environment]::GetEnvironmentVariable('PSModulePath', 'Machine') -split ';'

    Write-Verbose "Removing '$sourcePath' from PSModulePath."
    $newModulePath = $modulePaths | Where-Object { $_ -ne $sourcePath }

    [Environment]::SetEnvironmentVariable('PSModulePath', $newModulePath, 'Machine')
    $env:PSModulePath = $newModulePath
}
tools\Jump.Location\Install.ps1
# Adapted from posh-git's install.ps1
# Copyright (c) 2010-2011 Keith Dahlby and contributors

param(
	[switch]$WhatIf = $false,
	[string] $WhichProfile = $PROFILE.CurrentUserCurrentHost
)

if($PSVersionTable.PSVersion.Major -lt 3) {
    Write-Warning "Jump-Location requires PowerShell 3.0 or better; you have version $($Host.Version)."
    return
}

if(!(Test-Path $WhichProfile)) {
    Write-Host "Creating PowerShell profile...`n$WhichProfile"
    New-Item $WhichProfile -Force -Type File -ErrorAction Stop -WhatIf:$WhatIf > $null
}

$installDir = Split-Path $MyInvocation.MyCommand.Path -Parent

# Adapted from http://www.west-wind.com/Weblog/posts/197245.aspx
function Get-FileEncoding($Path) {
    $bytes = [byte[]](Get-Content $Path -Encoding byte -ReadCount 4 -TotalCount 4)

    if(!$bytes) { return 'utf8' }

    switch -regex ('{0:x2}{1:x2}{2:x2}{3:x2}' -f $bytes[0],$bytes[1],$bytes[2],$bytes[3]) {
        '^efbbbf'   { return 'utf8' }
        '^2b2f76'   { return 'utf7' }
        '^fffe'     { return 'unicode' }
        '^feff'     { return 'bigendianunicode' }
        '^0000feff' { return 'utf32' }
        default     { return 'ascii' }
    }
}

$profileLine = "Import-Module '$installDir\Jump.Location.psd1'"
if(Select-String -Path $WhichProfile -Pattern $profileLine -Quiet -SimpleMatch) {
    Write-Host "It seems Jump-Location is already installed..."
    return
}

Write-Host "Adding Jump-Location to profile..."
@"

# Load Jump-Location profile
$profileLine

"@ | Out-File $WhichProfile -Append -WhatIf:$WhatIf -Encoding (Get-FileEncoding $WhichProfile)

Write-Host 'Jump-Location sucessfully installed!'
Write-Host 'Please reload your profile for the changes to take effect:'
Write-Host "    . $WhichProfile"
tools\Jump.Location\Jump.Location.dll
md5: A62D02798FFC001C96F279AFD215D009 | sha1: FA1545ADAFCE3EE2A2CE3869DC522C4C0E059136 | sha256: 7EC6535E3D29B9B63A9D714F4D3AADEDC1B2F4CE4FE939BE85C46C3EFEB951A1 | sha512: 0FF8C4B6FD1DE7D0F86DFD46F9C8ED7C48EC9BE5FAD2F8950AC5416D669B949A81B3053D6E8B4997D435CEA050D33F10E1054C54A3052AADFA737FAFF2174436
tools\Jump.Location\Jump.Location.Format.ps1xml
 
tools\Jump.Location\Jump.Location.psd1
#
# Module manifest for module 'Jump.Location'
#
# Generated by: Tim Kellogg
#
# Generated on: 8/12/2012
#

@{

# Version number of this module.
ModuleVersion = '0.6.0'

# ID used to uniquely identify this module
GUID = '80410ccb-8093-42a4-b38e-94deef91346e'

# Author of this module
Author = 'Tim Kellogg'

# Company or vendor of this module
CompanyName = 'Unknown'

# Copyright statement for this module
Copyright = '2012 Tim Kellogg'

# Description of the functionality provided by this module
Description = 'A cd command that learns'

# Script module or binary module file associated with this manifest
RootModule = 'Load.ps1'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = ''

# Name of the Windows PowerShell host required by this module
PowerShellHostName = ''

# Minimum version of the Windows PowerShell host required by this module
PowerShellHostVersion = ''

# Minimum version of the .NET Framework required by this module
DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module
CLRVersion = ''

# Processor architecture (None, X86, Amd64, IA64) required by this module
ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module
ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = 'Types.ps1xml'

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = 'Jump.Location.Format.ps1xml'

# Modules to import as nested modules of the module specified in ModuleToProcess
NestedModules = @()

# Functions to export from this module
FunctionsToExport = '*'

# Cmdlets to export from this module
CmdletsToExport = '*'

# Variables to export from this module
VariablesToExport = '*'

# Aliases to export from this module
AliasesToExport = '*'

# List of all modules packaged with this module
ModuleList = @()

# List of all files packaged with this module
FileList = @()

# Private data to pass to the module specified in ModuleToProcess
PrivateData = ''

}
tools\Jump.Location\License.md
Copyright (c) 2012 Tim Kellogg

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
tools\Jump.Location\Load.ps1
# Install.ps1
#
# 1. Install Jump-Location
# 2. Setup alias j
# 3. Setup jumpstat alias (function)
# 4. Start watching directory changes
# 5. Register tab expansion

$fullpath = Split-Path -Parent $MyInvocation.MyCommand.Path
$dllpath = $fullpath + "\Jump.Location.dll"

if (-Not (Get-Command Jump-Location -ErrorAction SilentlyContinue)) {

	Import-Module $dllpath -Global -DisableNameChecking
	New-Alias -Name j -Value Set-JumpLocation -Scope Global
	
	# this alias is for backward compatability
	New-Alias -Name Jump-Location -Value Set-JumpLocation -Scope Global

	New-Alias -Name jumpstat -Value Get-JumpStatus -Scope Global

	function global:getj {
		Param (
			[Parameter(ValueFromRemainingArguments=$true)] $args
		)
		jumpstat -First @args
	}

	function global:xj {
		Param (
			[Parameter(ValueFromRemainingArguments=$true)] $args
		)
		explorer $(jumpstat -First @args)
	}

	Set-JumpLocation -Initialize

	. $($fullpath + "\TabExpansion.ps1")

} else {
	Write-Warning "Jump-Location already loaded"
}
tools\Jump.Location\PSGetModuleInfo.xml
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
  <Obj RefId="0">
    <TN RefId="0">
      <T>Microsoft.PowerShell.Commands.PSRepositoryItemInfo</T>
      <T>System.Management.Automation.PSCustomObject</T>
      <T>System.Object</T>
    </TN>
    <MS>
      <S N="Name">Jump.Location</S>
      <Version N="Version">0.6.0</Version>
      <S N="Type">Module</S>
      <S N="Description">A cd command that learns</S>
      <S N="Author">Tim Kellogg</S>
      <S N="CompanyName">vors</S>
      <S N="Copyright">2012 Tim Kellogg</S>
      <DT N="PublishedDate">2015-07-10T20:27:28+00:00</DT>
      <Nil N="InstalledDate" />
      <Nil N="UpdatedDate" />
      <URI N="LicenseUri">https://github.com/tkellogg/Jump-Location/blob/master/License.md</URI>
      <URI N="ProjectUri">https://github.com/tkellogg/Jump-Location</URI>
      <Nil N="IconUri" />
      <Obj N="Tags" RefId="1">
        <TN RefId="1">
          <T>System.Object[]</T>
          <T>System.Array</T>
          <T>System.Object</T>
        </TN>
        <LST>
          <S>cd</S>
          <S>pushd</S>
          <S>popd</S>
          <S>location</S>
          <S>Set-Location</S>
          <S>Push-Location</S>
          <S>Pop-Location</S>
          <S>Jump-Location</S>
          <S>j</S>
          <S>z</S>
          <S>PSModule</S>
        </LST>
      </Obj>
      <Obj N="Includes" RefId="2">
        <TN RefId="2">
          <T>System.Collections.Hashtable</T>
          <T>System.Object</T>
        </TN>
        <DCT>
          <En>
            <S N="Key">Function</S>
            <Obj N="Value" RefId="3">
              <TNRef RefId="1" />
              <LST />
            </Obj>
          </En>
          <En>
            <S N="Key">RoleCapability</S>
            <Obj N="Value" RefId="4">
              <TNRef RefId="1" />
              <LST />
            </Obj>
          </En>
          <En>
            <S N="Key">Command</S>
            <Obj N="Value" RefId="5">
              <TNRef RefId="1" />
              <LST />
            </Obj>
          </En>
          <En>
            <S N="Key">DscResource</S>
            <Obj N="Value" RefId="6">
              <TNRef RefId="1" />
              <LST />
            </Obj>
          </En>
          <En>
            <S N="Key">Workflow</S>
            <Obj N="Value" RefId="7">
              <TNRef RefId="1" />
              <LST />
            </Obj>
          </En>
          <En>
            <S N="Key">Cmdlet</S>
            <Obj N="Value" RefId="8">
              <TNRef RefId="1" />
              <LST />
            </Obj>
          </En>
        </DCT>
      </Obj>
      <Nil N="PowerShellGetFormatVersion" />
      <Nil N="ReleaseNotes" />
      <Obj N="Dependencies" RefId="9">
        <TNRef RefId="1" />
        <LST />
      </Obj>
      <S N="RepositorySourceLocation">https://www.powershellgallery.com/api/v2/</S>
      <S N="Repository">PSGallery</S>
      <S N="PackageManagementProvider">NuGet</S>
      <Obj N="AdditionalMetadata" RefId="10">
        <TNRef RefId="2" />
        <DCT>
          <En>
            <S N="Key">versionDownloadCount</S>
            <S N="Value">1837</S>
          </En>
          <En>
            <S N="Key">ItemType</S>
            <S N="Value">Module</S>
          </En>
          <En>
            <S N="Key">copyright</S>
            <S N="Value">2012 Tim Kellogg</S>
          </En>
          <En>
            <S N="Key">description</S>
            <S N="Value">A cd command that learns</S>
          </En>
          <En>
            <S N="Key">created</S>
            <S N="Value">7/10/2015 8:27:28 PM +00:00</S>
          </En>
          <En>
            <S N="Key">published</S>
            <S N="Value">7/10/2015 8:27:28 PM +00:00</S>
          </En>
          <En>
            <S N="Key">developmentDependency</S>
            <S N="Value">False</S>
          </En>
          <En>
            <S N="Key">NormalizedVersion</S>
            <S N="Value">0.6.0</S>
          </En>
          <En>
            <S N="Key">downloadCount</S>
            <S N="Value">1837</S>
          </En>
          <En>
            <S N="Key">tags</S>
            <S N="Value">cd pushd popd location Set-Location Push-Location Pop-Location Jump-Location j z PSModule</S>
          </En>
          <En>
            <S N="Key">updated</S>
            <S N="Value">2018-05-10T15:15:48Z</S>
          </En>
          <En>
            <S N="Key">isLatestVersion</S>
            <S N="Value">True</S>
          </En>
          <En>
            <S N="Key">IsPrerelease</S>
            <S N="Value">false</S>
          </En>
          <En>
            <S N="Key">isAbsoluteLatestVersion</S>
            <S N="Value">True</S>
          </En>
          <En>
            <S N="Key">packageSize</S>
            <S N="Value">22862</S>
          </En>
          <En>
            <S N="Key">FileList</S>
            <S N="Value">Jump.Location.nuspec|Install.ps1|Jump.Location.dll|Jump.Location.Format.ps1xml|Jump.Location.psd1|License.md|Load.ps1|Readme.md|TabExpansion.ps1|Types.ps1xml</S>
          </En>
          <En>
            <S N="Key">requireLicenseAcceptance</S>
            <S N="Value">True</S>
          </En>
        </DCT>
      </Obj>
      <S N="InstalledLocation">C:\Users\appveyor\AppData\Local\Temp\1\7cc3026a-1a1d-4ee1-b7d8-0617da46dd4f\Jump.Location\0.6.0</S>
    </MS>
  </Obj>
</Objs>
tools\Jump.Location\Readme.md
Jump-Location: A cd that learns
=====================

If you spend any time in a console you know that `cd` is by far the most
common command that you issue. I'll open up a console to it's default location
in `C:\Users\tkellogg` or `C:\Windows\system32` and then issue a `cd C:\work\MyProject`. 
`Set-JumpLocation` is a cmdlet lets you issue a `j my` to jump 
directly to `C:\work\MyProject`. 

It learns your behavior by keeping track of how long you spend in certain
directories and favoring them over the ones you don't care about.  You don't 
have to use `Jump-Location` as a replacement for `cd`. Use `cd`	to go local, and 
use `Set-JumpLocation` to jump further away.

`Jump-Location` is a powershell implementation of [autojump][1].


How it knows where you want to go
---------------------------------

It keeps track of [how long you stay in a directory][2] and builds a database.
When you use the `Set-JumpLocation` or `j` command, it looks through the database
to find the most likely directory and jumps there. You should only need to
give it a 2-3 character hint. For instance, on mine I can do:

* `j de` -> `C:\Users\tkellogg\code\Jump-Location\bin\Debug`
* `j doc` -> `C:\Users\tkellogg\Documents`

What if you have several projects and you want to get to the Debug directory
of one that you don't use very often? If you're `jumpstat` looks like this:

    255    C:\Users\tkellogg\code\Jump-Location\bin\Debug
		50     C:\Users\tkellogg\code\MongoDB.FSharp\bin\Debug

Using `j de` will jump to `Jump-Location\bin\Debug`. But use something like
`j mo d` if you really want to go to `MongoDB.FSharp\bin\Debug`. You can 
issue a `j mo d`. `mo` matches `MongoDB.FSharp` and `d` matches `Debug`.

`j` internally calls `Push-Location`, so you can navigate back in your visited locations stack with `popd` or special Jump-Location query `j -`.

Quick Primer on `jumpstat`
--------------------------

You can use `jumpstat` to see what's in the database. In tradition with `autojump`,
the database is saved to `~\jump-location.txt`. You can open up that file and
make changes. The file will auto-load into any open powershell sessions.

Since we're in Powershell (and not legacy Bash) `jumpstat` returns _objects_. 
This means that you don't ever have to know anything about `~\jump-location.txt`.
You can manipulate the objects it returns. For instance, this is valid:

```
PS> $stats = jumpstat
PS> $stats[10].Weight = -1
PS> jumpstat -Save
```

Setting a weight to a negative number like that will cause it to be blacklisted
from all jump results. Use the `jumpstat -All` option to see negative weights
included in the jumpstat result set.

When you remove/rename directories, Jump-Location database can become out of sync with the file system. Your top-choice will pointed to an invalid location. You can **cleanup** database with `jumpstat -cleanup`. It will remove all records with non-existing paths.  

Jumpstat can also be used with the "scan" parameter (jumpstat -scan) to recursively
scan sub-directories into the database with 0 Weight. 
This is a quick way to teach Jump-Location about related directories
without having to manually cd'ing to each one individually.

Add all subfolders of the current directory: 
```
jumpstat -scan . 
```

Installation
------------

*Important:* Jump-Location requires PowerShell version 3 or higher. Older installations of Windows 7 may only have PowerShell version 2. [How to update powershell][7]. 

There is now a [Chocolatey package][6] for Jump-Location. To install via Chocolaty

```
C:\ choco install Jump-Location
```

Otherwise you can still install it manually.

1. Download [latest release][5].
2. Open properties for zip file and click "Unblock" button if you have one.
3. Unzip 
4. Open a PowerShell console
5. Run `.\Install.ps1`. You may need to allow remote scripts by running 
`Set-ExecutionPolicy -RemoteSigned`. You may also have to right-click `Install.ps1`
and Unblock it from the properties window. 
**Alternative:**
Add line `Import-Module $modules\Jump-Location\Jump.Location.psd1` to your `$PROFILE`,
where `$modules\Jump-Location` is a path to folder with module.

Next time you open a PowerShell console Jump-Location will start learning 
your habits. You'll also have access to the `j` and `jumpstat` aliases.

If you get errors after installation, try unblocking the file Jump.Location.dll manually by
one of the following methods to clear the "untrusted" flag:
1. Copy the file to a FAT32 file system (such as a memory card) and back.
2. Run cmd /c "echo.>Jump.Location.dll:Zone.Identifier"

If you find any bugs, please report them so I can fix them quickly!

Build from source
-----------------
From root directory:

1. Run `msbuild` .
2. Run `.\copyBuild.ps1`

In directory `Build` you will have local build of module.

TODO
----------
1. Local search. `j . blah` will only match dirs under cwd. Using `.` will also search outside the DB.
2. Better PS documentation

References
----------
1. [old releases][4].

 [1]: https://github.com/joelthelion/autojump
 [2]: http://stackoverflow.com/a/11813545/503826
 [3]: http://blogs.msdn.com/b/powershell/archive/2009/07/15/final-approved-verb-list-for-windows-powershell-2-0.aspx
 [4]: https://github.com/tkellogg/Jump-Location/downloads
 [5]: https://sourceforge.net/projects/jumplocation/files/latest/download
 [6]: https://chocolatey.org/packages/Jump-Location
 [7]: http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx
tools\Jump.Location\TabExpansion.ps1

if (Test-Path Function:\TabExpansion) {
	Rename-Item Function:\TabExpansion PreJumpTabExpansion
}

function global:TabExpansion($line, $lastWord) {
	switch -regex ($line) {
		"^(Set-JumpLocation|j|xj) .*" {
			[Jump.Location.SetJumpLocationCommand]::GetTabExpansion($line, $lastWord)
		}
		default {
			if (Test-Path Function:\PreJumpTabExpansion) {
				PreJumpTabExpansion $line $lastWord
			}
		}
	}
}
tools\Jump.Location\Types.ps1xml
 
tools\VERIFICATION.txt
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community in verifying that this package's contents are trustworthy.

To verify the files using the project source:

1. Please go to the project source location (https://github.com/tkellogg/Jump-Location) and download the source files;
2. Build the source to create the binary files to verify;
3. Use Get-FileHash -Path <FILE TO VERIFY> to get the file hash value from both the built file (from step 1 above) and the file from the package and compare them;

Alternatively you can download the module from the PowerShell Gallery ...

    Save-Module -Name Jump.Location -Path <PATH TO DOWNLOAD TO>

... and compare the files from the package against those in the installed module. Again use Get-FileHash -Path <FILE TO VERIFY> to retrieve those hash values.

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
Jump-Location 0.6.0 2581 Wednesday, October 1, 2014 Unknown
Jump-Location 0.5.1 908 Friday, September 19, 2014 Unknown

This package has no dependencies.

Discussion for the Jump.Location (PowerShell Module) Package

Ground Rules:

  • This discussion is only about Jump.Location (PowerShell Module) and the Jump.Location (PowerShell Module) package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Jump.Location (PowerShell Module), or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus