lade 0.14.1

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"
    source (lade set $argv | psub)
end

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