Skip to content

Commit

Permalink
README: add Zsh completion instructions (close #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodesOfRishi committed Jan 7, 2022
1 parent e9d0411 commit 168b79f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,23 @@ This will also install the required dependencies, but you may have to install th
brew upgrade smartcd # to upgrade smartcd
```

## Zsh Completion

- Add the below code after calling `compinit` in your `.zshrc`.

```bash
compdef __smartcd__=cd
```

This will enable completion for SmartCd same as of built-in `cd` command.

- If you also want hidden directories completion for SmartCd, you need to enable GLOB_DOTS option.

```bash
setopt globdots
```

Lastly, open a new shell or reload your shell configuration file.

## Configurations

Expand Down

0 comments on commit 168b79f

Please sign in to comment.