From 7370e1898f5db116082dec7bd5afa6b3e3019db6 Mon Sep 17 00:00:00 2001 From: crater2150 Date: Sun, 11 Jan 2026 14:05:25 +0100 Subject: [PATCH] envwrap: create new wrapper if called directly --- misc/envwrap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/misc/envwrap b/misc/envwrap index e840c5e..e95cbb4 100755 --- a/misc/envwrap +++ b/misc/envwrap @@ -1,6 +1,12 @@ #!/bin/zsh source ${$(realpath "$0"):h:h}/lib/next-in-path.zsh program="${0:a:t}" +if [[ $program == "envwrap" ]]; then + echo "Creating wrapper for $1 at ${0:a:h}/$1" >&2 + ln -sr $(realpath "$0") ${0:a:h}/$1 + exit 0 +fi + envwrapconf=${XDG_CONFIG_HOME:-$HOME/.config}/envwrap/$program [[ -e $envwrapconf ]] && source $envwrapconf $(next-in-path "$program" $0) "$@"