dotfiles
bugabingas dorkfiles
owned by bugabinga
fix(nushell): load wezterm integration from modules
c7fdf9b60c1d8b8c576cab93b95cc34b60d8dda1
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
Browse filesCompare with HEAD
Changed files (2)
nushell/modules/wezterm_integration.nu
Addednew file mode 100644 20 + def __wezterm_set_user_var [name: string, value: string] {
21 + let b64 = (
$value | encode base64)
22 + let osc = (ansi --osc $
"1337;SetUserVar=($name)=($b64)=")
23 + print -n (
$osc + (char bel))
28 + def __wezterm_osc7 [] {
29 + let hostname = (hostname)
30 + let cwd = (
$env.PWD | str replace --all
'\\' '/')
31 + let osc = (ansi --osc $
"7;file://($hostname)($cwd)")
32 + print -n (
$osc + (char bel))
40 + $env.config.hooks.pre_execution = (
41 + $env.config.hooks.pre_execution 46 + let cmd = (commandline)
47 + __wezterm_set_user_var
"WEZTERM_PROG" $cmd 57 + $env.config.hooks.pre_prompt = (
58 + $env.config.hooks.pre_prompt 63 + __wezterm_set_user_var
"WEZTERM_PROG" "" 74 + let current_pwd_hooks = (
$env.config.hooks.env_change | get --optional PWD | default [])
75 + $env.config.hooks.env_change = (
$env.config.hooks.env_change | merge {
76 + PWD: (
$current_pwd_hooks | append {
78 + code: { __wezterm_osc7 }
nushell/wezterm_integration.nu
Deleteddeleted file mode 10064420 - def __wezterm_set_user_var [name: string, value: string] {
21 - let b64 = (
$value | encode base64)
22 - let osc = (ansi --osc $
"1337;SetUserVar=($name)=($b64)=")
23 - print -n (
$osc + (char bel))
28 - def __wezterm_osc7 [] {
29 - let hostname = (hostname)
30 - let cwd = (
$env.PWD | str replace --all
'\\' '/')
31 - let osc = (ansi --osc $
"7;file://($hostname)($cwd)")
32 - print -n (
$osc + (char bel))
40 - $env.config.hooks.pre_execution = (
41 - $env.config.hooks.pre_execution 46 - let cmd = (commandline)
47 - __wezterm_set_user_var
"WEZTERM_PROG" $cmd 57 - $env.config.hooks.pre_prompt = (
58 - $env.config.hooks.pre_prompt 63 - __wezterm_set_user_var
"WEZTERM_PROG" "" 74 - let current_pwd_hooks = (
$env.config.hooks.env_change | get --optional PWD | default [])
75 - $env.config.hooks.env_change = (
$env.config.hooks.env_change | merge {
76 - PWD: (
$current_pwd_hooks | append {
78 - code: { __wezterm_osc7 }