Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add -t [FILE EXTENSION] for gist 3 compatbility

  • Loading branch information...
commit 19205e53465e3b44ae1fd1901f3d976125ba7e7a 1 parent f488bfa
@ConradIrwin authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 bin/gist
View
7 bin/gist
@@ -39,7 +39,7 @@ Instead of creating a new gist, you can update an existing one by passing its ID
or URL with "-u". For this to work, you must be logged in, and have created the
original gist with the same GitHub account.
-Usage: #{executable_name} [-o|-c|-e] [-p] [-s] [-d DESC] -a] [-u URL] [-P] [-f NAME]* FILE*
+Usage: #{executable_name} [-o|-c|-e] [-p] [-s] [-d DESC] -a] [-u URL] [-P] [-f NAME|-t EXT]* FILE*
#{executable_name} --login
EOS
@@ -54,6 +54,11 @@ Usage: #{executable_name} [-o|-c|-e] [-p] [-s] [-d DESC] -a] [-u URL] [-P] [-f N
options[:filename] = filename
end
+ opts.on("-t", "--type [EXTENSION]", "Sets the file extension and syntax type.") do |extension|
+ filenames << "foo.#{extension}"
+ options[:filename] = "foo.#{extension}"
+ end
+
opts.on("-p", "--public", "Makes your gist public.") do |public|
options[:public] = public
end
Please sign in to comment.
Something went wrong with that request. Please try again.