@laabroms/alias-cli 0.1.3 → 0.1.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 CHANGED
@@ -142,4 +142,4 @@ PRs welcome! Please open an issue first to discuss what you'd like to change.
142
142
 
143
143
  ## License
144
144
 
145
- MIT © [Lucas Aabroms](https://github.com/laabroms)
145
+ MIT © [Lucas Abroms](https://github.com/laabroms)
package/dist/cli.js CHANGED
@@ -374,7 +374,7 @@ function App() {
374
374
  "\x1B[2m\u26A1 Want aliases to auto-reload when you quit? Run this once:\x1B[0m\n"
375
375
  );
376
376
  console.log(
377
- `\x1B[7;36m echo '\\nalias-cli() { command alias-cli; ${sourceCommand}; }' >> ${fileName} && ${sourceCommand} \x1B[0m
377
+ `\x1B[7;36m echo '\\nalias-cli() { command alias-cli "$@"; ${sourceCommand}; }' >> ${fileName} && ${sourceCommand} \x1B[0m
378
378
  `
379
379
  );
380
380
  }
@@ -513,4 +513,12 @@ function App() {
513
513
  }
514
514
 
515
515
  // src/cli.tsx
516
+ import { createRequire } from "module";
517
+ var require2 = createRequire(import.meta.url);
518
+ var pkg = require2("../package.json");
519
+ var args = process.argv.slice(2);
520
+ if (args.includes("--version") || args.includes("-v")) {
521
+ console.log(pkg.version);
522
+ process.exit(0);
523
+ }
516
524
  render(/* @__PURE__ */ React9.createElement(App, null));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laabroms/alias-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Interactive TUI for managing shell aliases",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -8,7 +8,8 @@
8
8
  "alias-cli": "dist/cli.js"
9
9
  },
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "package.json"
12
13
  ],
13
14
  "scripts": {
14
15
  "build": "tsup",