{"action":"created","comment":{"url":"https://api.github.com/repos/AladW/aurutils/pulls/comments/176952950","pull_request_review_id":106742528,"id":176952950,"diff_hunk":"@@ -9,63 +9,51 @@ query_type=search\n search_by=name-desc\n sort_key=Name\n \n-json_short() {\n-    local Name Version NumVotes Maintainer OutOfDate Description\n+parse_short() {\n+    jq -r --arg key \"$1\" '[.results[]] | sort_by(.[$key])[] | [\n+        .Name         // \"-\",\n+        .Version      // \"-\",\n+        .NumVotes     // \"-\",\n+        .Maintainer   // \"-\",\n+        .OutOfDate    // \"-\",\n+        .Description  // \"-\"\n+        ] | @tsv'\n+}\n \n-    jq -r --arg key \"$1\" '[.results[]] | sort_by(.[$key])[] | .Name,\n-        .Version,\n-        .NumVotes,\n-        .Maintainer // \"\",\n-        .OutOfDate  // \"\",\n-        .Description' | while\n-    {\n-        read -r Name\n-        read -r Version\n-        read -r NumVotes\n-        read -r Maintainer\n-        read -r OutOfDate\n-        read -r Description\n-    }; do\n-        [[ \"$OutOfDate\"  ]] && OutOfDate=\"(Out-of-date: $(date -d @\"$OutOfDate\" '+%d %B %Y'))\"\n-        [[ \"$Maintainer\" ]] && unset Maintainer\n+output_short() {\n+    local Name Version NumVotes Maintainer OutOfDate Description\n \n+    while IFS=$'\\t' read -r Name Version NumVotes Maintainer OutOfDate Description ; do\n+        [[ \"$OutOfDate\"  == \"-\" ]] && OutOfDate=\"\"  || OutOfDate=\"(Out-of-date: $(date -d @\"$OutOfDate\" '+%d %B %Y'))\"\n+        [[ \"$Maintainer\" != \"-\" ]] && Maintainer=\"\" || Maintainer=\"(Orphaned)\"\n         printf \"${BLUE}aur/${ALL_OFF}${BOLD}%s ${GREEN}%s ${ALL_OFF}(%s) ${RED}%s %s${ALL_OFF}\\\\n    %s\\\\n\" \\\n-               \"$Name\" \"$Version\" \"$NumVotes\" \"${Maintainer+(Orphaned)}\" \"$OutOfDate\" \"$Description\"\n+               \"$Name\" \"$Version\" \"$NumVotes\" \"$Maintainer\" \"$OutOfDate\" \"$Description\"\n     done\n }\n \n-json_long() {\n+parse_long() {\n+    jq -r --arg key \"$1\" '[.results[]] | sort_by(.[$key])[] | [","path":"lib/aur-search","position":null,"original_position":47,"commit_id":"cc090b21949cfa8ba803be241225ceb9cb564d1d","original_commit_id":"985453aac6d517bf97e0a78899a5caa60e384cf4","user":{"login":"maximbaz","id":1177900,"avatar_url":"https://avatars2.githubusercontent.com/u/1177900?v=4","gravatar_id":"","url":"https://api.github.com/users/maximbaz","html_url":"https://github.com/maximbaz","followers_url":"https://api.github.com/users/maximbaz/followers","following_url":"https://api.github.com/users/maximbaz/following{/other_user}","gists_url":"https://api.github.com/users/maximbaz/gists{/gist_id}","starred_url":"https://api.github.com/users/maximbaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximbaz/subscriptions","organizations_url":"https://api.github.com/users/maximbaz/orgs","repos_url":"https://api.github.com/users/maximbaz/repos","events_url":"https://api.github.com/users/maximbaz/events{/privacy}","received_events_url":"https://api.github.com/users/maximbaz/received_events","type":"User","site_admin":false},"body":"Removed default values from the field, this should be done.","created_at":"2018-03-25T20:31:12Z","updated_at":"2018-03-25T20:31:12Z","html_url":"https://github.com/AladW/aurutils/pull/328#discussion_r176952950","pull_request_url":"https://api.github.com/repos/AladW/aurutils/pulls/328","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/AladW/aurutils/pulls/comments/176952950"},"html":{"href":"https://github.com/AladW/aurutils/pull/328#discussion_r176952950"},"pull_request":{"href":"https://api.github.com/repos/AladW/aurutils/pulls/328"}},"in_reply_to_id":176923394},"pull_request":{"url":"https://api.github.com/repos/AladW/aurutils/pulls/328","id":176356840,"html_url":"https://github.com/AladW/aurutils/pull/328","diff_url":"https://github.com/AladW/aurutils/pull/328.diff","patch_url":"https://github.com/AladW/aurutils/pull/328.patch","issue_url":"https://api.github.com/repos/AladW/aurutils/issues/328","number":328,"state":"open","locked":false,"title":"aur-search: use intersection of results for multiple terms","user":{"login":"maximbaz","id":1177900,"avatar_url":"https://avatars2.githubusercontent.com/u/1177900?v=4","gravatar_id":"","url":"https://api.github.com/users/maximbaz","html_url":"https://github.com/maximbaz","followers_url":"https://api.github.com/users/maximbaz/followers","following_url":"https://api.github.com/users/maximbaz/following{/other_user}","gists_url":"https://api.github.com/users/maximbaz/gists{/gist_id}","starred_url":"https://api.github.com/users/maximbaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximbaz/subscriptions","organizations_url":"https://api.github.com/users/maximbaz/orgs","repos_url":"https://api.github.com/users/maximbaz/repos","events_url":"https://api.github.com/users/maximbaz/events{/privacy}","received_events_url":"https://api.github.com/users/maximbaz/received_events","type":"User","site_admin":false},"body":"This is a prototype for #313.\r\n\r\nNow the behavior of `aur search` matches `pacman -Ss`, when multiple search terms are provided, only packages that match ALL of the terms are returned.\r\n\r\nI didn't create an option to keep the old behavior because I'm not sure if it is actually needed.\r\n\r\nFeedback is welcome 🙂\r\n\r\n![image](https://user-images.githubusercontent.com/1177900/37689498-97a7edb2-2ca5-11e8-9f28-2ac3f2f7b72c.png)\r\n","created_at":"2018-03-21T00:18:57Z","updated_at":"2018-03-25T20:31:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7681dd2de68e5b95a1200b1cec3ab77659dda88","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AladW/aurutils/pulls/328/commits","review_comments_url":"https://api.github.com/repos/AladW/aurutils/pulls/328/comments","review_comment_url":"https://api.github.com/repos/AladW/aurutils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AladW/aurutils/issues/328/comments","statuses_url":"https://api.github.com/repos/AladW/aurutils/statuses/cc090b21949cfa8ba803be241225ceb9cb564d1d","head":{"label":"maximbaz:313-aur-search-intersection","ref":"313-aur-search-intersection","sha":"cc090b21949cfa8ba803be241225ceb9cb564d1d","user":{"login":"maximbaz","id":1177900,"avatar_url":"https://avatars2.githubusercontent.com/u/1177900?v=4","gravatar_id":"","url":"https://api.github.com/users/maximbaz","html_url":"https://github.com/maximbaz","followers_url":"https://api.github.com/users/maximbaz/followers","following_url":"https://api.github.com/users/maximbaz/following{/other_user}","gists_url":"https://api.github.com/users/maximbaz/gists{/gist_id}","starred_url":"https://api.github.com/users/maximbaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximbaz/subscriptions","organizations_url":"https://api.github.com/users/maximbaz/orgs","repos_url":"https://api.github.com/users/maximbaz/repos","events_url":"https://api.github.com/users/maximbaz/events{/privacy}","received_events_url":"https://api.github.com/users/maximbaz/received_events","type":"User","site_admin":false},"repo":{"id":118986671,"name":"aurutils","full_name":"maximbaz/aurutils","owner":{"login":"maximbaz","id":1177900,"avatar_url":"https://avatars2.githubusercontent.com/u/1177900?v=4","gravatar_id":"","url":"https://api.github.com/users/maximbaz","html_url":"https://github.com/maximbaz","followers_url":"https://api.github.com/users/maximbaz/followers","following_url":"https://api.github.com/users/maximbaz/following{/other_user}","gists_url":"https://api.github.com/users/maximbaz/gists{/gist_id}","starred_url":"https://api.github.com/users/maximbaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximbaz/subscriptions","organizations_url":"https://api.github.com/users/maximbaz/orgs","repos_url":"https://api.github.com/users/maximbaz/repos","events_url":"https://api.github.com/users/maximbaz/events{/privacy}","received_events_url":"https://api.github.com/users/maximbaz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maximbaz/aurutils","description":"Helper tools for the AUR.","fork":true,"url":"https://api.github.com/repos/maximbaz/aurutils","forks_url":"https://api.github.com/repos/maximbaz/aurutils/forks","keys_url":"https://api.github.com/repos/maximbaz/aurutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maximbaz/aurutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maximbaz/aurutils/teams","hooks_url":"https://api.github.com/repos/maximbaz/aurutils/hooks","issue_events_url":"https://api.github.com/repos/maximbaz/aurutils/issues/events{/number}","events_url":"https://api.github.com/repos/maximbaz/aurutils/events","assignees_url":"https://api.github.com/repos/maximbaz/aurutils/assignees{/user}","branches_url":"https://api.github.com/repos/maximbaz/aurutils/branches{/branch}","tags_url":"https://api.github.com/repos/maximbaz/aurutils/tags","blobs_url":"https://api.github.com/repos/maximbaz/aurutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maximbaz/aurutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maximbaz/aurutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/maximbaz/aurutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maximbaz/aurutils/statuses/{sha}","languages_url":"https://api.github.com/repos/maximbaz/aurutils/languages","stargazers_url":"https://api.github.com/repos/maximbaz/aurutils/stargazers","contributors_url":"https://api.github.com/repos/maximbaz/aurutils/contributors","subscribers_url":"https://api.github.com/repos/maximbaz/aurutils/subscribers","subscription_url":"https://api.github.com/repos/maximbaz/aurutils/subscription","commits_url":"https://api.github.com/repos/maximbaz/aurutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/maximbaz/aurutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/maximbaz/aurutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/maximbaz/aurutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/maximbaz/aurutils/contents/{+path}","compare_url":"https://api.github.com/repos/maximbaz/aurutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maximbaz/aurutils/merges","archive_url":"https://api.github.com/repos/maximbaz/aurutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maximbaz/aurutils/downloads","issues_url":"https://api.github.com/repos/maximbaz/aurutils/issues{/number}","pulls_url":"https://api.github.com/repos/maximbaz/aurutils/pulls{/number}","milestones_url":"https://api.github.com/repos/maximbaz/aurutils/milestones{/number}","notifications_url":"https://api.github.com/repos/maximbaz/aurutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maximbaz/aurutils/labels{/name}","releases_url":"https://api.github.com/repos/maximbaz/aurutils/releases{/id}","deployments_url":"https://api.github.com/repos/maximbaz/aurutils/deployments","created_at":"2018-01-26T00:59:36Z","updated_at":"2018-01-26T00:59:37Z","pushed_at":"2018-03-25T00:03:30Z","git_url":"git://github.com/maximbaz/aurutils.git","ssh_url":"git@github.com:maximbaz/aurutils.git","clone_url":"https://github.com/maximbaz/aurutils.git","svn_url":"https://github.com/maximbaz/aurutils","homepage":"","size":1183,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AladW:master","ref":"master","sha":"dab360225e4fc6ba22239a4afb3ec2635bfdd305","user":{"login":"AladW","id":5507364,"avatar_url":"https://avatars0.githubusercontent.com/u/5507364?v=4","gravatar_id":"","url":"https://api.github.com/users/AladW","html_url":"https://github.com/AladW","followers_url":"https://api.github.com/users/AladW/followers","following_url":"https://api.github.com/users/AladW/following{/other_user}","gists_url":"https://api.github.com/users/AladW/gists{/gist_id}","starred_url":"https://api.github.com/users/AladW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AladW/subscriptions","organizations_url":"https://api.github.com/users/AladW/orgs","repos_url":"https://api.github.com/users/AladW/repos","events_url":"https://api.github.com/users/AladW/events{/privacy}","received_events_url":"https://api.github.com/users/AladW/received_events","type":"User","site_admin":false},"repo":{"id":52808873,"name":"aurutils","full_name":"AladW/aurutils","owner":{"login":"AladW","id":5507364,"avatar_url":"https://avatars0.githubusercontent.com/u/5507364?v=4","gravatar_id":"","url":"https://api.github.com/users/AladW","html_url":"https://github.com/AladW","followers_url":"https://api.github.com/users/AladW/followers","following_url":"https://api.github.com/users/AladW/following{/other_user}","gists_url":"https://api.github.com/users/AladW/gists{/gist_id}","starred_url":"https://api.github.com/users/AladW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AladW/subscriptions","organizations_url":"https://api.github.com/users/AladW/orgs","repos_url":"https://api.github.com/users/AladW/repos","events_url":"https://api.github.com/users/AladW/events{/privacy}","received_events_url":"https://api.github.com/users/AladW/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AladW/aurutils","description":"Helper tools for the AUR.","fork":false,"url":"https://api.github.com/repos/AladW/aurutils","forks_url":"https://api.github.com/repos/AladW/aurutils/forks","keys_url":"https://api.github.com/repos/AladW/aurutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AladW/aurutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AladW/aurutils/teams","hooks_url":"https://api.github.com/repos/AladW/aurutils/hooks","issue_events_url":"https://api.github.com/repos/AladW/aurutils/issues/events{/number}","events_url":"https://api.github.com/repos/AladW/aurutils/events","assignees_url":"https://api.github.com/repos/AladW/aurutils/assignees{/user}","branches_url":"https://api.github.com/repos/AladW/aurutils/branches{/branch}","tags_url":"https://api.github.com/repos/AladW/aurutils/tags","blobs_url":"https://api.github.com/repos/AladW/aurutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AladW/aurutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AladW/aurutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/AladW/aurutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AladW/aurutils/statuses/{sha}","languages_url":"https://api.github.com/repos/AladW/aurutils/languages","stargazers_url":"https://api.github.com/repos/AladW/aurutils/stargazers","contributors_url":"https://api.github.com/repos/AladW/aurutils/contributors","subscribers_url":"https://api.github.com/repos/AladW/aurutils/subscribers","subscription_url":"https://api.github.com/repos/AladW/aurutils/subscription","commits_url":"https://api.github.com/repos/AladW/aurutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/AladW/aurutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/AladW/aurutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/AladW/aurutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/AladW/aurutils/contents/{+path}","compare_url":"https://api.github.com/repos/AladW/aurutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AladW/aurutils/merges","archive_url":"https://api.github.com/repos/AladW/aurutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AladW/aurutils/downloads","issues_url":"https://api.github.com/repos/AladW/aurutils/issues{/number}","pulls_url":"https://api.github.com/repos/AladW/aurutils/pulls{/number}","milestones_url":"https://api.github.com/repos/AladW/aurutils/milestones{/number}","notifications_url":"https://api.github.com/repos/AladW/aurutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AladW/aurutils/labels{/name}","releases_url":"https://api.github.com/repos/AladW/aurutils/releases{/id}","deployments_url":"https://api.github.com/repos/AladW/aurutils/deployments","created_at":"2016-02-29T17:14:33Z","updated_at":"2018-03-23T20:21:20Z","pushed_at":"2018-03-25T00:03:31Z","git_url":"git://github.com/AladW/aurutils.git","ssh_url":"git@github.com:AladW/aurutils.git","clone_url":"https://github.com/AladW/aurutils.git","svn_url":"https://github.com/AladW/aurutils","homepage":"","size":1170,"stargazers_count":153,"watchers_count":153,"language":"Shell","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc"},"forks":16,"open_issues":16,"watchers":153,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AladW/aurutils/pulls/328"},"html":{"href":"https://github.com/AladW/aurutils/pull/328"},"issue":{"href":"https://api.github.com/repos/AladW/aurutils/issues/328"},"comments":{"href":"https://api.github.com/repos/AladW/aurutils/issues/328/comments"},"review_comments":{"href":"https://api.github.com/repos/AladW/aurutils/pulls/328/comments"},"review_comment":{"href":"https://api.github.com/repos/AladW/aurutils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AladW/aurutils/pulls/328/commits"},"statuses":{"href":"https://api.github.com/repos/AladW/aurutils/statuses/cc090b21949cfa8ba803be241225ceb9cb564d1d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"maximbaz"}}