Giter Site home page Giter Site logo

bro's People

Contributors

ben-biddington avatar cpatton1027 avatar hubsmoke avatar josephredfern avatar leoadamek avatar olleicua avatar rafaelsantossilva avatar schnevets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bro's Issues

Problem with running with newer packages

I get an error:
/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in to_specs': Could not find 'commander' (= 4.1.5) - did find: [commander-4.2.0] (Gem::LoadError)`

I am running under Arch Linux (downloaded newest commander as a dependency). Is it possible to fix this for newer dependency versions?

Simplify thanking

The "bro thanks", "bro no" messages are very repetitive and take up a lot of space. It'd be far more useful if it only gave the instruction once and just numbered the examples.

Additionally I'd be more inclined to "vote" if I could simply type "bro no x" without the dots.

Requires Ruby1.9.2?

According the website
"bro is meant to work out of the box for any machine running Ruby 1.8.7+"

When trying to install on Ubuntu 12.04 LTS, this result:

# gem install bropages
Fetching: json_pure-1.8.1.gem (100%)
Fetching: highline-1.6.20.gem (100%)
Fetching: commander-4.1.5.gem (100%)
Fetching: mime-types-2.1.gem (100%)
ERROR:  Error installing bropages:
        mime-types requires Ruby version >= 1.9.2.

bro throws away valuable exceptions

bro wasn't working for me and I had no idea why. The only output I got was:

The bro command isn't in our database.

    * Typing bro add will let you add bro to our database!

    * There's nothing to lose by typing bro add, it will just launch an editor with instructions.

    * Need help? Visit http://bropages.org/help

It turns out that there was a valuable Netrc::Error exception being thrown away:

Permission bits for '/Users/huyz/.netrc' should be 0600, but are 644

The exception handling at

bro/lib/bro.rb

Lines 251 to 253 in b2fbbc1

rescue
say <<-QQQ.unindent
The #{cmd_display.colored.yellow} command isn't in our database.
is a bit too coarse. Maybe it should handle RestClient::ResourceNotFound exceptions separately.

constant ::NIL is deprecated etc

Any bro command after installation results in:

/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::NIL is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Data is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::TRUE is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::FALSE is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Fixnum is deprecated
/var/lib/gems/2.5.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Bignum is deprecated

bro get it together / feature request

In some cases, bro is giving many examples that are equal or very close. I propose a new feature where users can use the command

bro get it together 3 2

to suggest merging entry 2 into 3.

'command isn't in our database' for every query

For example; The curl command isn't in our database.

Is there a way I can troubleshoot the issue? I have made sure I'm on the most recent version of gem/ruby and bro and I have verified that there are no network issues.

The [*] command isn't in our database

Bro (v 0.1.0) installed (OSX 10.12.3), but no matter what bro I try, the result is always:
The bro command isn't in our database
The curl command isn't in our database
The ping command isn't in our database
... you get the point.

warning: Insecure world writable dir

Bro v0.1.0
Ubuntu 12.04
My home dir is: /home/a

/var/lib/gems/1.8/gems/highline-1.6.20/lib/highline/system_extensions.rb:214: warning: Insecure world writable dir /home/a in PATH, mode 040777

This warning appears for a brief moment before the listing is displayed. It then appears again in the listing itself. It appears for every listing. Here is an example of the text using: bro bro

4 entries for bro -- submit your own example with "bro add bro"

/var/lib/gems/1.8/gems/highline-1.6.20/lib/highline/system_extensions.rb:214: warning: Insecure world writable dir /home/a in PATH, mode 040777
# lookup an entry for the command 'bro' with bro
bro bro

        bro thanks      to upvote (97)
        bro ...no       to downvote (3)

...........................................................................
....etc....

My home directory exists like this purposefully:

$ ll -d /home/a
drwxrwxrwx 176 a a 32768 Jan 28 22:08 /home/a

warning: constant ::TimeoutError is deprecated

..../.rvm/gems/ruby-2.3.1/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::TimeoutError is deprecated
The bro command isn't in our database.

* Typing bro add will let you add bro to our database!

* There's nothing to lose by typing bro add, it will just launch an editor with instructions.

* Need help? Visit http://bropages.org/help

This error is thrown for any query

ruby mime-types dependency runtime error

Running bropages using ruby 2.1.0p0 with ruby-mime-types 2.1 spits out the following error:
/usr/lib/ruby/2.1.0/rubygems/specification.rb:1292:in block in activate_dependencies':
can't satisfy 'mime-types (~> 1.19.0)', already activated 'mime-types-2.1'
(Gem::LoadError)`

How to install bro on Ubuntu 18.04?

Did apt install ruby. Then:

orschiro@x230:~$ gem install bropages
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.3.0 directory.
orschiro@x230:~$ sudo gem install bropages
Building native extensions.  This could take a while...
ERROR:  Error installing bropages:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/unf_ext-0.0.7.4/ext/unf_ext
/usr/bin/ruby2.3 -r ./siteconf20171123-20103-ihn6s4.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/unf_ext-0.0.7.4 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.4/gem_make.out

Does not work on Mac OS ruby 1.9.3 - crashes immediately

Trying to bro anything results in the exact same error (below). I've done a full gem update.

$ bro bro
/Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:365:in `block in require_program': program version required (Commander::Runner::CommandError)
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:364:in `each'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:364:in `require_program'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/runner.rb:52:in `run!'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
/Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': dlopen(/Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/openssl.bundle
  Reason: image not found - /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/openssl.bundle
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl.rb:17:in `<top (required)>'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/https.rb:22:in `<top (required)>'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient.rb:6:in `<top (required)>'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/rest-client.rb:2:in `<top (required)>'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/bropages-0.0.15/lib/bro.rb:7:in `<top (required)>'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/bropages-0.0.15/bin/bro:3:in `<top (required)>'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/bro:19:in `load'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/bro:19:in `<main>'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/ruby_executable_hooks:15:in `eval'
    from /Users/mark/.rvm/gems/ruby-1.9.3-p194/bin/ruby_executable_hooks:15:in `<main>'
mark@lotus:~$ vim /Users/mark/.rvm/gems/ruby-1.9.3-p194/gems/bropages-0.0.15/bin/bro 

bro requires Ruby 1.9.2 or higher

http://bropages.org/ states that

bro is meant to work out of the box for any machine running Ruby 1.8.7+

However, when I try to install bropages on my Mac (running Ruby 1.8.7), I get the following error:

$ gem install bropages
Fetching: json_pure-1.8.1.gem (100%)
Fetching: highline-1.6.20.gem (100%)
Fetching: commander-4.1.5.gem (100%)
Fetching: mime-types-2.1.gem (100%)
ERROR: Error installing bropages:
mime-types requires Ruby version >= 1.9.2.

It looks bropages is dependent on mime-types, and that requires 1.9.2.

Just FYI.

Collaborate with tldr?

It's quite unfortunate that there are two projects splitting the mindshare of easily approachable, community-maintained quick reference documents for console commands, tldr and bropages.

Wouldn't be nice if the communities joined forces? Leave your comments at tldr-pages/tldr#266 if you're interested!

required Ruby version

as stated on the website:

bro is meant to work out of the box for any machine running Ruby 1.8.7+

however, I face the following difficulties (running OS X 10.8.5):

097115 on Talisker @ ~/Desktop> ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

097115 on Talisker @ ~/Desktop> sudo gem install bropages
ERROR:  Error installing bropages:
        mime-types requires Ruby version >= 1.9.2.

would be grateful for any advice,

thanks.

^C out of email request has no error handling

$ bro bro
$ bro no
Bropages.org requires an email address verification to do this
What's your email address?
^C/Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:863:in `eof?': Interrupt
    from /Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:863:in `get_line'
    from /Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:885:in `get_response'
    from /Library/Ruby/Gems/2.0.0/gems/highline-1.6.20/lib/highline.rb:260:in `ask'
    from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro/bro_state.rb:32:in `prompt_email'
    from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro/bro_state.rb:21:in `rescue in check_email'
    from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro/bro_state.rb:18:in `check_email'
    from /Library/Ruby/Gems/2.0.0/gems/bropages-0.0.15/lib/bro.rb:78:in `block (2 levels) in '
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:66:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in '

limit examples by number or score

As bro gets more used, it's going to be more difficult to parse the output. It'd be nice to be able to limit the number of examples either by just an absolute number, or by some score threshold. This will hide the crap that accumulates.

Mark as Dangerous feature

One entry for rm has this example:
sudo rm -rf /

There should be a vote as dangerous option in addition to thumbs down.

A default install could hide all dangerous items, and additionally a user could set a dangerous vote threshold =P

Can't verify email address with a '+' in it.

I tried to sign up through the CLI to rate bro pages using an address of the form [email protected]. I received the verification code from the server, but when I entered it into the terminal, it was rejected repeatedly.

Repeating the exact same process without the plus ([email protected]), everything worked smoothly.

Low priority bug definitely, but some people like sorting the addresses they give out.

Deprecation errors every time I run bro

Every time I run bro I get the following message:

➜ ~ bro git
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::NIL is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::TRUE is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::FALSE is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Fixnum is deprecated
/usr/local/lib/ruby/gems/2.4.0/gems/commander-4.1.5/lib/commander/user_interaction.rb:328: warning: constant ::Bignum is deprecated
32 entries for git -- submit your own example with "bro add git"
...

Bro still works, but I'd like to suppress this message if possible.

I'm running macOS Sierra v10.12.2. I don't get this error on my other Mac running El Capitan.

I've tried gem update, gem cleanup, uninstalling bropages and reinstalling, and updating rubygems itself, but I'm still getting this error.

Thanks!

Compact display mode

Hey, Bro is great! Thanks for making this product. It would be nice though if Bro had a more minimal output where the upvotes/downvotes took up less of the screen space.

How about adding a "sis" command to behave like apropos?

Just like apropos, "sis" would list the commands whose bro entries contain the specified keywords.

Example:

sis reverse

Output:

rev
revnetgroup

You could then use "bro rev" to find the example containing "reverse".

In addition to being complementary to bro, this sister command might even ease some of the naming complaints we've seen.

Are the bropages data available as a single download?

Hi, thanks for making this :) I'd like to download all of the bropages in order to do some analysis. I could scrape the website, but I wonder if you can share this data in a 'dump' form or even if the tool itself can cache the whole database so I can extract it from there. Thanks

Don't call me bro, chief.

Bro has a strongly negative connotation with many people. Google brogrammer.
I propose a name change to "TLDR".

Downside:
It is one more char.

Upside:
no popped collars.

Use EDITOR system variable instead of forcing VI

Some of us crazy folks like to edit everything with Sublime Text, nano, pico or something that isn't as pointless to learn as vi.

Please open the editor stored under the editor system variable instead of forcing the usage of a editor that might not even be installed on the system.

TLS / HTTPS support

Currently bropages.org is not listening on 443
bropages.org should have TLS and the gem should default to using it

Trouble installing on Mavericks

When I try installing:

~$ gem install bropages
Building native extensions.  This could take a while...
ERROR:  Error installing bropages:
    ERROR: Failed to build gem native extension.

    No such file or directory @ dir_chdir - /Users/christian/.gem/gems/unf_ext-0.0.6/ext/unf_ext

Gem files will remain installed in /Users/christian/.gem/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/christian/.gem/extensions/x86_64-darwin-13/2.2.0-static/unf_ext-0.0.6/gem_make.out

~$ ruby --version
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]
~$ gem --version
2.4.5

Color scheme

Maybe you could possibly consider using a different color for the commands? It's very hard to read with ubuntu's default colors.

screenshot from 2014-01-25 12 49 43

inline comments

I propose a double-hash be used, to indicate inline comments.
Command ## Comment

http://bropages.org/examples/1717
^ this would look so much better if you could do

%A ## Weekday. Monday
%a ## Weekday, abbreviated. Mon
%d ## Day of month, padded. 03

Much more concise for quick blurbs of text,
instead of all that wasted whitespace filling up your screen.

Allow filtering of heavily downvoted items

It would be useful to be able to configure the results that get returned by filtering out anything with excessive downvote to upvote ratios. For example, look at the output from bro rm.

Trouble looking up commands beginning with "add"

If you try to lookup a command such as add-apt-repository by running

bro add-apt-repository

it opens the editor to create an entry for this command rather than looking it up. The correct behaviour can be obtained by running bro lookup add-apt-repository but the actual behaviour is certainly not what is expected. Common patterns like bro -- add-apt-repository (the -- is often used to indicate the end of arguments) do not do the correct thing either.

Markdown output

Hi,
Add, the ability to generate the output in markdown. That way you can create a nice manual πŸ˜ƒ
This can be achieved by making small changes.

  1. Adding another # for render subtitles
  2. Adding empty line.
  3. Adding code delimiters.
  4. Add $ symbol (optional) looks like a terminal
  5. Changing dots (.) for minus (-)

  • This will render like this

search for 'foo' on .rb files, recursively

    $ ack --ruby -R 'foo'
bro thanks  to upvote (9)
bro ...no   to downvote (0)

Edit an entry

At least for my own entries I would like to have something like bro edit command to correct errors or fix formatting issues.

needs a license

I have not found a license after a cursory search for one in the repository, on the website, and at rubygems.org. Before installing any software on my computer, I want to know what license it uses.

If you have no specific license in mind, I recommend something non-restrictive (i.e. a copyfree license). The "official" reference implementation of the Ruby programming language itself uses the (two-clause) Simplified BSD License. Perhaps you could use that.

A new name?

A lot of people are upset about the name, to put it mildly.

I don't want to get into a debate about whether people should or shouldn't be upset. That conversation should happen in better places than the github issue tracker. I'll just note that it might be a good PR move to rename it. Would you consider that?

If not, I might just fork it and republish with a new name as a devious plan to get a popular project with minimum work :-) But I'd rather you keep the credit since you did the actual work.

Either way, great job building this useful tool and thanks for releasing it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.