lade 0.11.0

Automatically load secrets from your preferred vault as environment variables, and clear them once your shell command is over.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

function preexec_lade --on-event fish_preexec
    if [ $argv = "source off.fish" ]
        return
    end
    set --global LADE "$argv"
    eval "$(lade set $argv)"
end

function postexec_lade --on-event fish_postexec
    # $argv also exists here in fish, but keeping LADE for consistency
    if [ "$LADE" = "source on.fish" ]
        return
    end
    eval "$(lade unset $argv)"
    set --global --erase LADE
end