attnmd 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -6
- package/bin/attn.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,13 +44,13 @@ attn is a **single <20MB binary**. It forks to background as a daemon, opens a n
|
|
|
44
44
|
|
|
45
45
|
## Install
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### Homebrew
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
|
|
50
|
+
brew install lightsofapollo/attn/attn
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
###
|
|
53
|
+
### npm
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
npx attnmd
|
|
@@ -58,15 +58,20 @@ npx attnmd
|
|
|
58
58
|
npm install -g attnmd && attn
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
### From source
|
|
61
|
+
### From source (crates.io)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
cargo install attn
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### From source (git)
|
|
62
68
|
|
|
63
69
|
```bash
|
|
64
70
|
git clone https://github.com/lightsofapollo/attn.git
|
|
65
71
|
cd attn && cargo install --path .
|
|
66
72
|
```
|
|
67
73
|
|
|
68
|
-
Requires Rust 1.85+.
|
|
69
|
-
For npm installs, Node 18+ is required.
|
|
74
|
+
Requires Rust 1.85+. For npm installs, Node 18+ is required.
|
|
70
75
|
|
|
71
76
|
## Usage
|
|
72
77
|
|
package/bin/attn.js
CHANGED
|
@@ -305,7 +305,11 @@ for arg in "$@"; do
|
|
|
305
305
|
;;
|
|
306
306
|
esac
|
|
307
307
|
done
|
|
308
|
-
|
|
308
|
+
# No path arg provided — default to cwd so the app doesn't open at /
|
|
309
|
+
if [ "$PATH_RESOLVED" -eq 0 ]; then
|
|
310
|
+
RESOLVED_ARGS+=("$(pwd)")
|
|
311
|
+
fi
|
|
312
|
+
exec /usr/bin/open "$APP_LINK" --args "\${RESOLVED_ARGS[@]}"
|
|
309
313
|
`
|
|
310
314
|
: `#!/usr/bin/env bash
|
|
311
315
|
set -euo pipefail
|
|
@@ -353,6 +357,10 @@ function resolvePathArgs(args) {
|
|
|
353
357
|
resolved.push(arg);
|
|
354
358
|
}
|
|
355
359
|
}
|
|
360
|
+
// No path arg provided — default to cwd so the app doesn't open at /
|
|
361
|
+
if (!pathResolved) {
|
|
362
|
+
resolved.push(process.cwd());
|
|
363
|
+
}
|
|
356
364
|
return resolved;
|
|
357
365
|
}
|
|
358
366
|
|