From 554f8a4db80fe1b79d9af29e8afd378d5ab63486 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Sun, 2 May 2021 00:26:45 +0200 Subject: [PATCH] feat: add direnv support --- profile.d/direnv | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 profile.d/direnv diff --git a/profile.d/direnv b/profile.d/direnv new file mode 100644 index 0000000..5d47ece --- /dev/null +++ b/profile.d/direnv @@ -0,0 +1,24 @@ +#!/bin/bash + +if ( which asdf &> /dev/null ) +then + + if ( asdf which direnv &> /dev/null ) + then + + # Hook direnv into your shell. + eval "$(asdf exec direnv hook bash)" + + # A shortcut for asdf managed direnv. + direnv() { asdf exec direnv "$@"; } + + return + fi + +elif ( which direnv &> /dev/null ) +then + + # Hook direnv into your shell. + eval "$(direnv hook bash)" + +fi