@henryqw/pi-open-in 0.2.0 → 0.2.2

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
@@ -25,6 +25,8 @@ pi install npm:@henryqw/pi-open-in
25
25
  }
26
26
  ```
27
27
 
28
+ The command is split on whitespace; tokens cannot contain spaces (no quoting). Use a wrapper script for executables in spaced paths.
29
+
28
30
  ## Remove
29
31
 
30
32
  ```bash
@@ -41,10 +41,11 @@ async function saveCommand(command: string): Promise<void> {
41
41
  }
42
42
 
43
43
  export default function openInExtension(pi: ExtensionAPI): void {
44
- const command = configuredCommand();
45
-
44
+ // ponytail: static description so it never goes stale after /set-open-in
45
+ // (handler re-reads config per invocation); per-token whitespace splitting,
46
+ // tokens with spaces not supported.
46
47
  pi.registerCommand("open", {
47
- description: `Open the current path with \`${command} <current-path>\``,
48
+ description: "Open the current path with the configured command",
48
49
  handler: async (_args, ctx) => {
49
50
  const [executable, ...args] = configuredCommand().split(/\s+/);
50
51
  const result = await pi.exec(executable, [...args, ctx.cwd]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-open-in",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Open the current Pi working directory with a configurable command.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "scripts": {
26
26
  "test": "node --test test/*.test.ts",
27
- "typecheck": "tsc --noEmit --allowImportingTsExtensions --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck extensions/open.ts test/*.test.ts",
27
+ "typecheck": "tsc --noEmit --allowImportingTsExtensions --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck extensions/open.ts",
28
28
  "pack:check": "npm pack --dry-run"
29
29
  },
30
30
  "peerDependencies": {