Skip to content

Commit

Permalink
Removed underline
Browse files Browse the repository at this point in the history
  • Loading branch information
Fulgurance committed Jan 4, 2025
1 parent ed10c17 commit c0537c9
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ISM/CommandLine.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ module ISM

puts "#{summaryText.colorize(:green)}"

print "#{ISM::Default::CommandLine::InstallQuestion.colorize.mode(:underline)}" +
print "#{ISM::Default::CommandLine::InstallQuestion}" +
"[" + "#{ISM::Default::CommandLine::YesReplyOption.colorize(:green)}" +
"/" + "#{ISM::Default::CommandLine::NoReplyOption.colorize(:red)}" + "]"

Expand All @@ -1726,7 +1726,7 @@ module ISM

puts "#{summaryText.colorize(:green)}"

print "#{ISM::Default::CommandLine::UninstallQuestion.colorize.mode(:underline)}" +
print "#{ISM::Default::CommandLine::UninstallQuestion.colorize}" +
"[" + "#{ISM::Default::CommandLine::YesReplyOption.colorize(:green)}" +
"/" + "#{ISM::Default::CommandLine::NoReplyOption.colorize(:red)}" + "]"

Expand Down
19 changes: 19 additions & 0 deletions ISM/Default/Option/System/System.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module ISM

module Default

module Option

module Port

ShortText = "-sy"
LongText = "system"
Description = "Manage the system"
Options = []

end
end

end

end
41 changes: 41 additions & 0 deletions ISM/Option/System/System.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module ISM

module Option

class System < ISM::CommandLineOption

def initialize
super( ISM::Default::Option::System::ShortText,
ISM::Default::Option::System::LongText,
ISM::Default::Option::System::Description,
ISM::Default::Option::System::Options)
end

def start
if ARGV.size == 1
showHelp
else
matchingOption = false

@options.each_with_index do |argument, index|
if ARGV[1] == argument.shortText || ARGV[1] == argument.longText
matchingOption = true
@options[index].start
break
end
end

if !matchingOption
puts "#{ISM::Default::CommandLine::ErrorUnknowArgument.colorize(:yellow)}" + "#{ARGV[0].colorize(:white)}"
puts "#{ISM::Default::CommandLine::ErrorUnknowArgumentHelp1.colorize(:white)}" +
"#{ISM::Default::CommandLine::ErrorUnknowArgumentHelp2.colorize(:green)}" +
"#{ISM::Default::CommandLine::ErrorUnknowArgumentHelp3.colorize(:white)}"
end
end
end

end

end

end

0 comments on commit c0537c9

Please sign in to comment.