Skip to content

Commit

Permalink
Merge c93eee0 into 292e080
Browse files Browse the repository at this point in the history
  • Loading branch information
nkakouros committed Feb 16, 2019
2 parents 292e080 + c93eee0 commit 23bd7e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/internal/complete
Expand Up @@ -6,7 +6,11 @@ _@go.complete_top_level_commands() {
_@go.source_builtin 'commands'
else
printf 'help\n'
_@go.source_builtin 'commands' "$_GO_SCRIPTS_DIR"

local plugins_paths
printf -v plugins_paths '%s:' "${_GO_PLUGINS_PATHS[@]}"
scripts_paths="${plugins_paths%:}"
_@go.source_builtin 'commands' "$_GO_SCRIPTS_DIR:$plugins_paths"
fi
}

Expand Down
4 changes: 2 additions & 2 deletions tests/complete.bats
Expand Up @@ -45,13 +45,13 @@ teardown() {
assert_failure ''
}

@test "$SUITE: _GO_STANDALONE only completes 'help' and project scripts" {
@test "$SUITE: _GO_STANDALONE only completes 'help' and custom scripts/plugins" {
@go.create_test_command_script 'foo'
@go.create_test_command_script 'bar'
@go.create_test_command_script 'plugins/baz/bin/baz'

_GO_STANDALONE='true' run "$TEST_GO_SCRIPT" complete 0
assert_success 'help' 'bar' 'foo'
assert_success 'help' 'bar' 'baz' 'foo'
}

@test "$SUITE: cd and pushd complete directories" {
Expand Down

0 comments on commit 23bd7e0

Please sign in to comment.