forked from wez/wezterm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reference material for plugin module
Addresses wez#6177
- Loading branch information
1 parent
aa18cbe
commit c46d99f
Showing
6 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# `wezterm.plugin` module | ||
|
||
{{since('20230320-124340-559cb7b0')}} | ||
|
||
The `wezterm.plugin` module provides functions to manage Wezterm plugins. | ||
|
||
## Available functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# `wezterm.plugin` module | ||
|
||
{{since('20230320-124340-559cb7b0')}} | ||
|
||
The `wezterm.plugin` module provides functions to manage Wezterm plugins. | ||
|
||
## Available functions | ||
|
||
|
||
- [list](list.md) | ||
- [require](require.md) | ||
- [update_all](update_all.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# list function | ||
|
||
{{since('20230320-124340-559cb7b0')}} | ||
|
||
Will return a table array listing all the plugin repos in the plugin directory | ||
|
||
Each entry has three fields: | ||
|
||
* `url`: The URL of the plugin repo, as provided to the `wezterm.plugin.require` function | ||
* `component`: The encoded name of the plugin, derived from the repo URL | ||
* `plugin_dir`: The absolute location of the plugin checkout in the Wexterm runtime directory. Use this to set the plugin path if needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Function require | ||
|
||
{{since('20230320-124340-559cb7b0')}} | ||
|
||
Will clone the plugin repo if it doesn't already | ||
exist and store it in the runtime dir under `plugins/NAME` where | ||
`NAME` is derived from the repo URL. Once cloned, the repo is | ||
NOT automatically updated when `require` is called again. | ||
|
||
The function takes a single string parameter, the Git repo URL | ||
|
||
Only HTTP(S) or local filesystem repos are allowed for the git URL. | ||
|
||
```lua | ||
local remote_plugin = wezterm.plugin.require 'https://github.com/owner/repo' | ||
local local_plugin = | ||
wezterm.plugin.require 'file:///Users/developer/projects/my.Plugin' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# update_all function | ||
|
||
{{since('20230320-124340-559cb7b0')}} | ||
|
||
Attempt to fast-forward or `pull --rebase` each of the repos in the plugin directory. | ||
|
||
!!! Note | ||
|
||
The configuration is **not** reloaded afterwards; the user will need to do that themselves. | ||
|
||
<!-- #TODO How can a user reload the config? --> | ||
|