This commit is contained in:
2025-03-13 20:17:56 +01:00
parent e9f58b8142
commit 3eb747fd14
@@ -32,8 +32,13 @@ _ns() {
return $? return $?
fi fi
>&2 echo -n + # echo current shell
>&2 printf " %q" exec nix shell "${args[@]}" # >&2 echo -n + exec nix shell
>&2 echo -n + ns
if [[ -v _PREVIOUS_NS_ARGS ]]; then
>&2 echo -n " ${_PREVIOUS_NS_ARGS:-}"
fi
>&2 printf " %q" "${args[@]}"
>&2 echo >&2 echo
local outpaths="$( local outpaths="$(
export NIXPKGS_ALLOW_BROKEN export NIXPKGS_ALLOW_BROKEN
@@ -117,6 +122,12 @@ _ns() {
# export PYTHONNOUSERSITE=1 # export PYTHONNOUSERSITE=1
fi fi
done done
if [[ -v _PREVIOUS_NS_ARGS ]]; then
export _PREVIOUS_NS_ARGS="$_PREVIOUS_NS_ARGS$(printf " %q" "${args[@]}")"
else
export _PREVIOUS_NS_ARGS="$(printf " %q" "${args[@]}" | cut -c2-)"
fi
} }
ns() { _ns false "$@"; } ns() { _ns false "$@"; }