attnmd 0.3.4 → 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.
Files changed (3) hide show
  1. package/README.md +11 -6
  2. package/bin/attn.js +8 -0
  3. 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
- ### Primary: crates.io
47
+ ### Homebrew
48
48
 
49
49
  ```bash
50
- cargo install attn
50
+ brew install lightsofapollo/attn/attn
51
51
  ```
52
52
 
53
- ### Alternative: npm package (testing path)
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,6 +305,10 @@ for arg in "$@"; do
305
305
  ;;
306
306
  esac
307
307
  done
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
308
312
  exec /usr/bin/open "$APP_LINK" --args "\${RESOLVED_ARGS[@]}"
309
313
  `
310
314
  : `#!/usr/bin/env bash
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attnmd",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "A beautiful markdown viewer that launches from the CLI",
5
5
  "license": "MIT",
6
6
  "repository": {