aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-09-13 07:54:13 -0400
committerRalph Amissah <ralph@amissah.com>2010-09-13 15:21:36 -0400
commit9d61f9401180da67c65ee7f4c85999f4fb40fd0c (patch)
tree964a196757c6e254ec18463a50f87ea326f0dbf9 /lib
parentchangelog 2.6.3-4 [debian package rebuilt (squeeze freeze)] (diff)
options, add expressive options --[name] as alternative to flags -[x]
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/options.rb43
1 files changed, 33 insertions, 10 deletions
diff --git a/lib/sisu/v2/options.rb b/lib/sisu/v2/options.rb
index fbf8336a..94a23590 100644
--- a/lib/sisu/v2/options.rb
+++ b/lib/sisu/v2/options.rb
@@ -125,16 +125,39 @@ module SiSU_commandline
unless m.empty?
m.each do |m|
case m
- when /--maintenance/
- c=c+'M'
- when /--verbose[=-]3/
- c=c+'VM'
- when /--verbose[=-]2|--Verbose|--VERBOSE/
- c=c+'V'
- when /--verbose(?:[=-]1)?/
- c=c+'v'
- when /--verbose[=-]0|--quiet|--silent/
- c=c+'q'
+ when /--color-toggle/; c=c+'c'
+ when /--configure/; c=c+'C' # issue should be CC
+ when /--machine|--middle/; c=c+'m'
+ when /--txt|--text|--plaintext/; c=c+'t'
+ when /--html/; c=c+'h'
+ when /--epub/; c=c+'e'
+ when /--od[ft]/; c=c+'o'
+ when /--pdf/; c=c+'p'
+ when /--concordance|--wordmap/; c=c+'w'
+ when /--manpage/; c=c+'i'
+ when /--texinfo/; c=c+'I'
+ when /--xhtml/; c=c+'b'
+ when /--xml-sax/; c=c+'x'
+ when /--xml-dom/; c=c+'X'
+ when /--digest/; c=c+'N'
+ when /--termsheet/; c=c+'T'
+ when /--manifest/; c=c+'my'
+ when /--sqlite/; c=c+'d'
+ when /--pg|--psql/; c=c+'D'
+ when /--remote|--rsync/; c=c+'R'
+ when /--scp/; c=c+'r'
+ when /--source/; c=c+'s'
+ when /--sisupod/; c=c+'S'
+ when /--git/; c=c+'g'
+ when /--urls/; c=c+'U'
+ when /--zap|--delete/; c=c+'Z'
+ when /--sample-search-form/; c=c+'F'
+ when /--webserv|--webrick/; c=c+'W'
+ when /--maintenance/; c=c+'M'
+ when /--verbose[=-]3/; c=c+'VM'
+ when /--verbose[=-]2|--Verbose|--VERBOSE/; c=c+'V'
+ when /--verbose(?:[=-]1)?/; c=c+'v'
+ when /--verbose[=-]0|--quiet|--silent/; c=c+'q'
else @mod << m
end
end