{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/1819","repository_url":"https://api.github.com/repos/aws/aws-cli","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/1819/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1819/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/1819/events","html_url":"https://github.com/aws/aws-cli/issues/1819","id":137510449,"number":1819,"title":"complete function is called before loaded in aws_zsh_completer.sh","user":{"login":"kissge","id":4177010,"avatar_url":"https://avatars.githubusercontent.com/u/4177010?v=3","gravatar_id":"","url":"https://api.github.com/users/kissge","html_url":"https://github.com/kissge","followers_url":"https://api.github.com/users/kissge/followers","following_url":"https://api.github.com/users/kissge/following{/other_user}","gists_url":"https://api.github.com/users/kissge/gists{/gist_id}","starred_url":"https://api.github.com/users/kissge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kissge/subscriptions","organizations_url":"https://api.github.com/users/kissge/orgs","repos_url":"https://api.github.com/users/kissge/repos","events_url":"https://api.github.com/users/kissge/events{/privacy}","received_events_url":"https://api.github.com/users/kissge/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-cli/labels/investigating","name":"investigating","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-01T08:45:53Z","updated_at":"2016-03-04T20:57:21Z","closed_at":null,"body":"I am running Amazon Linux AMI release 2015.09 on an EC2 instance, and the login shell is zsh 5.0.2 (x86_64-redhat-linux-gnu).\r\nEvery time I login to the machine via ssh, I get this error message:\r\n\r\n    complete:13: command not found: compdef\r\n\r\nThis error is caused from [the last line of aws_zsh_completer.sh](https://github.com/aws/aws-cli/blob/a2498c41b5bb7bbc189d3251081df1971597a510/bin/aws_zsh_completer.sh#L63), and seems related to [this commit](https://github.com/aws/aws-cli/commit/a2498c41b5bb7bbc189d3251081df1971597a510).\r\n\r\nI didn't find any duplicate issues here.\r\nAny plans for fixing?"},"comment":{"url":"https://api.github.com/repos/aws/aws-cli/issues/comments/192464642","html_url":"https://github.com/aws/aws-cli/issues/1819#issuecomment-192464642","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/1819","id":192464642,"user":{"login":"mcornella","id":1441704,"avatar_url":"https://avatars.githubusercontent.com/u/1441704?v=3","gravatar_id":"","url":"https://api.github.com/users/mcornella","html_url":"https://github.com/mcornella","followers_url":"https://api.github.com/users/mcornella/followers","following_url":"https://api.github.com/users/mcornella/following{/other_user}","gists_url":"https://api.github.com/users/mcornella/gists{/gist_id}","starred_url":"https://api.github.com/users/mcornella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcornella/subscriptions","organizations_url":"https://api.github.com/users/mcornella/orgs","repos_url":"https://api.github.com/users/mcornella/repos","events_url":"https://api.github.com/users/mcornella/events{/privacy}","received_events_url":"https://api.github.com/users/mcornella/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T20:57:20Z","updated_at":"2016-03-04T20:57:20Z","body":"Oh nice, we diagnosed this bug in [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh) some weeks ago. Here's the full explanation: https://github.com/robbyrussell/oh-my-zsh/issues/4771#issuecomment-181122099\r\n\r\n**TL;DR:** the `/etc/profile.d/aws-cli.sh` file sources the aws-cli completion without having run `compinit` first.\r\n\r\nLet me know if I can help provide a solution to this.\r\nCheers!"}}