• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pkgxdev / pkgx / 12812686100

16 Jan 2025 03:56PM UTC coverage: 1.631% (-87.9%) from 89.526%
12812686100

push

github

web-flow
Merge pull request #1079 from pkgxdev/pkgx--quiet

`pkgx --quiet` suppresses resolving message

0 of 8 new or added lines in 2 files covered. (0.0%)

639 existing lines in 15 files now uncovered.

13 of 797 relevant lines covered (1.63%)

0.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/crates/cli/src/help.rs
1
use regex::Regex;
2

UNCOV
3
fn dim(input: &str) -> String {
×
4
    // Placeholder function for "dim" styling
UNCOV
5
    format!("\x1b[2m{}\x1b[0m", input)
×
6
}
7

UNCOV
8
pub fn usage() -> String {
×
UNCOV
9
    let usage = r##"
×
10
usage:
11
  pkgx [+pkg@x.y…] <program|path> [--] [arg…]
12

13
examples:
14
  $ pkgx gum format "# hello world" "sup?"
15
  $ pkgx node@18 --eval 'console.log("hello world")'
16
  $ pkgx +openssl cargo build
17

18
flags:
19
  -q, --quiet   # supresses brief informational messages
20
  -s, --silent  # no chat. no errors. just execute.
21
  --version
22

23
more:
24
  $ open https://docs.pkgx.sh
25
"##;
26

UNCOV
27
    let usage = usage
×
UNCOV
28
        .replace('[', &dim("["))
×
UNCOV
29
        .replace(']', &dim("]"))
×
UNCOV
30
        .replace('<', &dim("<"))
×
UNCOV
31
        .replace('>', &dim(">"))
×
UNCOV
32
        .replace('$', &dim("$"))
×
UNCOV
33
        .replace('|', &dim("|"));
×
34

UNCOV
35
    let re = Regex::new("(?m) #.*$").unwrap();
×
36

UNCOV
37
    re.replace_all(&usage, |caps: &regex::Captures| {
×
UNCOV
38
        dim(caps.get(0).unwrap().as_str())
×
39
    })
40
    .to_string()
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc