Skip to content

Commit 765ce7d

Browse files
committed
Fixes #37
1 parent 09842f7 commit 765ce7d

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,16 @@ v20.19.0
6161
6262
`pkgm` installs `dev`-aware packages to `/usr/local/bin`. Provided you have
6363
`/usr/local/bin/dev` installed and you have activated `dev` in your project
64-
directories the `node` that is invoked is swapped out *when invoked*.
64+
directories the `node` that is invoked is swapped out _when invoked_.
6565

6666
This is the recommended way to use `dev` because it works everywhere and not
6767
just the terminal.
6868

6969
## `dev` via Shellcode
7070

71-
Shellcode works *as well* and is your preference. It has notable caveats
72-
with regard to use in tools like editors. It also requires you to add
73-
shellcode to your `shell.rc` files and thus is more intrusive (depending on
74-
your outlook).
71+
Shellcode works _as well_ and is your preference. It has notable caveats with
72+
regard to use in tools like editors. It also requires you to add shellcode to
73+
your `shell.rc` files and thus is more intrusive (depending on your outlook).
7574

7675
```sh
7776
pkgx dev integrate

app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const parsedArgs = parseArgs(Deno.args, {
2121
q: "quiet",
2222
},
2323
collect: ["quiet"],
24-
boolean: ["help", "version", "shellcode"],
24+
boolean: ["help", "version", "shellcode", "quiet"],
2525
default: {
2626
"dry-run": false,
2727
},

src/shellcode().ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export default function shellcode() {
1313
_pkgx_chpwd_hook() {
1414
if ! type _pkgx_dev_try_bye >/dev/null 2>&1 || _pkgx_dev_try_bye; then
1515
dir="$PWD"
16-
while [ "$dir" != "/" ]; do
16+
while [ "$dir" != / -a "$dir" != . ]; do
1717
if [ -f "${datadir()}/$dir/dev.pkgx.activated" ]; then
18-
eval "$(${dev_cmd})"
18+
eval "$(${dev_cmd})" "$dir"
1919
break
2020
fi
2121
dir="$(dirname "$dir")"

0 commit comments

Comments
 (0)