Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
05e1bd48e0 | |||
6a9bbe664a | |||
b1c32ff6f0 |
4 changed files with 13 additions and 12 deletions
|
@ -46,6 +46,13 @@ using an AUR package manager such as <a href="https://github.com/Morganamilo/par
|
|||
Install the package using Cargo with the command <code>cargo install pride-term</code>.
|
||||
</details>
|
||||
|
||||
### Man Page
|
||||
|
||||
<details>
|
||||
<summary>Section 6</summary>
|
||||
Copy <code>man/pride.6</code> into <code>/usr/share/man/man6/</code>.
|
||||
</details>
|
||||
|
||||
## Libraries
|
||||
|
||||
- [pico-args](https://crates.io/crates/pico-args) — argument parsing
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//! flags that require more complex rendering than just scaling colored stripes
|
||||
|
||||
use termion::{
|
||||
terminal_size,
|
||||
|
||||
color::{ Bg, Rgb }
|
||||
};
|
||||
use termion::color::{ Bg, Rgb };
|
||||
|
||||
use crate::{
|
||||
color::*,
|
||||
|
|
|
@ -6,13 +6,11 @@ use std::io::{
|
|||
};
|
||||
|
||||
use termion::{
|
||||
terminal_size,
|
||||
|
||||
clear,
|
||||
color::{ Bg, Fg, Rgb },
|
||||
cursor,
|
||||
input::TermRead,
|
||||
raw::{ RawTerminal, IntoRawMode }
|
||||
raw::IntoRawMode
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
use std::process::exit;
|
||||
|
||||
pub fn unmatched_flag(target: String) {
|
||||
println!("pride: no flag {target}");
|
||||
eprintln!("pride: no flag {target}");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
pub fn size_missing() {
|
||||
println!("pride: size flag requires a value");
|
||||
eprintln!("pride: size flag requires a value");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
pub fn size_error(value: &str) {
|
||||
println!("pride: size '{value}' is invalid");
|
||||
eprintln!("pride: size '{value}' is invalid");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
pub fn too_small(width: u16, height: u16) {
|
||||
println!("pride: this flag must be bigger than {width}x{height}");
|
||||
eprintln!("pride: this flag must be bigger than {width}x{height}");
|
||||
exit(3);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue