Skip to content

Commit 20d1efc

Browse files
committed
Update --help
1 parent 3c541a6 commit 20d1efc

2 files changed

Lines changed: 17 additions & 29 deletions

File tree

README.md

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
> [!INFO]
88
> You just want your shit to work and we want that too. We pride ourselves
99
> on packaging things as well as possible because we want you to change the
10-
> world with what you build upon the *best* base we can give you.
10+
> world with what you build upon the _best_ base we can give you.
1111
1212
 
1313

@@ -68,7 +68,8 @@ Python 2.7.18
6868
> [!TIP]
6969
>
7070
> We have gone to good lengths to make `pkgx` (and the packages it installs)
71-
> work with almost nothing else installed, making it ideal for tiny containers.
71+
> work with almost nothing else installed, making it ideal for tiny
72+
> containers.
7273
7374
</details>
7475
<details><summary>Windows</summary><br>
@@ -141,8 +142,9 @@ pkgx shellcheck
141142
</details>
142143
<details><summary>Editors</summary><br>
143144

144-
Use [`dev`][dev]; a separate tool that uses the pkgx primitives to automatically
145-
determine and utilize your dependencies based on your project’s keyfiles.
145+
Use [`dev`][dev]; a separate tool that uses the pkgx primitives to
146+
automatically determine and utilize your dependencies based on your project’s
147+
keyfiles.
146148

147149
```sh
148150
$ cd myproj
@@ -271,23 +273,6 @@ pkgx uvx cowsay "Run Python (PyPi) programs with `uvx`" # or pipx
271273
pkgx bunx cowsay "Run JavaScript (NPM) programs tools with `bunx`" # or `npx`
272274
```
273275
274-
## Magic
275-
276-
It can be fun to add magic to your shell:
277-
278-
```sh
279-
# add to ~/.zshrc
280-
command_not_found_handler() {
281-
pkgx -- "$@"
282-
}
283-
```
284-
285-
Thus if you type `gh` and it’s not installed pkgx will magically run it as
286-
though it was installed all along.
287-
288-
> [!NOTE]
289-
> Bash is the same function but drop the `r` from the end of the name.
290-
291276
&nbsp;
292277
293278
# Further Reading
@@ -324,16 +309,17 @@ exported.
324309
325310
## `pkgx install`
326311
327-
We now provide [`pkgm`][pkgm] but if you miss the leanness of “stubs” we provide
328-
a [`mash`] script to create stubs in `/usr/local/bin`:
312+
We now provide [`pkgm`][pkgm] which fully installs `pkgx` packages to
313+
`/usr/local/`.
314+
315+
If you miss the leanness of pkgx^1 “shims then use `pkgm shim`.
329316
330317
```sh
331-
$ pkgx mash pkgx/stub git
332-
created stub: /usr/local/bin/git
318+
$ pkgm shim git
319+
created shim: ~/.local/bin/git
333320
334-
$ cat /usr/local/bin/git
335-
#!/bin/sh
336-
exec pkgx git "$@"
321+
$ cat ~/.local/bin/git
322+
#!/usr/bin/env -S pkgx -q! git
337323
```
338324
339325
&nbsp;

crates/cli/src/help.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ examples:
1515
$ pkgx node@18 --eval 'console.log("hello world")'
1616
$ pkgx +openssl cargo build
1717
18+
modes:
19+
$ pkgx -Q bun # could you run `bun`? (--query)
20+
1821
flags:
1922
-q, --quiet # suppress brief informational messages
2023
-qq, --silent # no chat. no errors. just execute.
21-
-!, --shebang # drops shebang added arg0 for faster pkgx stubs
2224
-v, --version
2325
2426
more:

0 commit comments

Comments
 (0)