add input timeout
This commit is contained in:
parent
b8de2dd0b8
commit
5152598804
@ -6,6 +6,9 @@
|
||||
- ℹ️ - Information
|
||||
- ♻️ - Edited
|
||||
|
||||
## 0.2.5b - [31/07/2022]
|
||||
- ➕ - Added input timeout
|
||||
|
||||
## 0.2.4 - [26/07/2022]
|
||||
- ➕ - Added hint for fix file permissions error.
|
||||
- ℹ️ - Crystal version raise to 1.5.0 for NO_COLOR support
|
||||
|
@ -3,17 +3,16 @@
|
||||
![License](https://img.shields.io/badge/license-public_domain-brightgreen?style=for-the-badge&color=ffcc68)
|
||||
![NO_COLOR](https://img.shields.io/badge/no__color-support-brightgreen?style=for-the-badge&color=d44e52)
|
||||
![Emoji](https://img.shields.io/badge/emoji-like-brightgreen?style=for-the-badge&color=ec8a4b)
|
||||
|
||||
![pmng](./.docs/logo.png)
|
||||
[![Download](https://img.shields.io/badge/Download-brightgreen?style=for-the-badge&color=38607c)](#download)
|
||||
|
||||
## 📷 Screenshots
|
||||
|
||||
![pmng](./.docs/logo.png)
|
||||
|
||||
![Passwords](./.docs/passwords.png)
|
||||
|
||||
## 💾 Download
|
||||
|
||||
**Coming soon**
|
||||
|
||||
- [Linux x86_64](https://me.a2s.su/.../)
|
||||
- [Linux x86](https://me.a2s.su/.../)
|
||||
- [Linux x86_64 musl](https://me.a2s.su/.../)
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: pmng
|
||||
version: 0.2.4
|
||||
version: 0.2.5
|
||||
|
||||
authors:
|
||||
- Alexander Popov <iiiypuk@iiiypuk.me>
|
||||
|
@ -22,7 +22,7 @@ class Password
|
||||
property update : Int32
|
||||
end
|
||||
|
||||
VERSION = "0.2.4"
|
||||
VERSION = "0.2.5b"
|
||||
PASSWORD_FILE_PATH = "#{ENV["HOME"]}/.pwd.yml"
|
||||
ASCII_LOGO = "
|
||||
██████╗ ███╗ ███╗███╗ ██╗ ██████╗
|
||||
@ -119,7 +119,12 @@ while loop
|
||||
print " for exit)\n".colorize(:white).mode(:bold)
|
||||
print "> ".colorize(:green).mode(:bold)
|
||||
|
||||
password_string = gets
|
||||
begin # IO::TimeoutError
|
||||
STDIN.read_timeout = 60 # 1 minute
|
||||
password_string = STDIN.gets
|
||||
rescue
|
||||
loop = false
|
||||
end
|
||||
|
||||
if password_string.to_s == ":q"
|
||||
# if ':q' to close program
|
||||
|
Loading…
Reference in New Issue
Block a user