{"action":"closed","number":4,"pull_request":{"url":"https://api.github.com/repos/p8952/bocker/pulls/4","id":40543028,"html_url":"https://github.com/p8952/bocker/pull/4","diff_url":"https://github.com/p8952/bocker/pull/4.diff","patch_url":"https://github.com/p8952/bocker/pull/4.patch","issue_url":"https://api.github.com/repos/p8952/bocker/issues/4","number":4,"state":"closed","locked":false,"title":"Shorter case statement","user":{"login":"TomiBelan","id":1022278,"avatar_url":"https://avatars.githubusercontent.com/u/1022278?v=3","gravatar_id":"","url":"https://api.github.com/users/TomiBelan","html_url":"https://github.com/TomiBelan","followers_url":"https://api.github.com/users/TomiBelan/followers","following_url":"https://api.github.com/users/TomiBelan/following{/other_user}","gists_url":"https://api.github.com/users/TomiBelan/gists{/gist_id}","starred_url":"https://api.github.com/users/TomiBelan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomiBelan/subscriptions","organizations_url":"https://api.github.com/users/TomiBelan/orgs","repos_url":"https://api.github.com/users/TomiBelan/repos","events_url":"https://api.github.com/users/TomiBelan/events{/privacy}","received_events_url":"https://api.github.com/users/TomiBelan/received_events","type":"User","site_admin":false},"body":"Just for fun: By using `bocker_$1 \"${@:2}\"`, you can dynamically call different bash functions. This makes the case statement much shorter, saving 9 lines. (Unfortunately, this is incompatible with #1.)\r\n\r\nNote: I confess that I barely tested this. Please make sure I didn't break anything (especially run).","created_at":"2015-07-22T08:53:51Z","updated_at":"2015-07-23T17:05:29Z","closed_at":"2015-07-23T17:05:29Z","merged_at":"2015-07-23T17:05:29Z","merge_commit_sha":"38563eb51539da945b009928742efded32d18ee8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/p8952/bocker/pulls/4/commits","review_comments_url":"https://api.github.com/repos/p8952/bocker/pulls/4/comments","review_comment_url":"https://api.github.com/repos/p8952/bocker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/p8952/bocker/issues/4/comments","statuses_url":"https://api.github.com/repos/p8952/bocker/statuses/c3efade5c48ee6f552e020e13339c1c64ea24d1e","head":{"label":"TomiBelan:master","ref":"master","sha":"c3efade5c48ee6f552e020e13339c1c64ea24d1e","user":{"login":"TomiBelan","id":1022278,"avatar_url":"https://avatars.githubusercontent.com/u/1022278?v=3","gravatar_id":"","url":"https://api.github.com/users/TomiBelan","html_url":"https://github.com/TomiBelan","followers_url":"https://api.github.com/users/TomiBelan/followers","following_url":"https://api.github.com/users/TomiBelan/following{/other_user}","gists_url":"https://api.github.com/users/TomiBelan/gists{/gist_id}","starred_url":"https://api.github.com/users/TomiBelan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomiBelan/subscriptions","organizations_url":"https://api.github.com/users/TomiBelan/orgs","repos_url":"https://api.github.com/users/TomiBelan/repos","events_url":"https://api.github.com/users/TomiBelan/events{/privacy}","received_events_url":"https://api.github.com/users/TomiBelan/received_events","type":"User","site_admin":false},"repo":{"id":39494932,"name":"bocker","full_name":"TomiBelan/bocker","owner":{"login":"TomiBelan","id":1022278,"avatar_url":"https://avatars.githubusercontent.com/u/1022278?v=3","gravatar_id":"","url":"https://api.github.com/users/TomiBelan","html_url":"https://github.com/TomiBelan","followers_url":"https://api.github.com/users/TomiBelan/followers","following_url":"https://api.github.com/users/TomiBelan/following{/other_user}","gists_url":"https://api.github.com/users/TomiBelan/gists{/gist_id}","starred_url":"https://api.github.com/users/TomiBelan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomiBelan/subscriptions","organizations_url":"https://api.github.com/users/TomiBelan/orgs","repos_url":"https://api.github.com/users/TomiBelan/repos","events_url":"https://api.github.com/users/TomiBelan/events{/privacy}","received_events_url":"https://api.github.com/users/TomiBelan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomiBelan/bocker","description":"Docker implemented in 100 lines of bash","fork":true,"url":"https://api.github.com/repos/TomiBelan/bocker","forks_url":"https://api.github.com/repos/TomiBelan/bocker/forks","keys_url":"https://api.github.com/repos/TomiBelan/bocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomiBelan/bocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomiBelan/bocker/teams","hooks_url":"https://api.github.com/repos/TomiBelan/bocker/hooks","issue_events_url":"https://api.github.com/repos/TomiBelan/bocker/issues/events{/number}","events_url":"https://api.github.com/repos/TomiBelan/bocker/events","assignees_url":"https://api.github.com/repos/TomiBelan/bocker/assignees{/user}","branches_url":"https://api.github.com/repos/TomiBelan/bocker/branches{/branch}","tags_url":"https://api.github.com/repos/TomiBelan/bocker/tags","blobs_url":"https://api.github.com/repos/TomiBelan/bocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomiBelan/bocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomiBelan/bocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomiBelan/bocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomiBelan/bocker/statuses/{sha}","languages_url":"https://api.github.com/repos/TomiBelan/bocker/languages","stargazers_url":"https://api.github.com/repos/TomiBelan/bocker/stargazers","contributors_url":"https://api.github.com/repos/TomiBelan/bocker/contributors","subscribers_url":"https://api.github.com/repos/TomiBelan/bocker/subscribers","subscription_url":"https://api.github.com/repos/TomiBelan/bocker/subscription","commits_url":"https://api.github.com/repos/TomiBelan/bocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomiBelan/bocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomiBelan/bocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomiBelan/bocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomiBelan/bocker/contents/{+path}","compare_url":"https://api.github.com/repos/TomiBelan/bocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomiBelan/bocker/merges","archive_url":"https://api.github.com/repos/TomiBelan/bocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomiBelan/bocker/downloads","issues_url":"https://api.github.com/repos/TomiBelan/bocker/issues{/number}","pulls_url":"https://api.github.com/repos/TomiBelan/bocker/pulls{/number}","milestones_url":"https://api.github.com/repos/TomiBelan/bocker/milestones{/number}","notifications_url":"https://api.github.com/repos/TomiBelan/bocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomiBelan/bocker/labels{/name}","releases_url":"https://api.github.com/repos/TomiBelan/bocker/releases{/id}","created_at":"2015-07-22T08:34:48Z","updated_at":"2015-07-22T08:34:48Z","pushed_at":"2015-07-23T14:56:32Z","git_url":"git://github.com/TomiBelan/bocker.git","ssh_url":"git@github.com:TomiBelan/bocker.git","clone_url":"https://github.com/TomiBelan/bocker.git","svn_url":"https://github.com/TomiBelan/bocker","homepage":"https://www.p8952.info/projects.html","size":179,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"p8952:master","ref":"master","sha":"39ebf616c40fcc32c8e46614efb522236b7670b0","user":{"login":"p8952","id":2962587,"avatar_url":"https://avatars.githubusercontent.com/u/2962587?v=3","gravatar_id":"","url":"https://api.github.com/users/p8952","html_url":"https://github.com/p8952","followers_url":"https://api.github.com/users/p8952/followers","following_url":"https://api.github.com/users/p8952/following{/other_user}","gists_url":"https://api.github.com/users/p8952/gists{/gist_id}","starred_url":"https://api.github.com/users/p8952/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p8952/subscriptions","organizations_url":"https://api.github.com/users/p8952/orgs","repos_url":"https://api.github.com/users/p8952/repos","events_url":"https://api.github.com/users/p8952/events{/privacy}","received_events_url":"https://api.github.com/users/p8952/received_events","type":"User","site_admin":false},"repo":{"id":39103837,"name":"bocker","full_name":"p8952/bocker","owner":{"login":"p8952","id":2962587,"avatar_url":"https://avatars.githubusercontent.com/u/2962587?v=3","gravatar_id":"","url":"https://api.github.com/users/p8952","html_url":"https://github.com/p8952","followers_url":"https://api.github.com/users/p8952/followers","following_url":"https://api.github.com/users/p8952/following{/other_user}","gists_url":"https://api.github.com/users/p8952/gists{/gist_id}","starred_url":"https://api.github.com/users/p8952/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p8952/subscriptions","organizations_url":"https://api.github.com/users/p8952/orgs","repos_url":"https://api.github.com/users/p8952/repos","events_url":"https://api.github.com/users/p8952/events{/privacy}","received_events_url":"https://api.github.com/users/p8952/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/p8952/bocker","description":"Docker implemented in 100 lines of bash","fork":false,"url":"https://api.github.com/repos/p8952/bocker","forks_url":"https://api.github.com/repos/p8952/bocker/forks","keys_url":"https://api.github.com/repos/p8952/bocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/p8952/bocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/p8952/bocker/teams","hooks_url":"https://api.github.com/repos/p8952/bocker/hooks","issue_events_url":"https://api.github.com/repos/p8952/bocker/issues/events{/number}","events_url":"https://api.github.com/repos/p8952/bocker/events","assignees_url":"https://api.github.com/repos/p8952/bocker/assignees{/user}","branches_url":"https://api.github.com/repos/p8952/bocker/branches{/branch}","tags_url":"https://api.github.com/repos/p8952/bocker/tags","blobs_url":"https://api.github.com/repos/p8952/bocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/p8952/bocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/p8952/bocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/p8952/bocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/p8952/bocker/statuses/{sha}","languages_url":"https://api.github.com/repos/p8952/bocker/languages","stargazers_url":"https://api.github.com/repos/p8952/bocker/stargazers","contributors_url":"https://api.github.com/repos/p8952/bocker/contributors","subscribers_url":"https://api.github.com/repos/p8952/bocker/subscribers","subscription_url":"https://api.github.com/repos/p8952/bocker/subscription","commits_url":"https://api.github.com/repos/p8952/bocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/p8952/bocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/p8952/bocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/p8952/bocker/issues/comments{/number}","contents_url":"https://api.github.com/repos/p8952/bocker/contents/{+path}","compare_url":"https://api.github.com/repos/p8952/bocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/p8952/bocker/merges","archive_url":"https://api.github.com/repos/p8952/bocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/p8952/bocker/downloads","issues_url":"https://api.github.com/repos/p8952/bocker/issues{/number}","pulls_url":"https://api.github.com/repos/p8952/bocker/pulls{/number}","milestones_url":"https://api.github.com/repos/p8952/bocker/milestones{/number}","notifications_url":"https://api.github.com/repos/p8952/bocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/p8952/bocker/labels{/name}","releases_url":"https://api.github.com/repos/p8952/bocker/releases{/id}","created_at":"2015-07-14T22:33:49Z","updated_at":"2015-07-23T17:03:54Z","pushed_at":"2015-07-23T17:05:29Z","git_url":"git://github.com/p8952/bocker.git","ssh_url":"git@github.com:p8952/bocker.git","clone_url":"https://github.com/p8952/bocker.git","svn_url":"https://github.com/p8952/bocker","homepage":"https://www.p8952.info/projects.html","size":179,"stargazers_count":1825,"watchers_count":1825,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":4,"forks":79,"open_issues":4,"watchers":1825,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/p8952/bocker/pulls/4"},"html":{"href":"https://github.com/p8952/bocker/pull/4"},"issue":{"href":"https://api.github.com/repos/p8952/bocker/issues/4"},"comments":{"href":"https://api.github.com/repos/p8952/bocker/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/p8952/bocker/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/p8952/bocker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/p8952/bocker/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/p8952/bocker/statuses/c3efade5c48ee6f552e020e13339c1c64ea24d1e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"p8952","id":2962587,"avatar_url":"https://avatars.githubusercontent.com/u/2962587?v=3","gravatar_id":"","url":"https://api.github.com/users/p8952","html_url":"https://github.com/p8952","followers_url":"https://api.github.com/users/p8952/followers","following_url":"https://api.github.com/users/p8952/following{/other_user}","gists_url":"https://api.github.com/users/p8952/gists{/gist_id}","starred_url":"https://api.github.com/users/p8952/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p8952/subscriptions","organizations_url":"https://api.github.com/users/p8952/orgs","repos_url":"https://api.github.com/users/p8952/repos","events_url":"https://api.github.com/users/p8952/events{/privacy}","received_events_url":"https://api.github.com/users/p8952/received_events","type":"User","site_admin":false},"comments":9,"review_comments":0,"commits":1,"additions":19,"deletions":28,"changed_files":1}}