{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/159","repository_url":"https://api.github.com/repos/fish-shell/fish-shell","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/159/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/159/events","html_url":"https://github.com/fish-shell/fish-shell/issues/159","id":5160274,"number":159,"title":"Cannot save multi-line output in a variable","user":{"login":"kballard","id":714,"avatar_url":"https://avatars.githubusercontent.com/u/714?v=3","gravatar_id":"","url":"https://api.github.com/users/kballard","html_url":"https://github.com/kballard","followers_url":"https://api.github.com/users/kballard/followers","following_url":"https://api.github.com/users/kballard/following{/other_user}","gists_url":"https://api.github.com/users/kballard/gists{/gist_id}","starred_url":"https://api.github.com/users/kballard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kballard/subscriptions","organizations_url":"https://api.github.com/users/kballard/orgs","repos_url":"https://api.github.com/users/kballard/repos","events_url":"https://api.github.com/users/kballard/events{/privacy}","received_events_url":"https://api.github.com/users/kballard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fish-shell/fish-shell/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"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 issues that are not targeted for an upcoming minor or major release. After a release, we will re-examine these issues and pull any in that we think are good targets; that is retarget them to the next minor (or major) release.\r\n\r\nIf you can provide a fix for an issue in this milestone, we'll generally accept it for the next release even if the issue is not targeted for 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":380,"closed_issues":0,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2016-08-24T21:47:46Z","due_on":null,"closed_at":null},"comments":60,"created_at":"2012-06-20T01:44:17Z","updated_at":"2016-08-25T20:37:23Z","closed_at":null,"body":"There seems to be no way to capture multi-line output in a shell variable. Any attempt to do so splits each line into a separate array element. In bash I'd simply put double-quotes around my `$()` invocation, but in fish you cannot quote a command substitution. This is rather unfortunate because it means I cannot capture multi-line output in a variable and send it back to a separate command without really weird contrivances, such as replacing all newlines with NUL when saving and reverting the process when emitting."},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/242530824","html_url":"https://github.com/fish-shell/fish-shell/issues/159#issuecomment-242530824","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/159","id":242530824,"user":{"login":"andrewrk","id":106511,"avatar_url":"https://avatars.githubusercontent.com/u/106511?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewrk","html_url":"https://github.com/andrewrk","followers_url":"https://api.github.com/users/andrewrk/followers","following_url":"https://api.github.com/users/andrewrk/following{/other_user}","gists_url":"https://api.github.com/users/andrewrk/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewrk/subscriptions","organizations_url":"https://api.github.com/users/andrewrk/orgs","repos_url":"https://api.github.com/users/andrewrk/repos","events_url":"https://api.github.com/users/andrewrk/events{/privacy}","received_events_url":"https://api.github.com/users/andrewrk/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T20:37:23Z","updated_at":"2016-08-25T20:37:23Z","body":"> I agree with @Soares to that we should add new commands/arguments instead of redesign. This subject can easily be solved without changing fish's core.\r\n\r\nI'm content with that solution as well. But just to play devil's advocate for the other solution, I'll say that I filed #3329 because fish's behavior was surprising. I expected `set -x foo (cat foo.txt)` to not mangle the contents of foo.txt by default. I tried putting the command in quotes but realized that without `$` or another escape character it wouldn't be possible. Then I tried bash, got the expected behavior, and concluded that fish had a bug. So this would be an argument from intuitiveness of how users would expect things to work."}}
{"actor":{"display_login":"andrewrk"}}