Skip to content

Commit

Permalink
Enable environment completion as experimental support.
Browse files Browse the repository at this point in the history
  • Loading branch information
go committed Mar 24, 2017
1 parent d657676 commit fe8fc61
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions _rancher
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@ __rancher_environments() {
[[ $filter != "none" ]] && args=("-f $filter")

### TODO: Currently not supported Account base API
if [[ -z "${(M)RANCHER_URL:#*project*}" ]] then
return 0
else
lines=(${(f)"$(_call_program commands rancher environment ls)"})
fi
### Enabled environment completion as experimental
#if [[ -z "${(M)RANCHER_URL:#*project*}" ]] then
# return 0
#else
# lines=(${(f)"$(_call_program commands rancher environment ls)"})
#fi

lines=(${(f)"$(_call_program commands rancher environment ls)"})

# Parse header line to find columns
local i=1 j=1 k header=${lines[1]}
declare -A begin end
Expand Down

0 comments on commit fe8fc61

Please sign in to comment.