{"action":"created","issue":{"url":"https://api.github.com/repos/calleerlandsson/pick/issues/177","repository_url":"https://api.github.com/repos/calleerlandsson/pick","labels_url":"https://api.github.com/repos/calleerlandsson/pick/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/calleerlandsson/pick/issues/177/comments","events_url":"https://api.github.com/repos/calleerlandsson/pick/issues/177/events","html_url":"https://github.com/calleerlandsson/pick/issues/177","id":193615192,"number":177,"title":"Pick not working with Bash's `shell-expand-line` binding","user":{"login":"teoljungberg","id":810650,"avatar_url":"https://avatars.githubusercontent.com/u/810650?v=3","gravatar_id":"","url":"https://api.github.com/users/teoljungberg","html_url":"https://github.com/teoljungberg","followers_url":"https://api.github.com/users/teoljungberg/followers","following_url":"https://api.github.com/users/teoljungberg/following{/other_user}","gists_url":"https://api.github.com/users/teoljungberg/gists{/gist_id}","starred_url":"https://api.github.com/users/teoljungberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teoljungberg/subscriptions","organizations_url":"https://api.github.com/users/teoljungberg/orgs","repos_url":"https://api.github.com/users/teoljungberg/repos","events_url":"https://api.github.com/users/teoljungberg/events{/privacy}","received_events_url":"https://api.github.com/users/teoljungberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-05T21:29:31Z","updated_at":"2016-12-07T15:32:54Z","closed_at":null,"body":"The option `shell-expand-line` in bash expands the line with a subshell present into the result of that subshell.\r\n\r\nExample:\r\n\r\n```sh\r\n% echo $(printf \"%f\" 3.5)\r\n# -----------------------^\r\n# Enter keypress: \\e\\C-e\r\n% echo 3.500000\r\n# -------------^\r\n```\r\n\r\nThe use-case for `pick(1)` would be to perform an action on a file that was selected from pick itself.\r\n\r\ni.e\r\n\r\n```sh\r\n% cat $(git ls-files | pick)\r\n# --------------------------^\r\n# Enter keypress: \\e\\C-e\r\n```\r\n\r\nThe problem is that neither `| pick` or `| pick -X` can perform an enter key-press to (in lack of a better word) \"complete\" the subshell. This has been tested with `\"$()\"` aswell as double back-tricks.\r\nStrangely though, `C-j` works in place for the `CR`.\r\n\r\nThis works in `zsh` using their `expand-or-complete` command (mapped to `C-i`) with both `CR` and `C-j` to \"complete\" the subshell."},"comment":{"url":"https://api.github.com/repos/calleerlandsson/pick/issues/comments/265478451","html_url":"https://github.com/calleerlandsson/pick/issues/177#issuecomment-265478451","issue_url":"https://api.github.com/repos/calleerlandsson/pick/issues/177","id":265478451,"user":{"login":"mptre","id":43914,"avatar_url":"https://avatars.githubusercontent.com/u/43914?v=3","gravatar_id":"","url":"https://api.github.com/users/mptre","html_url":"https://github.com/mptre","followers_url":"https://api.github.com/users/mptre/followers","following_url":"https://api.github.com/users/mptre/following{/other_user}","gists_url":"https://api.github.com/users/mptre/gists{/gist_id}","starred_url":"https://api.github.com/users/mptre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mptre/subscriptions","organizations_url":"https://api.github.com/users/mptre/orgs","repos_url":"https://api.github.com/users/mptre/repos","events_url":"https://api.github.com/users/mptre/events{/privacy}","received_events_url":"https://api.github.com/users/mptre/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T15:32:54Z","updated_at":"2016-12-07T15:32:54Z","body":"Done. Could the issue be closed in favor of the PR?"}}
{"actor":{"display_login":"mptre"}}