f709cd45484ff7a451414fcd53bca8529323512d

Author
ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(wd): update to 7054de2b (#12675)

Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>

Diff

  1diff --git a/.github/dependencies.yml b/.github/dependencies.yml
  2index be2d02cd8b3f791c57433cacfe64ea1c83b89f95..2be4cdfb085ffc77d40fb1ebaf24ba00ec04e741 100644
  3--- a/.github/dependencies.yml
  4+++ b/.github/dependencies.yml
  5@@ -28,7 +28,7 @@ dependencies:
  6   plugins/wd:
  7     repo: mfaerevaag/wd
  8     branch: master
  9-    version: tag:v0.7.1
 10+    version: tag:v0.9.0
 11     precopy: |
 12       set -e
 13       rm -r test
 14diff --git a/plugins/wd/README.md b/plugins/wd/README.md
 15index bf19031f822411063d853d3c84e9e5c6fe63b87e..b345d65f574231ce0e427203e74ae8677601a2dc 100644
 16--- a/plugins/wd/README.md
 17+++ b/plugins/wd/README.md
 18@@ -115,9 +115,11 @@ wd() {
 19 
 20 3. Install manpage (optional):
 21 
 22+Move manpage into an appropriate directory, then trigger `mandb` to discover it
 23+
 24 ```zsh
 25-sudo cp ~/.local/wd/wd.1 /usr/share/man/man1/wd.1
 26-sudo chmod 644 /usr/share/man/man1/wd.1
 27+sudo install -m 644 ~/.local/wd/wd.1 /usr/share/man/man1/wd.1
 28+sudo mandb /usr/share/man/man1
 29 ```
 30 
 31 **Note:** when pulling and updating `wd`, you'll need to repeat step 3 should the manpage change
 32@@ -139,10 +141,11 @@ rm -f ~/.zcompdump; compinit
 33 
 34 ## Browse
 35 
 36-If you want to make use of the `fzf`-powered browse feature to fuzzy search through all your warp points, set up a keybind in your `.zshrc`:
 37+`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`:
 38 
 39 ```zsh
 40-bindkey ${FZF_WD_BINDKEY:-'^B'} fuzzy_wd_widget
 41+# ctrl-b to open the fzf browser
 42+bindkey ${FZF_WD_BINDKEY:-'^B'} wd_browse_widget
 43 ```
 44 
 45 ## Usage
 46@@ -255,12 +258,6 @@ wd --version
 47 wd --config ./file <command>
 48 ```
 49 
 50-* Force `exit` with return code after running. This is not default, as it will *exit your terminal*, though required for testing/debugging.
 51-
 52-```zsh
 53-wd --debug <command>
 54-```
 55-
 56 * Silence all output:
 57 
 58 ```zsh
 59diff --git a/plugins/wd/wd.plugin.zsh b/plugins/wd/wd.plugin.zsh
 60index 9910cb968323b3f04a9e92e5e5995458eeed657b..2397e6f317659e253c77ea307793045608538dfe 100644
 61--- a/plugins/wd/wd.plugin.zsh
 62+++ b/plugins/wd/wd.plugin.zsh
 63@@ -1,4 +1,4 @@
 64-#!/bin/zsh
 65+#!/usr/bin/env zsh
 66 
 67 # WARP DIRECTORY
 68 # ==============
 69@@ -18,4 +18,3 @@ zle -N wd_browse_widget
 70 zle -N wd_restore_buffer
 71 autoload -Uz add-zle-hook-widget
 72 add-zle-hook-widget line-init wd_restore_buffer
 73-bindkey ${FZF_WD_BINDKEY:-'^B'} wd_browse_widget
 74diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh
 75index 34f887a0ece21d3e42a5ef230e2fa3da7f657d31..ddd31e6f672d53f70de075e8b0b678a62e65c373 100755
 76--- a/plugins/wd/wd.sh
 77+++ b/plugins/wd/wd.sh
 78@@ -1,4 +1,4 @@
 79-#!/bin/zsh
 80+#!/usr/bin/env zsh
 81 
 82 # WARP DIRECTORY
 83 # ==============
 84@@ -8,7 +8,7 @@
 85 # @github.com/mfaerevaag/wd
 86 
 87 # version
 88-readonly WD_VERSION=0.7.0
 89+readonly WD_VERSION=0.9.0
 90 
 91 # colors
 92 readonly WD_BLUE="\033[96m"
 93@@ -90,7 +90,6 @@ Commands:
 94     clean                Remove points warping to nonexistent directories (will prompt unless --force is used)
 95 
 96     -v | --version  Print version
 97-    -d | --debug    Exit after execution with exit codes (for testing)
 98     -c | --config   Specify config file (default ~/.warprc)
 99     -q | --quiet    Suppress all output
100     -f | --force    Allows overwriting without warning (for add & clean)
101@@ -426,7 +425,6 @@ wd_export_static_named_directories() {
102 WD_CONFIG=${WD_CONFIG:-$HOME/.warprc}
103 local WD_QUIET=0
104 local WD_EXIT_CODE=0
105-local WD_DEBUG=0
106 
107 # Parse 'meta' options first to avoid the need to have them before
108 # other commands. The `-D` flag consumes recognized options so that
109@@ -436,7 +434,6 @@ zparseopts -D -E \
110     c:=wd_alt_config -config:=wd_alt_config \
111     q=wd_quiet_mode -quiet=wd_quiet_mode \
112     v=wd_print_version -version=wd_print_version \
113-    d=wd_debug_mode -debug=wd_debug_mode \
114     f=wd_force_mode -force=wd_force_mode
115 
116 if [[ ! -z $wd_print_version ]]
117@@ -583,9 +580,4 @@ unset args
118 unset points
119 unset val &> /dev/null # fixes issue #1
120 
121-if [[ -n $wd_debug_mode ]]
122-then
123-    exit $WD_EXIT_CODE
124-else
125-    unset wd_debug_mode
126-fi
127+return $WD_EXIT_CODE