As an aside in this issue: https://github.com/mxcl/homebrew/pull/5455/, I noted that it would be cool if one could just pass '--gist' to `brew install` to have the output posted in a gist for issue reporting. Is there any interest in implementing that? I poked around a bit this morning to see what it would entail but with my limited knowledge of Ruby I think I would probably do more harm than good to the Homebrew internals. If there is someone who wants to hack on it, though, I had a few thoughts (h/t @Sharpie): * '--gist' should probably imply '--verbose' * output to the terminal should remain the same * if someone passes '--gist' and they don't have gist installed, die and tell them to run `brew install gist` first * it should only work for people who have set github.user and github.token in their ~/.gitconfig (again, could be a prompt if they try to pass '--gist' without doing so) to prevent a lot of one-off anonymous gists * it could return a link to the gist and a link to the issue creation page As @Sharpie noted, making it _too_ easy to post issues discourages users from attempting to solve the problem first, although there are a lot of these type of issues already (i.e., issues without any details, no `brew install` output) and this might actually improve the quality of issue reports in some cases. Anyway, just some thoughts. Jack
On 6 May 2011, at 20:53, Jack Nagel wrote: > As an aside in this issue: https://github.com/mxcl/homebrew/pull/5455/, I noted that it would be cool if one could just pass '--gist' to `brew install` to have the output posted in a gist for issue reporting. brew install X|gist is less characters than brew install --gist X so it probably makes more sense to just rely on the gist too for this. -- Mike McQuaid http://mikemcquaid.com
Fair enough. If anyone's interested, this will print to the terminal _and_ gist it: brew install ___ -v 2>&1 | tee /dev/tty | gist -o - Jack On Sat, May 7, 2011 at 2:53 AM, Mike McQuaid <mike@mikemcquaid.com> wrote: > > On 6 May 2011, at 20:53, Jack Nagel wrote: > > > As an aside in this issue: https://github.com/mxcl/homebrew/pull/5455/, > I noted that it would be cool if one could just pass '--gist' to `brew > install` to have the output posted in a gist for issue reporting. > > brew install X|gist is less characters than brew install --gist X so it > probably makes more sense to just rely on the gist too for this. > > -- > Mike McQuaid > http://mikemcquaid.com > >
Then heres a bash function
brew-gist()
{
brew -v $0 2>&1 | tee /dev/tty | gist -o -
}
To append to ~/.profile.
Or perhaps it could be made into some kind of a brew extension, since
gist must be installed separately, and not all people will have the
gist command.
On Sat, May 7, 2011 at 10:31 PM, Jack Nagel <jacknagel@gmail.com> wrote:
> Fair enough.
> If anyone's interested, this will print to the terminal _and_ gist it:
> brew install ___ -v 2>&1 | tee /dev/tty | gist -o -
>
> Jack
> On Sat, May 7, 2011 at 2:53 AM, Mike McQuaid <mike@mikemcquaid.com> wrote:
>>
>> On 6 May 2011, at 20:53, Jack Nagel wrote:
>>
>> > As an aside in this issue: https://github.com/mxcl/homebrew/pull/5455/,
>> > I noted that it would be cool if one could just pass '--gist' to `brew
>> > install` to have the output posted in a gist for issue reporting.
>>
>> brew install X|gist is less characters than brew install --gist X so it
>> probably makes more sense to just rely on the gist too for this.
>>
>> --
>> Mike McQuaid
>> http://mikemcquaid.com
>>
>
>