{"id":13429307,"url":"https://github.com/babarot/enhancd","last_synced_at":"2025-05-14T02:04:25.875Z","repository":{"id":23529469,"uuid":"26896068","full_name":"babarot/enhancd","owner":"babarot","description":":rocket: A next-generation cd command with your interactive filter","archived":false,"fork":false,"pushed_at":"2025-01-24T02:06:31.000Z","size":1497,"stargazers_count":2619,"open_issues_count":17,"forks_count":111,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-05-10T00:02:50.613Z","etag":null,"topics":["autojump","bash","cd","cli","command-line-interface","command-line-tool","fasd","fuzzy-search","fzf","fzf-scripts","jump","shell","shell-extension","shell-scripts","z","zplug","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babarot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yaml","license":null,"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":{"github":["babarot"],"patreon":"babarot","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-11-20T04:41:51.000Z","updated_at":"2025-05-08T02:08:54.000Z","dependencies_parsed_at":"2023-09-27T09:48:56.551Z","dependency_job_id":"e0e0978b-44ae-426f-8746-d080cda84e7a","html_url":"https://github.com/babarot/enhancd","commit_stats":{"total_commits":486,"total_committers":41,"mean_commits":"11.853658536585366","dds":0.4320987654320988,"last_synced_commit":"576c0e5e2a12975ba00869d98722b46ffa7be3a2"},"previous_names":["babarot/enhancd","b4b4r07/enhancd"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fenhancd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fenhancd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fenhancd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fenhancd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babarot","download_url":"https://codeload.github.com/babarot/enhancd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052668,"owners_count":22006716,"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","bash","cd","cli","command-line-interface","command-line-tool","fasd","fuzzy-search","fzf","fzf-scripts","jump","shell","shell-extension","shell-scripts","z","zplug","zsh"],"created_at":"2024-07-31T02:00:33.952Z","updated_at":"2025-05-14T02:04:25.850Z","avatar_url":"https://github.com/babarot.png","language":"Shell","readme":"[version-badge]: https://img.shields.io/github/tag/babarot/enhancd.svg\n[version-link]: https://github.com/babarot/enhancd/tags\n[sponsors-badge]: https://img.shields.io/github/sponsors/babarot?logo=github\u0026color=lightyellow\n[sponsors-link]: https://github.com/sponsors/babarot\n[repostatus-badge]: https://www.repostatus.org/badges/latest/active.svg\n[repostatus-link]: https://www.repostatus.org/#active\n[awk-link]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html\n[license-link]: https://babarot.mit-license.org\n\n\u003cdiv align=\"center\"\u003e\n\nenhan/cd\n===\n\n[:rocket:](#usage) [:rocket:](#installation) [:rocket:](#configuration)\n\n[![][version-badge]][version-link] [![][repostatus-badge]][repostatus-link] [![][sponsors-badge]][sponsors-link]\n\nenhancd is ***an enhanced cd command*** integrated with a command line fuzzy finder based on UNIX concept.\n\nTyping “cd” in your console, enhancd provides you a new window to visit a directory. The basic UX of enhancd is almost same as builtin cd command but totally differenent in that you can choose where to go from the list of visited directories in the past. You can select the directory you want to visit using your favorite command line interactive filter (e.g. fzf). It just extends original cd command but brings you completely new experience.\n\n\u003c/div\u003e\n\n\u003c!--\n\nNaming:\n\n- enhan/cd\n- enhanc\u003csup\u003ee\u003c/sup\u003ed\n- enhan\u003csup\u003e/\u003c/sup\u003ecd\n\nFeatures:\n\n- Go to the visited directory in the past\n- Easy to filter, using your favorite filter\n- Work on Bash, Zsh and fish (cross-shell compatibility)\n- Go back to a specific parent directory like [zsh-bd](https://github.com/Tarrasch/zsh-bd)\n- Inside a git repo, the first list element is the git root directory\n- Fuzzy search in a similar name directory\n- Support standard input (`echo $HOME | cd` is acceptable)\n- Custom options (user-defined option is acceptable)\n--\u003e\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [Getting Started](#getting-started)\n* [Usage](#usage)\n  * [Hyphen (`-`)](#hyphen--)\n  * [Double-dot (`..`)](#double-dot-)\n  * [Single-dot (`.`)](#single-dot-)\n  * [Piping](#piping)\n* [Options](#options)\n* [Installation](#installation)\n  * [Manual](#manual)\n  * [Using package manager](#using-package-manager)\n* [Configuration](#configuration)\n* [Known issues](#known-issues)\n* [References](#references)\n  * [Interactive filter commands](#interactive-filter-commands)\n  * [Versus](#versus)\n* [License](#license)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n## Getting Started\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/4442708/229307417-50cf53de-594f-4a19-8547-9820d3af2f1c.gif\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/4442708/229307415-32cb36ee-491d-47c5-b852-e94d802e9584.gif\"\u003e\n  \u003cimg alt=\"demo\" src=\"https://user-images.githubusercontent.com/4442708/229307417-50cf53de-594f-4a19-8547-9820d3af2f1c.gif\"\u003e\n\u003c/picture\u003e\n\nTrying enhancd on the current shell, you need to run this command:\n\n```bash\nsource ./init.sh\n```\n\nAfter that, `cd` is aliased to `__enhancd::cd` so you can use enhancd feature by typing `cd` as usual.\n\nUsing enhancd feature requires a command line fuzzy finder tool (as known as an interactive filter), for example, [fzf](https://github.com/junegunn/fzf). The `ENHANCD_FILTER` is the command name for interactive filters. It is a colon-separated list of executables. Each arguments can be also included to the list. It searches from the top of the list and uses the first installed one. A default value is `fzy:fzf:peco:sk:zf`.\n\nChanging the order of each executables in the list, you can change the interactive filter command used by enhancd. Let’s configure what’s your favorite one!\n\n```console\n$ export ENHANCD_FILTER=\"fzf --height 40%:fzy\"\n```\n\n## Usage\n\nThe usage of `cd` command powered by `enhancd` is almost same as built-in `cd` command.\n\n```console\n$ cd [-|..|.] \u003cdir\u003e\n```\n\nArgument | Behavior\n---|---\n (none) | List all directories visited in the past. The `HOME` is always shown at a top of the list as builtin `cd` does. \u003cbr\u003e \u003cimg width=\"600\" alt=\"\" src=\"https://user-images.githubusercontent.com/4442708/229298754-9dcd8e18-5777-4b23-bdcf-1aa4e06ac92b.png\"\u003e\n`\u003cdir\u003e` (exists in cwd) | Go to `dir` without the filter command (same as builtin `cd`) \u003cbr\u003e \u003cimg width=\"600\" alt=\"\" src=\"https://user-images.githubusercontent.com/4442708/229298751-ed509919-4ebc-4b59-90d9-bb7792aa9fd0.png\"\u003e\n`\u003cdir\u003e` (not exists in cwd) | Find directories matched with `dir` or being similar to `dir` and then pass them to the filter command. A directory named \"afx\" is not in the current directory but enhancd `cd` can show where to go from the visited log. \u003cbr\u003e \u003cimg width=\"600\" alt=\"\" src=\"https://user-images.githubusercontent.com/4442708/229298749-ec8c0bca-100f-4b8a-9d21-510ce1666831.png\"\u003e\n`-` | List latest 10 directories \u003cbr\u003e \u003cimg width=\"600\" alt=\"\" src=\"https://user-images.githubusercontent.com/4442708/229298748-ad6380ff-4498-4b30-9f8a-46b792ca4669.png\"\u003e\n`..` | List all parent directories of cwd \u003cbr\u003e \u003cimg width=\"600\" alt=\"\" src=\"https://user-images.githubusercontent.com/4442708/229298747-039a2d06-2e1a-4b27-b009-e78a9c74c6ea.png\"\u003e\n`.` | List all sub directories in cwd \u003cbr\u003e \u003cimg width=\"600\" alt=\"\" src=\"https://user-images.githubusercontent.com/4442708/229298744-b6f8cab1-654b-4197-855b-9f1d84c4c933.png\"\u003e\n\n### Hyphen (`-`)\n\nList latest 10 directories. This is useful for choosing the directory recently visited only. The number of directories shown as the choices can be changed as you like by editing `ENHANCD_HYPHEN_NUM` (Defaults to `10`).\n\n```console\n$ cd -\n❯ enhancd\n  2/10\n\u003e /Users/babarot/src/github.com/babarot/enhancd\n  /Users/babarot/src/github.com/babarot/enhancd/src\n```\n\nTo disable this feature, set `ENHANCD_ENABLE_HYPHEN` to `false`.\n\n### Double-dot (`..`)\n\nList all parent directories of the current working directory to quickly go back to any directory instead of typing `cd ../../..` redundantly.\n\nLet's say you're in `~/src/github.com/babarot/enhancd`. The result of `cd ..` will be:\n\n```console\n$ cd ..\n❯ _\n  6/6\n\u003e /Users/babarot/src/github.com/babarot\n  /Users/babarot/src/github.com\n  /Users/babarot/src\n  /Users/babarot\n  /Users\n  /\n```\n\nTo disable this feature, set `ENHANCD_ENABLE_DOUBLE_DOT` to `false`.\n\n### Single-dot (`.`)\n\nList all sub directories recursively located under the current directory. The built-in `cd` command does nothing even if a dot (`.`) is passed. Whereas, in enhancd `cd`, it's useful for visiting any sub directory easily (the example below is that if you're in \"enhancd\" directory):\n\n```console\n$ cd .\n❯ _\n  8/8\n\u003e .github/\n  .github/ISSUE_TEMPLATE/\n  .github/workflows/\n  conf.d/\n  functions/\n  functions/enhancd/\n  functions/enhancd/lib/\n  src/\n```\n\nThis would be very useful to find a directory you want to visit within current directory. It uses `find` command internally to list directories but it would be good to install `fd` ([sharkdp/fd](https://github.com/sharkdp/fd)) command. It'll be more fast and also be included hidden directories into the list if `fd` is used.\n\nTo disable this feature, set `ENHANCD_ENABLE_SINGLE_DOT` to `false`.\n\n### Piping\n\n:bulb: Zsh only.\n\nenhancd allows you to pass one or multiple directory paths to cd commands like this:\n\n```conosle\n$ (paths) | cd\n```\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/4442708/229368007-071958e1-77a6-4fd1-b371-535d1dac46f6.gif\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/4442708/229368002-dd1c0c4c-6b53-4908-8b88-e00dc4e884ff.gif\"\u003e\n  \u003cimg alt=\"piping\" src=\"https://user-images.githubusercontent.com/4442708/229368007-071958e1-77a6-4fd1-b371-535d1dac46f6.gif\" width=\"600\"\u003e\n\u003c/picture\u003e\n\n## Options\n\n```console\n$ cd --help\nUsage: cd [OPTIONS] [dir]\n\nOPTIONS:\n  -h, --help          Show help message\n  -q                  (default) quiet, no output or use of hooks\n  -s                  (default) refuse to use paths with symlinks\n  -L                  (default) retain symbolic links ignoring CHASE_LINKS\n  -P                  (default) resolve symbolic links as CHASE_LINKS\n\nVersion: 2.3.0\n```\n\nIn enhancd, all options are defined at a configuration file ([config.ltsv](https://github.com/babarot/enhancd/blob/master/config.ltsv)). This mechanism allows you to add what you want as new option or delete unneeded default options. It uses [LTSV](http://ltsv.org/) (Labeled Tab-Separated Values) format.\n\nFor example, let's say you want to use [`ghq list`](https://github.com/x-motemen/ghq) as custom inputs for `cd` command. In this case, all you have to do is just to add this one line to your any `config.ltsv`:\n\n```tsv\nshort:-G\tlong:--ghq\tdesc:Show ghq path\tfunc:ghq list --full-path\tcondition:which ghq\n```\n\nLabel | Description\n---|---\nshort (`*`) | a short option (e.g. `-G`)\nlong (`*`) | a long option (e.g. `--ghq`)\ndesc | a description for the option\nfunc (`*`) | a command which returns directory list (e.g. `ghq list --full-path`)\ncondition | a command which determine that the option should be implemented or not (e.g. `which ghq`)\nformat | a string which indicates how to format a line selected by the filter before passing cd command. `%` is replaced as a selected line and then passed to cd command (e.g. `$HOME/src/%`). This is useful for the case that input sources for the interactive filter are not a full-path.\n\n\u003e **Note**: `*`: A required key. But either `short` or `long` is good enough.\n\n\u003c!-- \u003cimg width=\"600\" alt=\"\" src=\"https://user-images.githubusercontent.com/4442708/229298741-236f2920-cde2-4184-9fd3-72849af7a223.png\"\u003e --\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/4442708/229365175-aecfe844-cbd7-4ee2-87a6-ea8471ac9b6f.gif\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/4442708/229365177-6c8d6056-9ba3-4f22-ba28-48f3991f9f98.gif\"\u003e\n  \u003cimg alt=\"options\" src=\"https://user-images.githubusercontent.com/4442708/229365175-aecfe844-cbd7-4ee2-87a6-ea8471ac9b6f.gif\" width=\"600\"\u003e\n\u003c/picture\u003e\n\nenhancd loads these `config.ltsv` files located in:\n\n1. `$ENHANCD_ROOT/config.ltsv`\n2. `$ENHANCD_DIR/config.ltsv`\n3. `$HOME/.config/enhancd/config.ltsv`\n\nThanks to this feature, it's easy to add your custom option as you hope.\n\n## Installation\n\n### Manual\n\nenhancd is consists of a bunch of shell scripts. Running this command to clone repo and to run an entrypoint script enables you to try it out.\n\n```bash\ngit clone https://github.com/babarot/enhancd \u0026\u0026 source enhancd/init.sh\n```\n\n### Using package manager\n\nUsing [AFX](https://github.com/babarot/afx) for installing and managing shell plugins is heavily recommended now because it's better solution to manage enhancd and your favorite interactive filter at the same way.\n\n```yaml\ngithub:\n- name: babarot/enhancd\n  description: A next-generation cd command with your interactive filter\n  owner: babarot\n  repo: enhancd\n  plugin:\n    env:\n      ENHANCD_FILTER: \u003e\n        fzf --preview 'exa -al --tree --level 1 --group-directories-first --git-ignore\n        --header --git --no-user --no-time --no-filesize --no-permissions {}'\n        --preview-window right,50% --height 35% --reverse --ansi\n        :fzy\n        :peco\n    sources:\n    - init.sh\n- name: junegunn/fzf\n  description: A command-line fuzzy finder\n  owner: junegunn\n  repo: fzf\n  command:\n    build:\n      steps:\n        - ./install --bin --no-update-rc --no-key-bindings\n    link:\n    - from: 'bin/fzf'\n    - from: 'bin/fzf-tmux'\n  plugin:\n    sources:\n    - shell/completion.zsh\n    env:\n      FZF_DEFAULT_COMMAND: fd --type f\n      FZF_DEFAULT_OPTS: \u003e\n        --height 75% --multi --reverse --margin=0,1\n        --bind ctrl-f:page-down,ctrl-b:page-up,ctrl-/:toggle-preview\n        --bind pgdn:preview-page-down,pgup:preview-page-up\n        --marker=\"✚\" --pointer=\"▶\" --prompt=\"❯ \"\n        --no-separator --scrollbar=\"█\"\n        --color bg+:#262626,fg+:#dadada,hl:#f09479,hl+:#f09479\n        --color border:#303030,info:#cfcfb0,header:#80a0ff,spinner:#36c692\n        --color prompt:#87afff,pointer:#ff5189,marker:#f09479\n      FZF_CTRL_T_COMMAND: rg --files --hidden --follow --glob \"!.git/*\"\n      FZF_CTRL_T_OPTS: --preview \"bat --color=always --style=header,grid --line-range :100 {}\"\n      FZF_ALT_C_COMMAND: fd --type d\n      FZF_ALT_C_OPTS: --preview \"tree -C {} | head -100\"\n```\n\nthen,\n\n```console\n$ afx install\n```\n\nFor more details, see [the full documentation](https://babarot.me/afx/).\n\n\u003cdetails\u003e\u003csummary\u003eOther installations are here!\u003c/summary\u003e\n\n\u003cbr\u003e\n\n\u003ctable\u003e\n\n\u003ctr\u003e\u003ctd\u003e \u003cstrong\u003eCase\u003c/strong\u003e \u003c/td\u003e\u003ctd\u003e \u003cstrong\u003eInstallation\u003c/strong\u003e \u003c/td\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\nFig\n\n\u003c/td\u003e\n\u003ctd\u003e\n\nInstall `enhancd` with [Fig](https://fig.io) on zsh, bash, or fish with just one click.\n\n\u003ca href=\"https://fig.io/plugins/other/enhancd\" target=\"_blank\"\u003e\u003cimg src=\"https://fig.io/badges/install-with-fig.svg\" /\u003e\u003c/a\u003e\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\nBash\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n1. Run cloning on the console.\n\n   ```console\n   $ git clone https://github.com/babarot/enhancd.git /path/to/enhancd\n   ```\n\n2. Add this line to your bashrc.\n\n   ```bash\n   # ~/.bashrc\n   source /path/to/enhancd/init.sh\n   ```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd rowspan=\"3\"\u003e Zsh \u003c/td\u003e\n\u003ctd\u003e\n\n[`zplug`](https://github.com/zplug/zplug) (powerful plugin manager for zsh):\n\nAdd this line to your zshrc\n\n```bash\n# .zshrc\nzplug \"babarot/enhancd\", use:init.sh\n```\n\nand then run this command.\n\n```\n$ zplug install\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003c!-- \u003ctd\u003e Zsh \u003c/td\u003e --\u003e\n\u003ctd\u003e\n\n[`oh-my-zsh`](https://github.com/ohmyzsh/ohmyzsh) user:\n\nClone repo,\n\n```console\n$ git clone https://github.com/babarot/enhancd.git $ZSH_CUSTOM/plugins/enhancd\n```\n\nand then load as a plugin in your zshrc.\n\n```bash\n# .zshrc\nplugins+=(enhancd)\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003c!-- \u003ctd\u003e Zsh \u003c/td\u003e --\u003e\n\u003ctd\u003e\n\n[`zi`](https://wiki.zshell.dev) user:\n\nLoad as a plugin in your zshrc.\n\n```bash\n# .zshrc\ne src\"init.sh\"\nzi load babarot/enhancd\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\nFish\n\n\u003c/td\u003e\n\u003ctd\u003e\n\nSystem Requirements:\n\n- [Fish](https://fishshell.com/) ≥ 3.0\n\nInstall with [Fisher](https://github.com/jorgebucaran/fisher):\n\n```console\n$ fisher install babarot/enhancd\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003c/table\u003e\n\n\u003c/details\u003e\n\n## Configuration\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_DIR\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nA directory to have `enhancd.log` and `config.ltsv`. It defaults to `~/.enhancd`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_FILTER\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nA list of executable commands (interactive filter such as `fzf`) concatenated with '`:`' like `PATH`. For example:\n\n```bash\nexport ENHANCD_FILTER=\"/usr/local/bin/sk:fzf --ansi:fzy:non-existing-filter\"\n```\n\nThe command found by searching in order from the first is used as an interactive filter of enhancd. If there is nothing any commands, it only provides a functionality as a built-in `cd` command.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_COMMAND\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nA command name to trigger enhancd `cd` command. It defaults to `cd`. By default, enhancd aliases `cd` to enhancd one. So you want to prevent it, you need to set this environemnt variable.\n\nAfter set, you need to set restart your shell to apply the changes.\n\n```console\n$ echo $ENHANCD_COMMAND\ncd\n$ export ENHANCD_COMMAND=ecd\n$ source /path/to/init.sh\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ENABLE_DOUBLE_DOT\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nEnable to list parent directories when `..` is given. Defaults to `true`.\n\nref: [Double-dot (`..`)](#double-dot-)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ENABLE_SINGLE_DOT\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nEnable to list sub directories in the current directory when `.` is given. Defaults to `true`.\n\nref: [Single-dot (`.`)](#single-dot-)\n\n\u003e **Note**\n\u003e Added in [#188](https://github.com/babarot/enhancd/pull/188) [#198](https://github.com/babarot/enhancd/pull/198)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ENABLE_HYPHEN\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nEnable to list visited directories limited latest 10 cases when `-` is given. Defaults to `true`.\n\nref: [Single-dot (`.`)](#single-dot-)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ENABLE_HOME\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nEnable to use the interactive filter when no argument is given. When set it to `false`, `cd` just changes the current working directory to home directory. Defaults to `true`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ARG_DOUBLE_DOT\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nYou can customize the double-dot (`..`) argument for enhancd by this environment variable.\nDefault is `..`.\n\nIf you set this variable any but `..`, it gives you the _double-dot_ behavior with that argument; i.e. upward search of directory hierarchy.\nThen `cd ..` changes current directory to parent directory without interactive filter.\n\nIn other words, you can keep original `cd ..` behavior by this option.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ARG_SINGLE_DOT\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nYou can customize the single-dot (`.`) argument for enhancd by this environment variable.\nDefault is `.`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ARG_HYPHEN\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nA string to trigger a hyphen behavior. Default is `-`.\n\nIf you set this variable any but `-`, it gives you a _hyphen_ behavior with that argument; i.e. backward search of directory-change history.\nThen `cd -` changes current directory to `$OLDPWD` without interactive filter.\n\nIn other words, you can keep the original `cd -` behavior by setting this option.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_ARG_HOME\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nYou can customize to trigger the argumentless `cd` behavior by giving the string specified by this environment variable as an argument. Default is empty string.\n\nIf you set this variable any but empty string, it gives you the behavior of `cd` with no argument; i.e. backward search of the whole directory-change history.\nThen `cd` with no argument changes current directory to `$HOME` without interactive filter.\n\nIn other words, you can keep original behavior of `cd` with no argument by setting this option.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_HYPHEN_NUM\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nA variable to specify how many lines to show up in the list when a hyphen behavior. Default is `10`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_HOOK_AFTER_CD\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nDefault is empty. You can run any commands after changing directory with enhancd (e.g. set `ls` to this variable =\u003e same as `cd \u0026\u0026 ls`).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eENHANCD_USE_ABBREV\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\nSet this to `true` to abbreviate the home directory prefix to `~` when performing an interactive search.\nUsing the example shown previously, all entries when searching will be shown as follows:\n\n\u003ctable\u003e\n\n\u003ctr\u003e\u003ctd align=\"center\"\u003e \u003cstrong\u003efalse\u003c/strong\u003e \u003c/td\u003e\u003ctd align=\"center\"\u003e \u003cstrong\u003etrue\u003c/strong\u003e \u003c/td\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\n\u003c!--\n```console\n$ cd -\n❯ _\n  10/10\n  /Users/babarot/src\n\u003e /Users/babarot/src/github.com/babarot/enhancd/src\n  /Users/babarot/enhancd\n  /Users/babarot/src/github.com/babarot/dotfiles\n  /Users/babarot/src/github.com/babarot/dotfiles/.config/nvim/lua/plugins\n  /Users/babarot/src/github.com/babarot/enhancd/functions/enhancd/lib\n  /Users/babarot/src/github.com/babarot/tmux-git-prompt\n  /Users/babarot/.tmux/plugins/tmux-git-prompt\n  /Users/babarot/.tmux/plugins/tmux-colors-solarized\n  /Users/babarot/.afx/github.com/babarot\n```\n--\u003e\n\n```console\n$ cd -\n❯ _\n  10/10\n  /Users/babarot/src\n\u003e /Users/babarot/src/github.com/b4b4..\n  /Users/babarot/enhancd\n  /Users/babarot/src/github.com/b4b4..\n  /Users/babarot/src/github.com/b4b4..\n  /Users/babarot/src/github.com/b4b4..\n  /Users/babarot/src/github.com/b4b4..\n  /Users/babarot/.tmux/plugins/tmux-..\n  /Users/babarot/.tmux/plugins/tmux-..\n  /Users/babarot/.afx/github.com/b4b..\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```console\n$ cd -\n❯ _\n  10/10\n  ~/src\n\u003e ~/src/github.com/b4b4..\n  ~/enhancd\n  ~/src/github.com/b4b4..\n  ~/src/github.com/b4b4..\n  ~/src/github.com/b4b4..\n  ~/src/github.com/b4b4..\n  ~/.tmux/plugins/tmux-..\n  ~/.tmux/plugins/tmux-..\n  ~/.afx/github.com/b4b..\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003c/table\u003e\n\nDefault is `false` (disable).\n\n\u003c/details\u003e\n\n## Known issues\n\n**Enhancd complete (fish)**:\n\nOn fish shell, you can use \u003ckbd\u003ealt+f\u003c/kbd\u003e to trigger `enhancd` when typing a command, the selected item will be appended to the commandline\n\n- Fish version\n  - Because of how fish piping works, it's not possible to pipe to cd like : `ls / | cd`\n\n## References\n\n### Interactive filter commands\n\nThe \"visual filter\" (interactive filter) is what is called \"Interactive Grep Tool\" according to [percol](https://github.com/mooz/percol) that is a pioneer in interactive selection to the traditional pipe concept on UNIX. Some candidates of an interactive filter are listed on here.\n\nName | Stars | Language | Activity\n---|---|---|---\n[junegunn/fzf][fzf-link]              | ![][fzf-star]     | ![][fzf-lang]     | ![][fzf-last]    \n[mooz/percol][percol-link]            | ![][percol-star]  | ![][percol-lang]  | ![][percol-last] \n[peco/peco][peco-link]                | ![][peco-star]    | ![][peco-lang]    | ![][peco-last]   \n[jhawthorn/fzy][fzy-link]             | ![][fzy-star]     | ![][fzy-lang]     | ![][fzy-last]    \n[mattn/gof][gof-link]                 | ![][gof-star]     | ![][gof-lang]     | ![][gof-last]    \n[garybernhardt/selecta][selecta-link] | ![][selecta-star] | ![][selecta-lang] | ![][selecta-last]\n[mptre/pick][pick-link]               | ![][pick-star]    | ![][pick-lang]    | ![][pick-last]   \n[lotabout/skim][skim-link]            | ![][skim-star]    | ![][skim-lang]    | ![][skim-last]   \n[natecraddock/zf][zf-link]            | ![][zf-star]      | ![][zf-lang]      | ![][zf-last]     \n\n[fzf-link]: https://github.com/junegunn/fzf\n[fzf-star]: https://img.shields.io/github/stars/junegunn/fzf\n[fzf-last]: https://img.shields.io/github/last-commit/junegunn/fzf\n[fzf-lang]: https://img.shields.io/github/languages/top/junegunn/fzf\n\n[percol-link]: https://github.com/mooz/percol\n[percol-star]: https://img.shields.io/github/stars/mooz/percol\n[percol-last]: https://img.shields.io/github/last-commit/mooz/percol\n[percol-lang]: https://img.shields.io/github/languages/top/mooz/percol\n\n[peco-link]: https://github.com/peco/peco\n[peco-star]: https://img.shields.io/github/stars/peco/peco\n[peco-last]: https://img.shields.io/github/last-commit/peco/peco\n[peco-lang]: https://img.shields.io/github/languages/top/peco/peco\n\n[fzy-link]: https://github.com/jhawthorn/fzy\n[fzy-star]: https://img.shields.io/github/stars/jhawthorn/fzy\n[fzy-last]: https://img.shields.io/github/last-commit/jhawthorn/fzy\n[fzy-lang]: https://img.shields.io/github/languages/top/jhawthorn/fzy\n\n[gof-link]: https://github.com/mattn/gof\n[gof-star]: https://img.shields.io/github/stars/mattn/gof\n[gof-last]: https://img.shields.io/github/last-commit/mattn/gof\n[gof-lang]: https://img.shields.io/github/languages/top/mattn/gof\n\n[selecta-link]: https://github.com/garybernhardt/selecta\n[selecta-star]: https://img.shields.io/github/stars/garybernhardt/selecta\n[selecta-last]: https://img.shields.io/github/last-commit/garybernhardt/selecta\n[selecta-lang]: https://img.shields.io/github/languages/top/garybernhardt/selecta\n\n[pick-link]: https://github.com/mptre/pick\n[pick-star]: https://img.shields.io/github/stars/mptre/pick\n[pick-last]: https://img.shields.io/github/last-commit/mptre/pick\n[pick-lang]: https://img.shields.io/github/languages/top/mptre/pick\n\n[skim-link]: https://github.com/lotabout/skim\n[skim-star]: https://img.shields.io/github/stars/lotabout/skim\n[skim-last]: https://img.shields.io/github/last-commit/lotabout/skim\n[skim-lang]: https://img.shields.io/github/languages/top/lotabout/skim\n\n[zf-link]: https://github.com/natecraddock/zf\n[zf-star]: https://img.shields.io/github/stars/natecraddock/zf\n[zf-last]: https://img.shields.io/github/last-commit/natecraddock/zf\n[zf-lang]: https://img.shields.io/github/languages/top/natecraddock/zf\n\n### Versus\n\nSimilar projects.\n\n- [wting/autojump](https://github.com/wting/autojump)\n- [gsamokovarov/jump](https://github.com/gsamokovarov/jump)\n- [rupa/z](https://github.com/rupa/z)\n- [skywind3000/z.lua](https://github.com/skywind3000/z.lua)\n- [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide)\n- [changyuheng/zsh-interactive-cd](https://github.com/changyuheng/zsh-interactive-cd)\n- [clvv/fasd](https://github.com/clvv/fasd) (archived)\n\n(However, the basic concept of `enhancd` is totally different from these directory-jump tools)\n\n## License\n\n[MIT][license-link]\n","funding_links":["https://github.com/sponsors/babarot","https://patreon.com/babarot"],"categories":["Bash Utilities","Shell","cli","\u003ca name=\"cd\"\u003e\u003c/a\u003eDirectory changers (alternatives to cd)"],"sub_categories":["Installing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fenhancd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabarot%2Fenhancd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fenhancd/lists"}