{"id":19413102,"url":"https://github.com/joknarf/cdhist","last_synced_at":"2025-04-24T12:31:24.141Z","repository":{"id":176089630,"uuid":"654940381","full_name":"joknarf/cdhist","owner":"joknarf","description":"cd history (bash / ksh / zsh)","archived":false,"fork":false,"pushed_at":"2024-09-10T19:44:12.000Z","size":200,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-10T22:38:04.380Z","etag":null,"topics":["bash","cd-command","cd-extension","completion","directories","history","interactive","ksh","locate","ncurses","plugin","powerline","pushd","scrolling","shell","shell-extension","subdirectories","terminal","zsh"],"latest_commit_sha":null,"homepage":"","language":null,"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/joknarf.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-06-17T11:52:00.000Z","updated_at":"2024-09-10T19:44:16.000Z","dependencies_parsed_at":"2024-01-02T15:00:26.995Z","dependency_job_id":"ce63a3c1-4146-425d-a22d-4ba51de8056b","html_url":"https://github.com/joknarf/cdhist","commit_stats":null,"previous_names":["joknarf/cdhist"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joknarf%2Fcdhist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joknarf%2Fcdhist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joknarf%2Fcdhist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joknarf%2Fcdhist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joknarf","download_url":"https://codeload.github.com/joknarf/cdhist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223952568,"owners_count":17230915,"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":["bash","cd-command","cd-extension","completion","directories","history","interactive","ksh","locate","ncurses","plugin","powerline","pushd","scrolling","shell","shell-extension","subdirectories","terminal","zsh"],"created_at":"2024-11-10T12:30:47.047Z","updated_at":"2024-11-10T12:31:35.510Z","avatar_url":"https://github.com/joknarf.png","language":null,"readme":"\u003e  As another project called `cdhist` on github, decided to rename this project `seedee`  \n\u003e  Now, the updated tool can be found [here](https://github.com/joknarf/seedee)  \n\u003e  This repository won't we updated anymore\n\n# cdhist is now [seedee](https://github.com/joknarf/seedee)\n\nNavigate interactively through directories / history of visited directories using arrow keys from command line.  \nCompatibility : bash / ksh / zsh  \n(compatible macos / debian / centos / solaris / alpine ...)\n\n* rapidily switch to already visited directories using interactive menu\n* use locate (mlocate/plocate) to rapidly cd to any directory\n* navigate interactively into directories/history using left/right arrow keys in menu\n  * directly from command line without any cd command using shift-arrow keys (bash/zsh)\n* cd autocompletion with interactive menu (bash)\n\nfor a complete next-gen shell experience, see also these projects:\n* [nerdps1](https://github.com/joknarf/nerdps1) : auto-transportable dynamic PS1 prompt (you can see it in the demo)\n* [redo](https://github.com/joknarf/redo) : replacement of shell history command search (Ctrl+R or Esc+/) with interactive menu\n* [complete-ng](https://github.com/joknarf/complete-ng) : nextgen bash completion with interactive menu\n\n![demo](https://github.com/joknarf/cdhist/assets/10117818/ad3dc445-ba78-401e-9e46-ca87e73fdb3b)\n\n* using bash/zsh in emacs or vi mode, key binding is available as shortcuts:\n  * default key binding with \u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003eArrows\u003c/kbd\u003e or \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eArrows\u003c/kbd\u003e (can be overridden using CD*BIND variables)\n\n\u003cdiv align=\"center\"\u003e\n \n|Left                     | Up/Down                             | Right                       |\n|:-----------------------:|:-----------------------------------:|:---------------------------:|\n|                         |  previous dir in history            |                             |\n|                         | \u003cimg width=\"50px\" src=\"https://github.com/joknarf/cdhist/assets/10117818/10ac2573-49fc-4ed5-8a6e-cce931c55ae2\"\u003e| |\n| \u003cimg width=\"50px\" src=\"https://github.com/joknarf/cdhist/assets/10117818/015131c5-8d8d-4c0d-8d44-a876fa6f2fb5\"\u003e |  \u003cimg width=\"50px\" src=\"https://github.com/joknarf/cdhist/assets/10117818/fe034fdc-dea5-49fa-be30-8f0bd9341208\"\u003e | \u003cimg width=\"50px\" src=\"https://github.com/joknarf/cdhist/assets/10117818/1d254f15-050e-4ff9-9f5d-002e9ff4802f\"\u003e |\n|  parent dir (..)         | dir history browser                | dir browser                 |\n\ndirectory pattern can be put on command line before hitting shortcut to filter result  \nputting on command line : `work` and hitting \u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003e⇧\u003c/kbd\u003e will bring you to last visited directory containing `work`\n\n|key                                           | action                                               |\n|----------------------------------------------|------------------------------------------------------|\n|\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003e⇩\u003c/kbd\u003e                 | cd history menu                                      |\n|\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003e⇧\u003c/kbd\u003e                 | return to last directory in history matching pattern |\n|\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003e⇨\u003c/kbd\u003e                 | navigate from current directory                      |\n|\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003e⇦\u003c/kbd\u003e                 | go to parent dir (cd ..)                             |\n|\u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eShift\u003c/kbd\u003e\u003ckbd\u003e⇩\u003c/kbd\u003e  | search directories matching pattern in locate db     |\n\n\u003c/div\u003e\n\n* using bash, `\u003ctab\u003e` cd auto completion can be enabled for `cd` command:\n  * setting env variable `CDCOMPLETE=y` before sourcing `cdhist`\n\n## keys when in menu\n\n|key                             | action                                                |\n|--------------------------------|-------------------------------------------------------|\n|\u003ckbd\u003e⇩\u003c/kbd\u003e                    | select next item                                      | \n|\u003ckbd\u003e⇧\u003c/kbd\u003e                    | select prev item                                      |\n|\u003ckbd\u003eEnd\u003c/kbd\u003e                  | select last item                                      |\n|\u003ckbd\u003eHome\u003c/kbd\u003e                 | select first item                                     | \n|\u003ckbd\u003e⇨\u003c/kbd\u003e                    | browse selected directory                             |\n|\u003ckbd\u003e⇦\u003c/kbd\u003e                    | browse parent directory                               |\n|\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003e⇨\u003c/kbd\u003e   | browse selected directory with subdirectories depth 4 |\n|\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003e⇦\u003c/kbd\u003e   | back to only show subdirectories depth 1              |\n|\u003ckbd\u003eShift\u003c/kdb\u003e+\u003ckbd\u003e⇩\u003c/kbd\u003e/\u003ckbd\u003ePgUp\u003c/kbd\u003e/\u003ckbd\u003eCtl\u003c/kbd\u003e+\u003ckbd\u003eF\u003c/kbd\u003e| next page    |\n|\u003ckbd\u003eShift\u003c/kdb\u003e+\u003ckbd\u003e⇧\u003c/kbd\u003e/\u003ckbd\u003ePgDn\u003c/kbd\u003e/\u003ckbd\u003eCtl\u003c/kbd\u003e+\u003ckbd\u003eB\u003c/kbd\u003e| previous page|\n|\u003ckbd\u003eDel\u003c/kbd\u003e/\u003ckbd\u003eF8\u003c/kbd\u003e    | delete directory entry in history                     |\n|\u003ckbd\u003eEsc\u003c/kbd\u003e                  | exit                                                  |\n|\u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eA\u003c/kbd\u003e    | use all screen to display menu                        |\n|\u003ckbd\u003eEnter\u003c/kbd\u003e/\u003ckbd\u003eTab\u003c/kbd\u003e | go to directory                                       |\n\n* filter pattern can be applied entering text\n* selection can be done entering item number\n\n\n# usage\n\n```\n$ . ./cdhist\n$ cd \u003cdir\u003e\n=\u003e change to \u003cdir\u003e and add \u003cdir\u003e to $CDHISTFILE\n$ cd --\n=\u003e display current history / choose dir to change\n$ cd -- \u003cpat\u003e...\n=\u003e search pattern \u003cpat\u003e in current history, change to dir if unique, display / chose dir either\n$ cd - \u003cpat\u003e...\n=\u003e search pattern \u003cpat\u003e in cd history, change to dir first matched\n$ cd + [\u003cpat\u003e]...\n=\u003e display immediate subdirectories of cwd, search / choose dir to change (except dot dirs, like .git/*)\n$ cd ++ [\u003cpat\u003e]...\n=\u003e display subdirectories until depth 4, search / choose dir to change (except dot dirs, like .git/*)\n$ cdl \u003cpat\u003e...\n=\u003e use locate -r and get list of directories to switch\n```\n\n`cd - \u003copts\u003e` `cd -- \u003copts\u003e` `cd + \u003copts\u003e` `cd ++ \u003copts\u003e` are aliases to `cd- cd-- cd+ cd++`\n\n\n# environment variables\n\n|Variable     | Description                                                       |\n|-------------|-------------------------------------------------------------------|\n|`CDHISTFILE` | path to history file (default to ~/.cd_history)                   |\n|`CDNBDIRS`   | Number of directories in history to display (default 10)          |\n|`CDINITDIRS` | Directory list (\\n separated) to initialize CDHISTFILE if empty   |\n|`CDPOWERLINE`| set to \"n\" to disable powerline symbol usage                      |\n|`CDHISTBIND` | bind key to cdhist                                                |\n|`CDDOTBIND`  | bind key to navigate from current dir                             |\n|`CDLBIND`    | bind key to cdlocate                                              |\n|`CDUPIND`    | bind key to cd ..                                                 |\n|`CDLASTBIND` | bind key to cdhist last dir matching text                         |\n\n","funding_links":[],"categories":["Plugins"],"sub_categories":["ZSH on Windows"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoknarf%2Fcdhist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoknarf%2Fcdhist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoknarf%2Fcdhist/lists"}