{"action":"opened","issue":{"url":"https://api.github.com/repos/junegunn/fzf/issues/667","repository_url":"https://api.github.com/repos/junegunn/fzf","labels_url":"https://api.github.com/repos/junegunn/fzf/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/junegunn/fzf/issues/667/comments","events_url":"https://api.github.com/repos/junegunn/fzf/issues/667/events","html_url":"https://github.com/junegunn/fzf/issues/667","id":178311249,"number":667,"title":"fzf registers key binding that wasn't pressed","user":{"login":"laur89","id":4551018,"avatar_url":"https://avatars.githubusercontent.com/u/4551018?v=3","gravatar_id":"","url":"https://api.github.com/users/laur89","html_url":"https://github.com/laur89","followers_url":"https://api.github.com/users/laur89/followers","following_url":"https://api.github.com/users/laur89/following{/other_user}","gists_url":"https://api.github.com/users/laur89/gists{/gist_id}","starred_url":"https://api.github.com/users/laur89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laur89/subscriptions","organizations_url":"https://api.github.com/users/laur89/orgs","repos_url":"https://api.github.com/users/laur89/repos","events_url":"https://api.github.com/users/laur89/events{/privacy}","received_events_url":"https://api.github.com/users/laur89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-21T10:47:40Z","updated_at":"2016-09-21T10:47:40Z","closed_at":null,"body":"- Category\r\n    - Key bindings\r\n\r\n- OS\r\n    - Linux\r\n\r\n- Shell\r\n    - bash\r\n\r\nfzf ver *7fa5e6c*\r\n\r\nWhenever I select an item with fzf while multiple keybindings have been defined with `--expect`, the default (ie no binding) selection stops working, as fzf thinks that one of the bindings were used.\r\n\r\nModified one of the fzf examples. Run it in any git projects and simply press `return` instead of using the bindings. For me, `ctrl-m` is always registered.\r\n\r\n\r\n```\r\n    # fshow - git commit diff browser\r\n    # - enter shows the changes of the commit\r\n    # - ctrl-s lets you squash commits - select the *last* commit that should be squashed.\r\n    # - ctrl-m generates the jira commit message.\r\n    # - ctrl-c check the selected commit out.\r\n    fshow() {\r\n        local q k out sha\r\n\r\n        q=\"$*\"\r\n\r\n        while out=$(\r\n                git log --graph --color=always \\\r\n                    --format=\"%C(auto)%h%d %s %C(black)%C(bold)(%cr) %C(bold blue)<%an>%Creset\" |\r\n                    fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-z:toggle-sort --query=\"$q\" --print-query \\\r\n                        --expect=ctrl-s,ctrl-c,ctrl-m --exit-0); do\r\n            mapfile -t out <<< \"$out\"\r\n            q=\"${out[0]}\"\r\n            k=\"${out[1]}\"\r\n            sha=\"$(echo \"${out[-1]}\" | grep -Po '^[|\\ /\\\\*]+\\s*\\K[a-z0-9]+(?=.*$)')\" || { err \"unable to parse out commit sha\" \"$FUNCNAME\"; return 1; }\r\n            [[ \"$sha\" =~ [a-z0-9]{7} ]] || { err \"commit sha was [$sha]\" \"$FUNCNAME\"; return 1; }\r\n            echo \"k: $k\"  # debug\r\n\r\n            case \"$k\" in\r\n                'ctrl-s')\r\n                    if [[ \"$sha\" == \"$(git log -n 1 --pretty=format:%h HEAD)\" ]]; then\r\n                        report \"won't rebase on HEAD lol\" \"$FUNCNAME\" && sleep 1.5 && continue\r\n                    elif [[ -n \"$q\" ]]; then\r\n                        confirm \"\\nyou've filtered commits by query [$q]; still continue with rebase?\" || continue\r\n                    fi\r\n\r\n                    git rebase -i \"$sha\"~ && continue || return 1\r\n                    ;;\r\n                'ctrl-m')\r\n                    is_function generate_jira_commit_comment || { err \"can't generate commit msg as dependency is missing\" \"$FUNCNAME\"; return 1; }\r\n                    generate_jira_commit_comment \"$sha\"\r\n                    break\r\n                    ;;\r\n                'ctrl-c')\r\n                    git checkout \"$sha\"\r\n                    break\r\n                    ;;\r\n                *)\r\n                    git difftool --dir-diff \"$sha\"^ \"$sha\"\r\n                    ;;\r\n            esac\r\n        done\r\n    }\r\n```\r\n\r\n"}}
{"actor":{"display_login":"laur89"}}