fish: add tmux-refresh-env function

This commit is contained in:
Daniel Lundin 2024-09-14 10:32:23 +02:00
parent e6002533da
commit 7efb24059c
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI

View file

@ -16,6 +16,18 @@
]; ];
functions = { functions = {
tmux-refresh-env = {
description = "Refresh environment variables from tmux session";
body = ''
for var in (tmux show-environment | string match -rv '^-')
set -l parts (string split -m 1 '=' $var)
if test (count $parts) -eq 2
set -Ux $parts[1] $parts[2]
end
end
'';
};
kubectl = { kubectl = {
description = "Wraps kubectl in grc"; description = "Wraps kubectl in grc";
wraps = "kubectl"; wraps = "kubectl";