From 237b811a8020c810b5b3d651e291b3b0eb5439ca Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Fri, 8 Apr 2022 16:23:14 +0300 Subject: [PATCH] =?UTF-8?q?Added=20clear=20terminal=20by=20close=20program?= =?UTF-8?q?=20=F0=9F=92=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HISTORY.md | 1 + src/pmng.cr | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 91c2820..5272499 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,6 +7,7 @@ - ♻️ - Edited ## 0.2.2 - [08/04/2022] +- ➕ - Added clear terminal by close program - ➕ - Add to prompt help helper - ➕ - Added emoji to output - ♻️ - Fixed URL color & style output diff --git a/src/pmng.cr b/src/pmng.cr index 93fe4d0..82d30eb 100644 --- a/src/pmng.cr +++ b/src/pmng.cr @@ -30,6 +30,7 @@ begin parser.banner = "The very simple password manager for humans\n" parser.on "-v", "--version", "Show version" do + puts "The very simple password manager for humans." puts "Version #{VERSION}" exit(0) end @@ -44,7 +45,7 @@ begin exit(0) end parser.on "-t", "--unixtime", "Return local timestamp" do - puts Time.local.to_unix.colorize(:yellow) + puts Time.local.to_unix.colorize(:yellow).mode(:bold) exit(0) end end @@ -94,6 +95,7 @@ while loop # if ':q' to close program if password_string.to_s == ":q" + system "clear" puts "Bye! 👋🏻" exit(0) # if puts empty, retry prompt