Skip to content

Commit

Permalink
feat(cli): improve prompt style for better clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Oct 21, 2022
1 parent 8d940c8 commit 31b2773
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 89 deletions.
111 changes: 34 additions & 77 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ exclude = ["dist/**/*", "docs/**/*"]
xshell = "0.2.2"

[dependencies]
async-trait = "0.1.57"
async-trait = "0.1.58"
bytes = "1.2.1"
clap = { version = "4.0.15", features = ["cargo", "derive"] }
clap = { version = "4.0.18", features = ["cargo", "derive"] }
confy = "0.5.0"
console = "0.15.2"
dialoguer = { version = "0.10.2", features = ["fuzzy-select"] }
dirs-next = "2.0.0"
futures = { version = "0.3.24", default-features = false, features = ["std"] }
futures = { version = "0.3.25", default-features = false, features = ["std"] }
indoc = "1.0.7"
is-root = "0.1.2"
itertools = "0.10.5"
Expand All @@ -46,7 +46,7 @@ regex = { version = "1.6.0", default-features = false, features = [
"perf",
"unicode-perl",
] }
serde = { version = "1.0.145", features = ["derive"] }
serde = { version = "1.0.146", features = ["derive"] }
tap = "1.0.1"
thiserror = "1.0.37"
tokio = { version = "1.21.2", features = [
Expand Down
8 changes: 4 additions & 4 deletions crates/pacaptr-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ description = "Implementation of several macros used in pacaptr."
proc-macro = true

[dependencies]
anyhow = "1.0.65"
anyhow = "1.0.66"
itertools = "0.10.5"
litrs = "0.2.3"
once_cell = "1.15.0"
proc-macro2 = "1.0.46"
proc-macro2 = "1.0.47"
quote = "1.0.21"
regex = "1.6.0"
syn = "1.0.102"
tabled = "0.9.0"
syn = "1.0.103"
tabled = "0.10.0"
2 changes: 1 addition & 1 deletion src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ impl Cmd {
prompt(
"Proceed",
"with the previous command?",
&["yes", "all", "no"],
&["Yes", "All", "No"],
)
})?;
Ok(match answer {
Expand Down
4 changes: 2 additions & 2 deletions src/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ pub(crate) fn question_theme(prompt: impl Display) -> impl dialoguer::theme::The
style::QUESTION.apply_to(prompt),
indent = PROMPT_INDENT,
));
let active_item_prefix = style(">".into()).for_stderr();
ColorfulTheme {
success_prefix: prompt_prefix.clone(),
error_prefix: prompt_prefix.clone().red(),
prompt_prefix,
prompt_style: Style::new(),
prompt_suffix: style(String::new()),
active_item_prefix,
active_item_prefix: style(">".into()).bold().for_stderr(),
active_item_style: Style::new().bold(),
..ColorfulTheme::default()
}
}
2 changes: 1 addition & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version = "0.17.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.65"
anyhow = "1.0.66"
const_format = "0.2.30"
pico-args = "0.5.0"
regex = { version = "1.6.0", default-features = false, features = [
Expand Down

0 comments on commit 31b2773

Please sign in to comment.