Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env ruby
args = ARGV.dup
snark_for_options = {
'-l' => "You can't do anything, you can't even spell sudo",
'-s' => "Don't even think of running as the uper suser.",
'-b' => "Run it in the background? Hah, fat chance.",
'-e' => "Edit which file? Oh wait, you can't"
indent = " "*4
additional_snark ={|arg| indent + snark_for_options[arg].to_s if snark_for_options[arg]}.join "\n"
puts "----USDO----"
puts indent + "You mispelled sudo"
puts additional_snark unless additional_snark.empty?
puts indent + "are you really sure you want to try running",indent+"'sudo #{args.join(' ')}'????"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment