Skip to content

Commit f741fa5

Browse files
committed
Make --help use glow to display the README
1 parent a43f223 commit f741fa5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkgm.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ const parsedArgs = parseArgs(Deno.args, {
3737
});
3838

3939
if (parsedArgs.help) {
40-
console.log("https://github.com/pkgxdev/pkgm");
40+
const { code } = await new Deno.Command("pkgx", {
41+
args: [
42+
"glow",
43+
"https://raw.githubusercontent.com/pkgxdev/pkgm/refs/heads/main/README.md",
44+
],
45+
}).spawn().status;
46+
Deno.exit(code);
4147
} else if (parsedArgs.version) {
4248
console.log("pkgm 0.0.0+dev");
4349
} else {

0 commit comments

Comments
 (0)