{"action":"created","issue":{"url":"https://api.github.com/repos/knu/z/issues/4","labels_url":"https://api.github.com/repos/knu/z/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/knu/z/issues/4/comments","events_url":"https://api.github.com/repos/knu/z/issues/4/events","html_url":"https://github.com/knu/z/pull/4","id":121987628,"number":4,"title":"Don't automatically start selection","user":{"login":"NigoroJr","id":1430364,"avatar_url":"https://avatars.githubusercontent.com/u/1430364?v=3","gravatar_id":"","url":"https://api.github.com/users/NigoroJr","html_url":"https://github.com/NigoroJr","followers_url":"https://api.github.com/users/NigoroJr/followers","following_url":"https://api.github.com/users/NigoroJr/following{/other_user}","gists_url":"https://api.github.com/users/NigoroJr/gists{/gist_id}","starred_url":"https://api.github.com/users/NigoroJr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NigoroJr/subscriptions","organizations_url":"https://api.github.com/users/NigoroJr/orgs","repos_url":"https://api.github.com/users/NigoroJr/repos","events_url":"https://api.github.com/users/NigoroJr/events{/privacy}","received_events_url":"https://api.github.com/users/NigoroJr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-14T07:13:27Z","updated_at":"2015-12-22T22:02:28Z","closed_at":"2015-12-14T10:08:19Z","pull_request":{"url":"https://api.github.com/repos/knu/z/pulls/4","html_url":"https://github.com/knu/z/pull/4","diff_url":"https://github.com/knu/z/pull/4.diff","patch_url":"https://github.com/knu/z/pull/4.patch"},"body":"Hello, I have `zstyle ':completion:*:default' menu select=1` set in my `.zshrc`, which allows me to start selecting the candidates at will rather than the comp system automatically starting it. Having `compstate[insert]=menu` in `z.sh` seemed to break this and candidates were being selected automatically, so I'm making this pull request as an attempt to fix it. However, I wasn't sure whether...\r\n\r\n1. I am missing something and there is a way to preserve the behavior of `zstyle ':completion:*:default' menu select=1` without this pull request\r\n2. I should update the README also. I didn't change the README because the plugin can be used in bash also, and didn't seem to make much sense to talk about zsh-specific features. I will certainly update it if that's better.\r\n\r\nCommit description:\r\n\r\nThis change is made because the selection cannot be disabled even with:\r\n\r\n    zstyle ':completion:*:z' menu false\r\n\r\nOn the other hand, if users want to preserve the old automatic selection\r\nbehavior,\r\n\r\n    zstyle ':completion:*:z' menu yes\r\n\r\ncan be added to the .zshrc and have more flexible customization."},"comment":{"url":"https://api.github.com/repos/knu/z/issues/comments/166742171","html_url":"https://github.com/knu/z/pull/4#issuecomment-166742171","issue_url":"https://api.github.com/repos/knu/z/issues/4","id":166742171,"user":{"login":"NigoroJr","id":1430364,"avatar_url":"https://avatars.githubusercontent.com/u/1430364?v=3","gravatar_id":"","url":"https://api.github.com/users/NigoroJr","html_url":"https://github.com/NigoroJr","followers_url":"https://api.github.com/users/NigoroJr/followers","following_url":"https://api.github.com/users/NigoroJr/following{/other_user}","gists_url":"https://api.github.com/users/NigoroJr/gists{/gist_id}","starred_url":"https://api.github.com/users/NigoroJr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NigoroJr/subscriptions","organizations_url":"https://api.github.com/users/NigoroJr/orgs","repos_url":"https://api.github.com/users/NigoroJr/repos","events_url":"https://api.github.com/users/NigoroJr/events{/privacy}","received_events_url":"https://api.github.com/users/NigoroJr/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T22:02:28Z","updated_at":"2015-12-22T22:02:28Z","body":"Seems like the `-U` flag is the culprit. Please try with this patch.\r\n\r\n```diff\r\ndiff --git a/src/z.interactive.zsh b/src/z.interactive.zsh\r\nindex 58374d8..356e283 100644\r\n--- a/src/z.interactive.zsh\r\n+++ b/src/z.interactive.zsh\r\n@@ -48,8 +48,7 @@ _z_stack () {\r\n    fi\r\n   done\r\n   (( ${#qlist} == 0 )) && return 1\r\n-  compadd -d qlist -U -Q \"$@\" -- \"${qlist[@]}\"\r\n-  compstate[insert]=menu\r\n+  compadd -d qlist -Q \"$@\" -- \"${qlist[@]}\"\r\n  fi\r\n }\r\n \r\ndiff --git a/z.sh b/z.sh\r\nindex 4ea07ba..f4a2bc5 100644\r\n--- a/z.sh\r\n+++ b/z.sh\r\n@@ -434,8 +434,7 @@ if [[ \"${ZSH_VERSION-0.0}\" != [0-3].* ]]; then\r\n     fi\r\n    done\r\n    (( ${#qlist} == 0 )) && return 1\r\n-   compadd -d qlist -U -Q \"$@\" -- \"${qlist[@]}\"\r\n-   compstate[insert]=menu\r\n+   compadd -d qlist -Q \"$@\" -- \"${qlist[@]}\"\r\n   fi\r\n  }\r\n ```\r\n\r\nFrom `man zshcompwid`.\r\n```text\r\n-U     If  this  flag  is given, all words given will be accepted and no\r\n       matching will be done by the completion code.  Normally  this  is\r\n       used in functions that do the matching themselves.\r\n```"}}