{"id":13638212,"url":"https://github.com/anki-code/xontrib-jump-to-dir","last_synced_at":"2025-07-11T00:33:18.301Z","repository":{"id":65344698,"uuid":"589906349","full_name":"anki-code/xontrib-jump-to-dir","owner":"anki-code","description":"Jump to used before directory by part of the path or command in xonsh shell. Lightweight zero-dependency implementation of autojump or zoxide projects functionality.","archived":false,"fork":false,"pushed_at":"2024-05-15T18:00:24.000Z","size":67,"stargazers_count":16,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T00:01:40.571Z","etag":null,"topics":["autojump","cli","command-line","console","shell","terminal","xonsh","xontrib","zoxide"],"latest_commit_sha":null,"homepage":"https://github.com/anki-code/xontrib-jump-to-dir","language":"Python","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/anki-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://github.com/anki-code","https://www.buymeacoffee.com/xxh","https://github.com/xonsh/xonsh#the-xonsh-shell-community"]}},"created_at":"2023-01-17T08:13:41.000Z","updated_at":"2025-03-30T00:34:37.000Z","dependencies_parsed_at":"2024-10-27T11:09:03.729Z","dependency_job_id":"2e15167f-e329-47c4-b0c3-8acf0c72cd0d","html_url":"https://github.com/anki-code/xontrib-jump-to-dir","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":"0.030303030303030276","last_synced_commit":"57572d28b12e9662db2087ad5d7ad64ec561c3ef"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/anki-code/xontrib-jump-to-dir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-jump-to-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-jump-to-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-jump-to-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-jump-to-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anki-code","download_url":"https://codeload.github.com/anki-code/xontrib-jump-to-dir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-jump-to-dir/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264697546,"owners_count":23650954,"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":["autojump","cli","command-line","console","shell","terminal","xonsh","xontrib","zoxide"],"created_at":"2024-08-02T01:00:41.873Z","updated_at":"2025-07-11T00:33:18.271Z","avatar_url":"https://github.com/anki-code.png","language":"Python","funding_links":["https://github.com/anki-code","https://www.buymeacoffee.com/xxh","https://github.com/xonsh/xonsh#the-xonsh-shell-community"],"categories":["Directory Navigation"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\nJump to used before directory by part of the path in xonsh shell. \u003cbr\u003eLightweight zero-dependency implementation of \u003ca href=\"https://github.com/wting/autojump\"\u003eautojump\u003c/a\u003e or \u003ca href=\"https://github.com/ajeetdsouza/zoxide\"\u003ezoxide\u003c/a\u003e projects functionality. \n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e  \nIf you like the idea click ⭐ on the repo and \u003ca href=\"https://twitter.com/intent/tweet?text=Nice%20xontrib%20for%20the%20xonsh%20shell!\u0026url=https://github.com/anki-code/xontrib-jump-to-dir\" target=\"_blank\"\u003etweet\u003c/a\u003e.\n\u003c/p\u003e\n\n## Note\n\nThis xontrib is using [xonsh sqlite history backend](https://xon.sh/tutorial_hist.html#sqlite-history-backend) to get statistics by directories you're used to run commands.\n\n## Installation\n\nTo install use pip:\n\n```bash\nxpip install xontrib-jump-to-dir\n# OR: xpip install -U git+https://github.com/anki-code/xontrib-jump-to-dir\n```\n\n## Usage\n\nInit:\n```xsh\n# Check that you're using sqlite history in ~/.xonshrc\n$XONSH_HISTORY_BACKEND = 'sqlite'\nxontrib load jump_to_dir\n```\nJump to directory by path:\n```xsh\nmkdir -p /tmp/hello /tmp/world\ncd /tmp/hello\necho 1\necho 2\necho 3\ncd /tmp/world\necho 1\ncd /\n\nj           # Jump to most frequent directory i.e. `/tmp/hello/` because 3 `echo` commands were executed.\nj wor       # Jump to directory with `*wor*` in path i.e. `/tmp/world/`.\nj t he      # Jump to directory with `*t*he*` in path i.e. `/tmp/hello/`.\n```\nJump to directory by command:\n```xsh\ncd /tmp\necho 112233\ncd /\njc 22       # Jump to the directory where `*22*` command executed i.e. `/tmp`.\n```\n\nCustom shortcut:\n```xsh\n$XONTRIB_JUMP_TO_DIR_SHORTCUT = 'z'\nxontrib load jump_to_dir\nz tm            # Jump to previous directory with `*tm*` in path e.g. `/tmp/`\nzc git commit   #Jump to previous directory where `*git*commit*` command executed e.g. `/git/`\n```\n\n## How it works\n\nThe history database has the commands you run and the directory where you was. The xontrib sorts the directories from history database by count of executed commands and filter them by mask e.g. the `j tm` command will find the directories by mask `*tm*`. Then you jump into the existing directory with the highest number of executed commands or if you already there to the previous directory by statistics. So if you have no commands that were executed in `/example` directory please avoid expectation that you can jump to it by running `j ex`.\n\nIf you want to add fallback functionality to jump to any directory by partial path in case of zero result in history database (e.g. `j o lo bi` will jump to `/opt/local/bin`) feel free to create PR.\n\n## Environment variables\n\n* `XONTRIB_JUMP_TO_DIR_SHORTCUT` - shortcut string. Default `j`.\n* `XONTRIB_JUMP_TO_DIR_WARNING` - show warnings from xontrib. Default `True`.\n\n## Credits\n\nThis package was created with [xontrib template](https://github.com/xonsh/xontrib-template).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanki-code%2Fxontrib-jump-to-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanki-code%2Fxontrib-jump-to-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanki-code%2Fxontrib-jump-to-dir/lists"}