#!/usr/bin/env fish
mise env -s fish | source

set -l g (set_color a6d189)
set -l b (set_color 8caaee)
set -l s '#8caaee'
set -l n (set_color normal)

gum style --foreground "$s" --border double --padding "1 2" --margin "1" "fnox — secrets dans le repo"
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo "$g❯$b cat fnox.toml$n"
cat fnox.toml
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo
echo "$g❯$b fnox set DEMO_SECRET \"mon shell est trop beau\"$n"
fnox set DEMO_SECRET "mon shell est trop beau"
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo
echo "$g❯$b cat fnox.toml$n"
cat fnox.toml
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo
echo "$g❯$b fnox list$n"
fnox list
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo
echo "$g❯$b fnox exec -- sh -c 'echo \$DEMO_SECRET'$n"
fnox exec -- sh -c 'echo $DEMO_SECRET'
