From 198914d3fd9443ca23fd14b1dae4a8c60da42bcd Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 20 Jan 2024 15:49:42 +0100 Subject: [PATCH] templatize upgrade function --- .../fish/private_functions/{upgrade.fish => upgrade.fish.tmpl} | 2 ++ 1 file changed, 2 insertions(+) rename dot_config/fish/private_functions/{upgrade.fish => upgrade.fish.tmpl} (87%) diff --git a/dot_config/fish/private_functions/upgrade.fish b/dot_config/fish/private_functions/upgrade.fish.tmpl similarity index 87% rename from dot_config/fish/private_functions/upgrade.fish rename to dot_config/fish/private_functions/upgrade.fish.tmpl index 2179092..5152ead 100644 --- a/dot_config/fish/private_functions/upgrade.fish +++ b/dot_config/fish/private_functions/upgrade.fish.tmpl @@ -6,6 +6,8 @@ function upgrade --wraps=topgrade if not bw unlock --check set -x BW_SESSION (bw unlock --raw) end + {{ if get . "sudo" }} sudo ls >/dev/null + {{ end }} topgrade $argv end