From e895d6b8503cba9443d91d63d080a4fa4dba7d1e Mon Sep 17 00:00:00 2001 From: GeopJr Date: Thu, 19 May 2022 13:18:44 +0300 Subject: [PATCH] chore(OptionParser): reorder cli flags so they match priority -s > -f and -i > -w --- README.md | 2 +- src/blahaj/option_parser.cr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9526369..2645aa2 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Flags with eg. triangles, circles or symbols, need enough horizontal space to de ### Why are the stripes repeating instead of showing the flag in full? -Just like the previous question, BLÅHAJ can't know how long the text is going to be (vertically) as it colorizes the input as it comes in. +Just like the previous question, BLÅHAJ can't know how long the text is going to be (vertically) since it colorizes the input as it comes in. ### I would like to add a color scheme or flag diff --git a/src/blahaj/option_parser.cr b/src/blahaj/option_parser.cr index dbf1b5e..404deff 100644 --- a/src/blahaj/option_parser.cr +++ b/src/blahaj/option_parser.cr @@ -31,14 +31,14 @@ module Blahaj blahaj -s -b neofetch | blahaj -f gay blahaj -f lesbian -m 4 - blahaj -- -w /etc/os-release + blahaj -w /etc/os-release #{"Arguments:".colorize(:light_blue)} BANNER parser.on("-b", "--background", "Color the background") { CLI["background"] = true } - parser.on("-f", "--flag", "Return a flag") { CLI["flag"] = true } parser.on("-s", "--shark", "Shork") { CLI["shark"] = true } + parser.on("-f", "--flag", "Return a flag") { CLI["flag"] = true } parser.on("-i", "--individual", "Color individual characters") { CLI["individual"] = true } parser.on("-w", "--words", "Color individual words") { CLI["words"] = true } parser.on("-m MULTIPLIER", "--multiplier=MULTIPLIER", "Multiplier for the flag size (-f)") do |multiplier|