https://github.com/sunlho/cd-fast
ZSH CD Fast 是一个用于快速切换目录的 Zsh 插件。你可以为常用目录设置别名,并通过简洁的命令快速访问这些目录 。
https://github.com/sunlho/cd-fast
cd plugin zsh
Last synced: 27 days ago
JSON representation
ZSH CD Fast 是一个用于快速切换目录的 Zsh 插件。你可以为常用目录设置别名,并通过简洁的命令快速访问这些目录 。
- Host: GitHub
- URL: https://github.com/sunlho/cd-fast
- Owner: sunlho
- License: mit
- Created: 2025-04-02T01:22:56.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-04-09T06:09:18.000Z (28 days ago)
- Last Synced: 2025-04-09T06:32:54.459Z (28 days ago)
- Topics: cd, plugin, zsh
- Language: Shell
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.EN.md
- License: LICENSE
Awesome Lists containing this project
README
# ZSH CD Fast
## Introduction
**ZSH CD Fast** is a Zsh plugin for quickly switching between directories. You can assign aliases to
frequently used directories and access them using concise commands.## Installation
1. Clone or copy the plugin into your Zsh plugin directory, for example:
```zsh
~/.oh-my-zsh/custom/plugins/cd-fast/
```2. Edit your `~/.zshrc` file and add the plugin name:
```zsh
plugins=(
...
cd-fast
)
```3. Configure the `CD_FAST` environment variable to define directory aliases. For example:
```zsh
export CD_FAST="p:~/projects;d:~/Downloads"
```> ⚠️ **Note:** This line should be placed _before_ `source $ZSH/oh-my-zsh.sh`.
4. Reload your Zsh configuration:
```zsh
source ~/.zshrc
```## Usage
Based on the aliases you define in `CD_FAST`, the plugin will automatically create corresponding `cd`
commands. For example:- `cdp` → switches to `~/projects`
- `cdd` → switches to `~/Downloads`## Example
```zsh
export CD_FAST="p:~/projects;d:~/Downloads;w:~/workspace"# Now you can use:
cdp # → ~/projects
cdd # → ~/Downloads
cdw # → ~/workspace
```