{"action":"opened","issue":{"url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/994","labels_url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/994/labels{/name}","comments_url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/994/comments","events_url":"https://api.github.com/repos/sorin-ionescu/prezto/issues/994/events","html_url":"https://github.com/sorin-ionescu/prezto/issues/994","id":111059062,"number":994,"title":"extract fails on FreeBSD for tar.gz","user":{"login":"sorin-ionescu","id":93816,"avatar_url":"https://avatars.githubusercontent.com/u/93816?v=3","gravatar_id":"","url":"https://api.github.com/users/sorin-ionescu","html_url":"https://github.com/sorin-ionescu","followers_url":"https://api.github.com/users/sorin-ionescu/followers","following_url":"https://api.github.com/users/sorin-ionescu/following{/other_user}","gists_url":"https://api.github.com/users/sorin-ionescu/gists{/gist_id}","starred_url":"https://api.github.com/users/sorin-ionescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorin-ionescu/subscriptions","organizations_url":"https://api.github.com/users/sorin-ionescu/orgs","repos_url":"https://api.github.com/users/sorin-ionescu/repos","events_url":"https://api.github.com/users/sorin-ionescu/events{/privacy}","received_events_url":"https://api.github.com/users/sorin-ionescu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sorin-ionescu/prezto/labels/Bug","name":"Bug","color":"990000"},{"url":"https://api.github.com/repos/sorin-ionescu/prezto/labels/Fix","name":"Fix","color":"CC5C5C"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-12T21:24:29Z","updated_at":"2015-10-12T21:24:29Z","closed_at":null,"body":"FreeBSD `tar` expects the a dash for reading from STDIN.\r\n\r\n```patch\r\n--- extract.plugin.zsh.orig\t2015-10-12 13:27:03.569186579 +0200\r\n+++ extract.plugin.zsh\t2015-10-12 13:28:07.537181172 +0200\r\n@@ -38,7 +38,7 @@\r\n     file_name=\"$( basename \"$1\" )\"\r\n     extract_dir=\"$( echo \"$file_name\" | sed \"s/\\.${1##*.}//g\" )\"\r\n     case \"$1\" in\r\n-      (*.tar.gz|*.tgz) [ -z $commands[pigz] ] && tar zxvf \"$1\" || pigz -dc \"$1\" | tar xv ;;\r\n+      (*.tar.gz|*.tgz) [ -z $commands[pigz] ] && tar zxvf \"$1\" || pigz -dc \"$1\" | tar xvf - ;;\r\n       (*.tar.bz2|*.tbz|*.tbz2) tar xvjf \"$1\" ;;\r\n       (*.tar.xz|*.txz) tar --xz --help &> /dev/null \\\r\n         && tar --xz -xvf \"$1\" \\\r\n```"}}