You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parser = Trollop::Parser.new do
opt :silent, %q{Causes the script to not ask any questions, instead all questions turn into email + abort; used by cron}, :short => 's'
opt :region, %q{Causes the script only work on the listed region}, :short => 'r', :type => String
opt :noinst, %q{Causes the script to skip the checking of all instances}, :short => 'i'
end
parser = Trollop::Parser.new do
opt :silent, %q{Causes the script to not ask any questions, instead all questions turn into email + abort; used by cron}, :short => 's'
opt :region, %q{Causes the script only work on the listed region}, :short => 'r', :type => String
opt :no_instances, %q{Causes the script to skip the checking of all instances}, :short => 'i'
end
which is what I had originally, running it with -i gives:
There is special logic for flags starting with 'no' to account for
supporting negation of normal flags. I think you can specify a default to
get your desired affect. Another option is to code for the positive and
set a default.
parser = Trollop::Parser.new do
opt :silent, %q{Causes the script to not ask any questions, instead all questions turn into email + abort; used by cron}, :short => 's'
opt :region, %q{Causes the script only work on the listed region}, :short => 'r', :type => String
opt :noinst, %q{Causes the script to skip the checking of all instances}, :short => 'i'
end
parser = Trollop::Parser.new do
opt :silent, %q{Causes the script to not ask any questions, instead all questions turn into email + abort; used by cron}, :short => 's'
opt :region, %q{Causes the script only work on the listed region}, :short => 'r', :type => String
opt :no_instances, %q{Causes the script to skip the checking of all instances}, :short => 'i'
end
which is what I had originally, running it with -i gives:
Given:
Running it with -i gives us:
However, given:
which is what I had originally, running it with -i gives:
which strikes me as wrong.
The text was updated successfully, but these errors were encountered: