{"id":15406841,"url":"https://github.com/dannyben/fuzzycd","last_synced_at":"2026-04-02T01:55:11.361Z","repository":{"id":61852478,"uuid":"555338993","full_name":"DannyBen/fuzzycd","owner":"DannyBen","description":"Change directories with fuzzy search","archived":false,"fork":false,"pushed_at":"2024-04-22T04:39:26.000Z","size":5486,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:12:07.492Z","etag":null,"topics":["cd","fuzzy-search","fzf","fzf-wrapper","shell","shell-productivity"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/DannyBen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2022-10-21T11:41:14.000Z","updated_at":"2024-07-13T10:49:17.326Z","dependencies_parsed_at":"2024-07-13T10:59:22.297Z","dependency_job_id":null,"html_url":"https://github.com/DannyBen/fuzzycd","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ffuzzycd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ffuzzycd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ffuzzycd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ffuzzycd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DannyBen","download_url":"https://codeload.github.com/DannyBen/fuzzycd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249417129,"owners_count":21268201,"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":["cd","fuzzy-search","fzf","fzf-wrapper","shell","shell-productivity"],"created_at":"2024-10-01T16:25:54.965Z","updated_at":"2026-04-02T01:55:11.354Z","avatar_url":"https://github.com/DannyBen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n\u003cimg src='logo/logo-full.png' width=280\u003e\n\nA bash function that patches the native `cd` to allow changing directories\ninstantly using a fuzzy match, with or without an interactive menu.\n\n![](/demo/cast.gif)\n\n\u003c/div\u003e\n\n# Fuzzy CD\n\n![repocard](https://repocard.dannyben.com/svg/fuzzycd.svg)\n\n## Features\n\n- Preserves the native `cd` completion.\n- Understands `CDPATH`.\n- Remembers all visited directories.\n- Allows changing directory to any directory from the history that matches the\n  input fuzzy search (unless it matches an actual directory).\n- Shows available choices with `ls` preview, when there are more than one\n  matches (optional).\n- Does not override the builtin `cd` when running non-interactively.\n- Adds flags such as `cd -l` to view and manage the history.\n- Three operation modes:\n  - Minimal - cd to best match\n  - Interactive\n  - Interactive with `ls` preview\n- Optional bash completions that prefer native `cd` matches before fuzzy history.\n\n## Prerequisites\n\nFuzzy CD requires a recent version of [fzf].\n\n\n## Installation\n\n### Installing using the setup script\n\nUse the [setup](setup) script for automatic installation. It installs\n`fuzzycd` and adds the required shell startup hook.\n\n```shell\n$ curl -Ls get.dannyb.co/fuzzycd/setup | bash\n```\n\n### Installing manually\n\n1. Place the `fuzzycd` file somewhere on your `PATH` and make it executable.\n2. Source it from your startup script (for example: `source /usr/local/bin/fuzzycd` in `~/.bashrc`).\n\n\n## Usage\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eShow Usage Patterns\u003c/summary\u003e\n\n  ```\n  $ cd -h\n  Usage:\n    cd DIR       change working directory\n    cd SEARCH    change working directory or show selection menu\n    cd -l        list history with fzf\n    cd -e        edit history file\n    cd -s        show history file\n    cd -p        prune non-existent directories from history\n    cd -d [DIR]  delete current or specified directory from history\n    cd -c        show completions function [usage: eval \"$(cd -c)\"]\n    cd -v        show version\n    cd -h        show this help\n\n  Environment Variables:\n    FUZZYCD_HISTORY_FILE\n      Path to history file (default: ~/.fuzzycd-history)\n\n    FUZZYCD_MODE\n      Set operation mode (one of: m, i, p)\n        m = minimal, non interactive, always cd to best match (default)\n        i = interactive when needed, no preview\n        p = interactive when needed, with ls preview\n\n    FUZZYCD_COMPLETIONS_COUNT\n      Maximum number of suggestions to show in bash completions\n      (default: 10)\n\n  Interactive Keyboard Bindings:\n    Del\n      Delete selected directory from history\n  ```\n\n\u003c/details\u003e\n\n---\n\n\nFirst, verify that Fuzzy CD is properly installed by running:\n\n```shell\n$ cd -h\n```\n\nNow, you can use `cd` normally to change to any directory. These directories\nwill be remembered in a history file. You can view this file by running:\n\n```shell\n$ cd -s\n# or\n$ cat ~/.fuzzycd-history\n```\n\n### Fuzzy search\n\nUse `cd` with a string that is *not* a directory. If exactly one directory in\nthe history matches this string, you will instantly `cd` to it as usual.\n\nIf more than one directories match, you will be prompted to choose one of the\nmatching directories when running in interactive mode, or you will\n`cd` to the best match when running in non-interactive mode (default).\n\n\n## Bash completions\n\nIf you install using the [`setup`](setup) script, fuzzy bash completions are\nenabled automatically for Bash.\n\nIf you install manually, add the following line to your `~/.bashrc`:\n\n```bash\neval \"$(fuzzycd -c)\"\n```\n\nThese completions keep Bash's native `cd` matches first and then append fuzzy\nhistory matches without duplicates.\n\nThis works best when tab completion is configured for inline completions, which\nyou can set by adding/updating the `~/.inputrc` file:\n\n```bash\n# ~/.inputrc\nTAB: menu-complete\n```\n\n## Uninstall\n\nUse the uninstall script for automatic removal:\n\n```shell\n$ curl -Ls get.dannyb.co/fuzzycd/uninstall | bash\n```\n\nOr remove it manually:\n\n1. Remove the line that sources `fuzzycd` from your startup script.\n2. Remove the `eval \"$(fuzzycd -c)\"` line from your startup script, if you added it manually.\n3. Delete the `fuzzycd` executable from your `PATH`.\n4. Optionally, delete the history file (`~/.fuzzycd-history`).\n5. Restart your session.\n\n\n## Contributing / Support\n\nIf you experience any issue, have a question or a suggestion, or if you wish\nto contribute, feel free to [open an issue][issues].\n\nTests are split into two layers:\n\n- `test/approve` keeps exact-output approval coverage and low-level shell assertions.\n- `features/` contains Shellkin acceptance scenarios for the main user-facing flows.\n\nRun them with `op test`, or run the acceptance layer alone with `op acceptance`.\n\n---\n\n\u003ctable\u003e\n  \u003ctr\u003e\u003ctd align=\"center\" colspan=\"4\"\u003e\u003cstrong\u003eThis repository is part of the Bash Productivity Suite\u003c/strong\u003e\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/dannyben/alf\"\u003e\u003cimg src=\"https://github.dannyben.com/assets/img/alf.png\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/dannyben/opcode\"\u003e\u003cimg src=\"https://github.dannyben.com/assets/img/opcode.png\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/dannyben/fuzzycd\"\u003e\u003cimg src=\"https://github.dannyben.com/assets/img/fuzzycd.png\"\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/dannyben/rush\"\u003e\u003cimg src=\"https://github.dannyben.com/assets/img/rush.png\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n[issues]: https://github.com/DannyBen/fuzzycd/issues\n[fzf]: https://github.com/junegunn/fzf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Ffuzzycd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyben%2Ffuzzycd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Ffuzzycd/lists"}