mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 02:25:28 +03:00
9397f2a2db
This builds on the new lua event handler plumbing added
in ccea650a93
to co-opt
the default URI opening action:
```lua
wezterm.on("open-uri", function(uri)
if uri:find("jira") then
wezterm.log_error("do something with jira")
wezterm.run_child_process({
"wezterm",
"start",
"--",
"jira",
"view",
extract_task_from_uri(uri)
})
-- prevent the default action from opening in a browser
return false
else
-- log but allow the uri to be opened in the browser
wezterm.log_error("clicken " .. uri)
end
end)
```
This doesn't allow exactly the sketched out option from
issue #223 to be implemented, but may be close enough
to be useful.
refs: #223
refs: #225
39 lines
958 B
TOML
39 lines
958 B
TOML
[package]
|
|
name = "config"
|
|
version = "0.1.0"
|
|
authors = ["Wez Furlong <wez@wezfurlong.org>"]
|
|
edition = "2018"
|
|
build = "build.rs"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[build-dependencies]
|
|
vergen = "3"
|
|
|
|
[dev-dependencies]
|
|
pretty_env_logger = "0.4"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0"
|
|
bstr = "0.2"
|
|
dirs = "2.0"
|
|
filenamegen = "0.2"
|
|
hostname = "0.3"
|
|
lazy_static = "1.4"
|
|
libc = "0.2"
|
|
luahelper = { path = "../luahelper" }
|
|
log = "0.4"
|
|
# file change notification
|
|
notify = "4.0"
|
|
portable-pty = { path = "../pty", features = ["serde_support"]}
|
|
serde = {version="1.0", features = ["rc", "derive"]}
|
|
smol = "1.2"
|
|
promise = { path = "../promise" }
|
|
termwiz = { path = "../termwiz" }
|
|
toml = "0.5"
|
|
wezterm-term = { path = "../term", features=["use_serde"] }
|
|
mlua = {version="0.4", features=["vendored", "lua54", "async", "send"]}
|
|
|
|
[target."cfg(windows)".dependencies]
|
|
winapi = { version = "0.3", features = ["winuser"]}
|