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