We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
open
1 parent fb7d3e6 commit 928fcc7Copy full SHA for 928fcc7
crates/cli/src/help.rs
@@ -6,6 +6,13 @@ fn dim(input: &str) -> String {
6
}
7
8
pub fn usage() -> String {
9
+ #[cfg(target_os = "macos")]
10
+ let open = "open";
11
+ #[cfg(windows)]
12
+ let open = "foo";
13
+ #[cfg(target_os = "linux")]
14
+ let open = "xdg-open";
15
+
16
let usage = r##"
17
usage:
18
pkgx [[email protected]…] <program|path> [--] [arg…]
@@ -24,7 +31,7 @@ flags:
24
31
-v, --version
25
32
26
33
more:
27
- $ open https://docs.pkgx.sh
34
+ $ OPEN https://docs.pkgx.sh
28
35
"##;
29
36
30
37
let usage = usage
@@ -33,7 +40,8 @@ more:
40
.replace('<', &dim("<"))
41
.replace('>', &dim(">"))
42
.replace('$', &dim("$"))
- .replace('|', &dim("|"));
43
+ .replace('|', &dim("|"))
44
+ .replace("OPEN", open);
45
38
46
let re = Regex::new("(?m) #.*$").unwrap();
39
47
0 commit comments