mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00

* Reimported the HTML and Ruby bundle with the previous fix * Applied Rob Christie's patches of issues 109 and 110 0001-Deleted-because-this-is-supported-via-dwim-with-rcod.patch 0002-Updated-snippets.patch 0003-Added-setup.el-file-that-must-be-loaded-prior-to-loa.patch 0004-ruby-mode-class-and-module-snippets-updated.patch 0005-changes-to-counting-snippets-and-some-declaration-sn.patch patching some things manually. Thanks a lot Rob!
34 lines
581 B
Plaintext
34 lines
581 B
Plaintext
# -*- mode: snippet -*-
|
|
# key: optp
|
|
# contributor: Translated from TextMate Snippet
|
|
# name: option_parse { .. }
|
|
## condition: "source.ruby"
|
|
# --
|
|
require "optparse"
|
|
|
|
options = {${1::default => "args"}}
|
|
|
|
ARGV.options do |opts|
|
|
opts.banner = "Usage: #{File.basename(\$PROGRAM_NAME)} [OPTIONS]${2/^\s*$|(.*\S.*)/(?1: )/}${2:OTHER_ARGS}"
|
|
|
|
opts.separator ""
|
|
opts.separator "Specific Options:"
|
|
|
|
$0
|
|
|
|
opts.separator "Common Options:"
|
|
|
|
opts.on( "-h", "--help",
|
|
"Show this message." ) do
|
|
puts opts
|
|
exit
|
|
end
|
|
|
|
begin
|
|
opts.parse!
|
|
rescue
|
|
puts opts
|
|
exit
|
|
end
|
|
end
|