{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2114","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2114/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2114/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2114/events","html_url":"https://github.com/fish-shell/fish-shell/issues/2114","id":83647113,"number":2114,"title":"Subsequent binds not executed if first command leaves fish","user":{"login":"jonhoo","id":176295,"avatar_url":"https://avatars.githubusercontent.com/u/176295?v=3","gravatar_id":"","url":"https://api.github.com/users/jonhoo","html_url":"https://github.com/jonhoo","followers_url":"https://api.github.com/users/jonhoo/followers","following_url":"https://api.github.com/users/jonhoo/following{/other_user}","gists_url":"https://api.github.com/users/jonhoo/gists{/gist_id}","starred_url":"https://api.github.com/users/jonhoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonhoo/subscriptions","organizations_url":"https://api.github.com/users/jonhoo/orgs","repos_url":"https://api.github.com/users/jonhoo/repos","events_url":"https://api.github.com/users/jonhoo/events{/privacy}","received_events_url":"https://api.github.com/users/jonhoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4","html_url":"https://github.com/fish-shell/fish-shell/milestones/fish-future","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4/labels","id":130257,"number":4,"title":"fish-future","description":"These are bugs that are not targeted for an upcoming release. After a release, we will reexamine these bugs and pull any in that we think are good targets.\r\n\r\nIf you can provide a fix for a bug in this milestone, we'll generally accept it for the next release even if the bug is not in the release.","creator":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"open_issues":442,"closed_issues":88,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2015-07-16T15:27:50Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-06-01T19:05:11Z","updated_at":"2015-07-16T17:44:26Z","closed_at":null,"body":"With this binding in `config.fish`:\r\n```fish\r\nfunction fish_user_key_bindings\r\n    bind \\cr 'fg >/dev/null ^/dev/null'\r\nend\r\n```\r\n\r\nDo the following commands in a new shell:\r\n```\r\n$ vim\r\n# <press Ctrl+Z inside vim to send to background>\r\n# <press Ctrl+r, vim (correctly) restored>\r\n# <press Ctrl+Z again>\r\n# <press Ctrl+r, ^R is printed to terminal, vim is not restored>\r\n```\r\n\r\nIn particular, no key bindings work at this point until enter or `^J` is pressed.\r\n"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/122032543","html_url":"https://github.com/fish-shell/fish-shell/issues/2114#issuecomment-122032543","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2114","id":122032543,"user":{"login":"faho","id":5185367,"avatar_url":"https://avatars.githubusercontent.com/u/5185367?v=3","gravatar_id":"","url":"https://api.github.com/users/faho","html_url":"https://github.com/faho","followers_url":"https://api.github.com/users/faho/followers","following_url":"https://api.github.com/users/faho/following{/other_user}","gists_url":"https://api.github.com/users/faho/gists{/gist_id}","starred_url":"https://api.github.com/users/faho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faho/subscriptions","organizations_url":"https://api.github.com/users/faho/orgs","repos_url":"https://api.github.com/users/faho/repos","events_url":"https://api.github.com/users/faho/events{/privacy}","received_events_url":"https://api.github.com/users/faho/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T17:44:26Z","updated_at":"2015-07-16T17:44:26Z","body":"I can reproduce this.\r\n\r\nSome more info:\r\n\r\n- It's not just \\cr, it appears to be binding `fg` that's causing the issue\r\n- It's not just vim, `less` also works\r\n- Running `fg` manually works\r\n- It's also an issue if you _don't_ bg again but quit\r\n- Syntax highlighting and suggestion are also non-functional, only entering basic text seems to work\r\n- Entering commands works, but echos them again on the next line, highlighted\r\n\r\nIn other words:\r\n\r\n    $ touch halibut\r\n    $ less halibut\r\n    <\\cz>\r\n    <\\cr>\r\n    <q>\r\n    $ echo barracuda # in white\r\n    echo barracuda\r\n    barracuda # dundundundundundundundundun dun dun"}}