Skip to content

Commit f9675e5

Browse files
authored
Merge pull request #21 from mbland/plugins
plugins: Revert changes from #20
2 parents ce20155 + 33c54b6 commit f9675e5

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

libexec/plugins

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,15 @@
1818
# contain a `bin/` subdirectory containing its command scripts.
1919

2020
_@go.plugins_pathspec() {
21-
if [[ -z "$_GO_PLUGINS_DIR" ]]; then
22-
return 1
23-
fi
24-
25-
local plugins_paths=("$_GO_PLUGINS_DIR" "$_GO_PLUGINS_DIR"/*/bin)
26-
27-
if [[ "${plugins_paths[1]}" == "$_GO_PLUGINS_DIR/*/bin" ]]; then
28-
unset 'plugins_paths[1]'
29-
fi
30-
3121
local IFS=':'
32-
__go_plugins_pathspec="${plugins_paths[*]}"
22+
__go_plugins_pathspec="${_GO_PLUGINS_PATHS[*]}"
3323
}
3424

3525
_@go.plugins() {
3626
local __go_plugins_pathspec
27+
_@go.plugins_pathspec
3728

38-
if _@go.plugins_pathspec; then
29+
if [[ -n "$__go_plugins_pathspec" ]]; then
3930
# Tab completions
4031
_@go.source_builtin 'commands' "$@" "$__go_plugins_pathspec"
4132
else

0 commit comments

Comments
 (0)