Update 05.04.2026
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# wd
|
||||
|
||||
[](https://travis-ci.org/mfaerevaag/wd)
|
||||
[](https://github.com/mfaerevaag/wd/actions)
|
||||
|
||||
`wd` (*warp directory*) lets you jump to custom directories in zsh, without using `cd`.
|
||||
Why?
|
||||
Because `cd` seems inefficient when the folder is frequently visited or has a long path.
|
||||
|
||||

|
||||

|
||||
|
||||
## Setup
|
||||
|
||||
@@ -36,6 +36,10 @@ In your `.zshrc`:
|
||||
antibody bundle mfaerevaag/wd
|
||||
```
|
||||
|
||||
### [Fig](https://fig.io)
|
||||
|
||||
Install `wd` here: [](https://fig.io/plugins/other/wd_mfaerevaag)
|
||||
|
||||
### Arch ([AUR](https://aur.archlinux.org/packages/zsh-plugin-wd-git/))
|
||||
|
||||
1. Install from the AUR
|
||||
@@ -53,6 +57,21 @@ wd() {
|
||||
}
|
||||
```
|
||||
|
||||
### [Home Manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Add the following to your `home.nix` then run `home-manager switch`:
|
||||
|
||||
```nix
|
||||
programs.zsh.plugins = [
|
||||
{
|
||||
name = "wd";
|
||||
src = pkgs.zsh-wd;
|
||||
file = "share/wd/wd.plugin.zsh";
|
||||
completions = [ "share/zsh/site-functions" ];
|
||||
}
|
||||
];
|
||||
```
|
||||
|
||||
### [zplug](https://github.com/zplug/zplug)
|
||||
|
||||
```zsh
|
||||
@@ -93,9 +112,11 @@ wd() {
|
||||
|
||||
3. Install manpage (optional):
|
||||
|
||||
Move manpage into an appropriate directory, then trigger `mandb` to discover it
|
||||
|
||||
```zsh
|
||||
sudo cp ~/.local/wd/wd.1 /usr/share/man/man1/wd.1
|
||||
sudo chmod 644 /usr/share/man/man1/wd.1
|
||||
sudo install -m 644 ~/.local/wd/wd.1 /usr/share/man/man1/wd.1
|
||||
sudo mandb /usr/share/man/man1
|
||||
```
|
||||
|
||||
**Note:** when pulling and updating `wd`, you'll need to repeat step 3 should the manpage change
|
||||
@@ -115,6 +136,15 @@ Also, you may have to force a rebuild of `zcompdump` by running:
|
||||
rm -f ~/.zcompdump; compinit
|
||||
```
|
||||
|
||||
## Browse
|
||||
|
||||
`wd` comes with an `fzf`-powered browse feature to fuzzy search through all your warp points. It's available through the `wd browse` command. For quick access you can set up an alias or keybind in your `.zshrc`:
|
||||
|
||||
```zsh
|
||||
# ctrl-b to open the fzf browser
|
||||
bindkey ${FZF_WD_BINDKEY:-'^B'} wd_browse_widget
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
* Add warp point to current working directory:
|
||||
@@ -128,6 +158,19 @@ If a warp point with the same name exists, use `wd add foo --force` to overwrite
|
||||
**Note:** a warp point cannot contain colons, or consist of only spaces and dots.
|
||||
The first will conflict in how `wd` stores the warp points, and the second will conflict with other features, as below.
|
||||
|
||||
* Add warp point to any directory with default name:
|
||||
|
||||
```zsh
|
||||
wd addcd /foo/ bar
|
||||
```
|
||||
|
||||
* Add warp point to any directory with a custom name:
|
||||
|
||||
```zsh
|
||||
wd addcd /foo/
|
||||
```
|
||||
|
||||
|
||||
You can omit point name to automatically use the current directory's name instead.
|
||||
|
||||
* From any directory, warp to `foo` with:
|
||||
@@ -212,12 +255,6 @@ wd --version
|
||||
wd --config ./file <command>
|
||||
```
|
||||
|
||||
* Force `exit` with return code after running. This is not default, as it will *exit your terminal*, though required for testing/debugging.
|
||||
|
||||
```zsh
|
||||
wd --debug <command>
|
||||
```
|
||||
|
||||
* Silence all output:
|
||||
|
||||
```zsh
|
||||
|
||||
Reference in New Issue
Block a user