{"id":13590872,"url":"https://github.com/tkellogg/Jump-Location","last_synced_at":"2025-04-08T14:32:00.087Z","repository":{"id":4157051,"uuid":"5271253","full_name":"tkellogg/Jump-Location","owner":"tkellogg","description":"Powershell `cd` that reads your mind","archived":false,"fork":false,"pushed_at":"2019-09-26T16:48:36.000Z","size":334,"stargazers_count":471,"open_issues_count":17,"forks_count":26,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-05T22:05:27.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkellogg.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-02T10:34:50.000Z","updated_at":"2025-03-23T05:44:26.000Z","dependencies_parsed_at":"2022-07-18T08:17:17.216Z","dependency_job_id":null,"html_url":"https://github.com/tkellogg/Jump-Location","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkellogg%2FJump-Location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkellogg%2FJump-Location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkellogg%2FJump-Location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkellogg%2FJump-Location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkellogg","download_url":"https://codeload.github.com/tkellogg/Jump-Location/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247860806,"owners_count":21008357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:00:51.347Z","updated_at":"2025-04-08T14:32:00.060Z","avatar_url":"https://github.com/tkellogg.png","language":"C#","funding_links":[],"categories":["C#","C\\#","🚀 Productivity","C# #","Commandline Productivity"],"sub_categories":[],"readme":"This project is not actively maintained. Please consider using its successor [`ZLocation`](https://github.com/vors/ZLocation).\n=====================\n\n\n---------------------\n\n\nJump-Location: A cd that learns\n=====================\n\nIf you spend any time in a console you know that `cd` is by far the most\ncommon command that you issue. I'll open up a console to it's default location\nin `C:\\Users\\tkellogg` or `C:\\Windows\\system32` and then issue a `cd C:\\work\\MyProject`. \n`Set-JumpLocation` is a cmdlet lets you issue a `j my` to jump \ndirectly to `C:\\work\\MyProject`. \n\nIt learns your behavior by keeping track of how long you spend in certain\ndirectories and favoring them over the ones you don't care about.  You don't \nhave to use `Jump-Location` as a replacement for `cd`. Use `cd`\tto go local, and \nuse `Set-JumpLocation` to jump further away.\n\n`Jump-Location` is a powershell implementation of [autojump][1].\n\n\nHow it knows where you want to go\n---------------------------------\n\nIt keeps track of [how long you stay in a directory][2] and builds a database.\nWhen you use the `Set-JumpLocation` or `j` command, it looks through the database\nto find the most likely directory and jumps there. You should only need to\ngive it a 2-3 character hint. For instance, on mine I can do:\n\n* `j de` -\u003e `C:\\Users\\tkellogg\\code\\Jump-Location\\bin\\Debug`\n* `j doc` -\u003e `C:\\Users\\tkellogg\\Documents`\n\nWhat if you have several projects and you want to get to the Debug directory\nof one that you don't use very often? If you're `jumpstat` looks like this:\n\n    255    C:\\Users\\tkellogg\\code\\Jump-Location\\bin\\Debug\n\t\t50     C:\\Users\\tkellogg\\code\\MongoDB.FSharp\\bin\\Debug\n\nUsing `j de` will jump to `Jump-Location\\bin\\Debug`. But use something like\n`j mo d` if you really want to go to `MongoDB.FSharp\\bin\\Debug`. You can \nissue a `j mo d`. `mo` matches `MongoDB.FSharp` and `d` matches `Debug`.\n\n`j` internally calls `Push-Location`, so you can navigate back in your visited locations stack with `popd` or special Jump-Location query `j -`.\n\nQuick Primer on `jumpstat`\n--------------------------\n\nYou can use `jumpstat` to see what's in the database. In tradition with `autojump`,\nthe database is saved to `~\\jump-location.txt`. You can open up that file and\nmake changes. The file will auto-load into any open powershell sessions.\n\nSince we're in Powershell (and not legacy Bash) `jumpstat` returns _objects_. \nThis means that you don't ever have to know anything about `~\\jump-location.txt`.\nYou can manipulate the objects it returns. For instance, this is valid:\n\n```\nPS\u003e $stats = jumpstat\nPS\u003e $stats[10].Weight = -1\nPS\u003e jumpstat -Save\n```\n\nSetting a weight to a negative number like that will cause it to be blacklisted\nfrom all jump results. Use the `jumpstat -All` option to see negative weights\nincluded in the jumpstat result set.\n\nWhen 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.  \n\nJumpstat can also be used with the \"scan\" parameter (jumpstat -scan) to recursively\nscan sub-directories into the database with 0 Weight. \nThis is a quick way to teach Jump-Location about related directories\nwithout having to manually cd'ing to each one individually.\n\nAdd all subfolders of the current directory: \n```\njumpstat -scan . \n```\n\nInstallation\n------------\n\n*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]. \n\n**Recommended**: Install from [psget.net][8]:\n```\nInstall-Module Jump.Location\n```\n\nThere is also a [Chocolatey package][6] for Jump-Location. To install via Chocolaty\n\n```\nchoco install Jump-Location\n```\n\nOtherwise you can still install it manually.\n\n1. Download [the latest release][5].\n2. Open properties for zip file and click \"Unblock\" button if you have one.\n3. Unzip \n4. Open a PowerShell console\n5. Run `.\\Install.ps1`. You may need to allow remote scripts by running \n`Set-ExecutionPolicy -RemoteSigned`. You may also have to right-click `Install.ps1`\nand Unblock it from the properties window. \n**Alternative:**\nAdd line `Import-Module $modules\\Jump-Location\\Jump.Location.psd1` to your `$PROFILE`,\nwhere `$modules\\Jump-Location` is a path to folder with module.\n\nNext time you open a PowerShell console Jump-Location will start learning \nyour habits. You'll also have access to the `j` and `jumpstat` aliases.\n\nIf you get errors after installation, try unblocking the file Jump.Location.dll manually by\none of the following methods to clear the \"untrusted\" flag:\n\n1. Copy the file to a FAT32 file system (such as a memory card) and back.\n2. Run cmd /c \"echo.\u003eJump.Location.dll:Zone.Identifier\"\n\nIf you find any bugs, please report them so I can fix them quickly!\n\nBuild from source\n-----------------\nFrom root directory:\n\n1. Run `msbuild` .\n2. Run `.\\copyBuild.ps1`\n\nIn directory `Build` you will have local build of module.\n\nTODO\n----------\n1. Local search. `j . blah` will only match dirs under cwd. Using `.` will also search outside the DB.\n2. Better PS documentation\n\nReferences\n----------\n1. [old releases][4].\n\n [1]: https://github.com/joelthelion/autojump\n [2]: http://stackoverflow.com/a/11813545/503826\n [3]: http://blogs.msdn.com/b/powershell/archive/2009/07/15/final-approved-verb-list-for-windows-powershell-2-0.aspx\n [4]: https://github.com/tkellogg/Jump-Location/downloads\n [5]: https://sourceforge.net/projects/jumplocation/files/latest/download\n [6]: https://chocolatey.org/packages/Jump-Location\n [7]: http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx\n [8]: http://psget.net/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkellogg%2FJump-Location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkellogg%2FJump-Location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkellogg%2FJump-Location/lists"}