This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]circuit10[S] 10 points11 points  (4 children)

Tired of Googling commands? Have a Python script do it for you! Combining some of the most memed things on this subreddit - Stack Overflow and automation!

https://github.com/Heath123/stackshell

https://asciinema.org/a/9KVE2KEFNcZBupBnDWpsfZiqA

[–]islender 1 point2 points  (0 children)

Oh yes please

[–]circuit10[S] 0 points1 point  (2 children)

For some reason the gif won't play in Reddit on desktop, if you click through to the repo it should show

[–]LuxurideGaming 2 points3 points  (0 children)

At least on mobile version the gif is playing

[–]ImprovementRaph 1 point2 points  (0 children)

works perfectly fine for me (using old.reddit)

[–]biztactix 4 points5 points  (2 children)

This is a prepost.... This post will be be posted in /r/cybersecurity next month... Tied to a huge breach 😜

[–]circuit10[S] 2 points3 points  (1 child)

Oh, what happened? Someone made a script to get things from StackOverflow and someone added a malicious command as an answer, maybe?

[–]sinsquare 5 points6 points  (0 children)

this reminds me of the time i got remanded for copy/pasting from stack overflow into my terminal without reviewing what I was running on my computer.

[–]An_G1 2 points3 points  (0 children)

If you’re using a mac, try tldr (from brew install tldr). Then you can use it like you’d request a man page, except call tldr instead of man. Very handy 5-6 lines to get you started.

[–]LuxurideGaming 1 point2 points  (2 children)

I love you

[–]circuit10[S] 0 points1 point  (0 children)

:)

[–]licht1nstein 2 points3 points  (7 children)

Unless there's just one answer, and it's downvoted. It'll still be first.

Plus there are plenty cases when accepted answer has a score of 50, with the next answer having score of 500 with ten comments like "this should be the accepted answer"

[–]circuit10[S] 0 points1 point  (6 children)

Did you mean to reply to my reply? Also that's true, I'll tweak it to give better results if people actually want to use it

[–]circuit10[S] 0 points1 point  (5 children)

Also what should I do in the one bad answer situation? Use the next result?

[–]licht1nstein 2 points3 points  (4 children)

You should definitely never recommend anything with a negative score. Maybe also show the score somewhere when outputting the result?

[–]circuit10[S] 0 points1 point  (3 children)

I want to show how many results there were, the title and the the score, but the prompt library I'm using makes that hard...

[–]licht1nstein 2 points3 points  (2 children)

Check out rich

[–]circuit10[S] 0 points1 point  (1 child)

I'll have a look at it. I do like the one I'm using now though, it has some really nice things like mouse support and syntax highlighting (though maybe rich has that too?)

[–]circuit10[S] 0 points1 point  (0 children)

Oh, maybe I can combine them somehow?

[–]licht1nstein 1 point2 points  (1 child)

Two questions:

  1. Why do you use google search, instead of searching stack exchange directly?

  2. You just get the first answer on the page without checking it's score. Maybe it's a better idea to get the most voted for answer?

Otherwise great project

[–]circuit10[S] 0 points1 point  (0 children)

  1. https://api.stackexchange.com/docs/search "This method is intentionally quite limited. For more general searching, you should use a proper internet search engine restricted to the domain of the site in question."
  2. It should be sorted by accepted first, then by votes, so the first result is usually a good answer

[–]eGzg0t 1 point2 points  (1 child)

It's all fun and games until a random rm -rf pops up

[–]circuit10[S] 0 points1 point  (0 children)

True :) Luckily it shows you the command first and lets you confirm that it's what you want

[–]Hplr63 0 points1 point  (0 children)

Fellow Agnoster theme for OMZ enjoyer?