diff options
Diffstat (limited to 'plugins/wd/README.md')
| -rw-r--r-- | plugins/wd/README.md | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/plugins/wd/README.md b/plugins/wd/README.md index 1d1980632..1240afe57 100644 --- a/plugins/wd/README.md +++ b/plugins/wd/README.md @@ -57,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 @@ -97,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 @@ -119,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: @@ -132,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: @@ -216,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 |
