@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 +2 -0
- package/extensions/open.ts +4 -3
- package/package.json +2 -2
package/README.md
CHANGED
package/extensions/open.ts
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
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.
|
|
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
|
|
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": {
|