You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,3 +59,57 @@ Uninstall a plugin using the following command:
59
59
```shell
60
60
$ pba-cli plugin uninstall <plugin name>
61
61
```
62
+
63
+
### Custom scripts
64
+
65
+
To create a custom script that registers in the CLI, create an executable anywhere on your `PATH` that follows the naming convention `minimal-pba-cli-<name>`.
66
+
This script will be registered as a command named `<name>` in the CLI.
67
+
68
+
As an example, create a script named `minimal-pba-cli-hello` with the following content:
69
+
70
+
```shell
71
+
#!/usr/bin/env sh
72
+
73
+
echo"Hello, world!"
74
+
```
75
+
76
+
Make the script executable:
77
+
78
+
```shell
79
+
$ chmod +x minimal-pba-cli-hello
80
+
```
81
+
82
+
Now, if the script is located in a directory on your `PATH`, you can run it using the following command:
83
+
84
+
```shell
85
+
$ pba-cli hello
86
+
Hello, world!
87
+
```
88
+
89
+
Scripts can be written in any language, as long as they are executable and follow the naming convention:
0 commit comments