Skip to content

Commit

Permalink
Use file name if available when posting an entire file.
Browse files Browse the repository at this point in the history
  • Loading branch information
4rc0s committed Nov 19, 2008
1 parent 8d0fe4f commit 325a576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Support/bin/create_gist_from_selection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_extension
gistname = "snippet" << "." << get_extension
else
selection = STDIN.read
gistname = "file" << "." << get_extension
gistname = ENV['TM_FILEPATH'] ? ENV['TM_FILEPATH'].split('/')[-1] : "file" << "." << get_extension
end

if url = Gist.write(gistname, selection, ARGV[0] == "private" ? true : false)
Expand Down

0 comments on commit 325a576

Please sign in to comment.