{"action":"created","issue":{"url":"https://api.github.com/repos/vim-jp/vital.vim/issues/397","repository_url":"https://api.github.com/repos/vim-jp/vital.vim","labels_url":"https://api.github.com/repos/vim-jp/vital.vim/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/vim-jp/vital.vim/issues/397/comments","events_url":"https://api.github.com/repos/vim-jp/vital.vim/issues/397/events","html_url":"https://github.com/vim-jp/vital.vim/pull/397","id":133550058,"number":397,"title":"System.Process: Add a new process module","user":{"login":"lambdalisue","id":546312,"avatar_url":"https://avatars.githubusercontent.com/u/546312?v=3","gravatar_id":"","url":"https://api.github.com/users/lambdalisue","html_url":"https://github.com/lambdalisue","followers_url":"https://api.github.com/users/lambdalisue/followers","following_url":"https://api.github.com/users/lambdalisue/following{/other_user}","gists_url":"https://api.github.com/users/lambdalisue/gists{/gist_id}","starred_url":"https://api.github.com/users/lambdalisue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambdalisue/subscriptions","organizations_url":"https://api.github.com/users/lambdalisue/orgs","repos_url":"https://api.github.com/users/lambdalisue/repos","events_url":"https://api.github.com/users/lambdalisue/events{/privacy}","received_events_url":"https://api.github.com/users/lambdalisue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vim-jp/vital.vim/labels/WIP","name":"WIP","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":54,"created_at":"2016-02-14T16:07:15Z","updated_at":"2016-03-20T07:38:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/vim-jp/vital.vim/pulls/397","html_url":"https://github.com/vim-jp/vital.vim/pull/397","diff_url":"https://github.com/vim-jp/vital.vim/pull/397.diff","patch_url":"https://github.com/vim-jp/vital.vim/pull/397.patch"},"body":"シェルなにそれ美味しいの？\r\n\r\n1. 内部的に何を使ったかにかかわらず共通インターフェースでの返り値が等しくなる\r\n2. 実行 OS が何かにかかわらず同じプログラムならば共通（ｒｙ返り値が等しくなる\r\n\r\nの二点が最も重要なコンセプト。既存の `Process.system()` との互換性はすべて捨てました。\r\n\r\n#### 使い方想定\r\n\r\n```vim\r\nlet s:Process = s:V.import('System.Process')\r\nlet result = s:Process.execute(['git', 'status'])\r\n\" 以下が共通インターフェース\r\n\" 同じプログラムを同じ args で起動したら同じ結果が帰る（ことが期待されている）\r\nAssert Equals(result.success, 1)\r\nAssert Equals(result.output, \"...\")\r\nAssert Equals(result.content, [\"...\", ...])\r\nAssert Equals(result.args, ['git', 'status']) \" 使った args\r\nAssert Equals(result.options, {...}) \"使ったオプション（デフォルト値とか含む）\r\n\" ここから下は内部実装依存（存在・値が保証されていない、主にデバッグ用途）\r\nAssert Equals(result.status, 0) \" vimproc#get_last_status() or v:shell_error\r\nAssert Equals(result.errormsg, \"\") \" vimproc 利用の場合だけ存在\r\nAssert Equals(result.cmdline, \"\") \" 実際に投げた cmdline\r\n```\r\n\r\n`vimproc#system()` > `system()` の順番でそれぞれが `options` の値をサポートしていくか調べて、サポートしていた場合はそれを利用する形に変更（`Web.HTTP` 方式）。\r\nなのでこの先 `job` サポートしたら普通に追加するだけでよさ気かな。"},"comment":{"url":"https://api.github.com/repos/vim-jp/vital.vim/issues/comments/198863980","html_url":"https://github.com/vim-jp/vital.vim/pull/397#issuecomment-198863980","issue_url":"https://api.github.com/repos/vim-jp/vital.vim/issues/397","id":198863980,"user":{"login":"lambdalisue","id":546312,"avatar_url":"https://avatars.githubusercontent.com/u/546312?v=3","gravatar_id":"","url":"https://api.github.com/users/lambdalisue","html_url":"https://github.com/lambdalisue","followers_url":"https://api.github.com/users/lambdalisue/followers","following_url":"https://api.github.com/users/lambdalisue/following{/other_user}","gists_url":"https://api.github.com/users/lambdalisue/gists{/gist_id}","starred_url":"https://api.github.com/users/lambdalisue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambdalisue/subscriptions","organizations_url":"https://api.github.com/users/lambdalisue/orgs","repos_url":"https://api.github.com/users/lambdalisue/repos","events_url":"https://api.github.com/users/lambdalisue/events{/privacy}","received_events_url":"https://api.github.com/users/lambdalisue/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T07:38:10Z","updated_at":"2016-03-20T07:38:10Z","body":"`splitargs` が `foo\\ bar\\ hoge` を分割しないか疑問だ、要確認"}}