This commit is contained in:
2025-03-13 20:17:56 +01:00
parent e9f58b8142
commit 3eb747fd14

View File

@@ -32,8 +32,13 @@ _ns() {
return $?
fi
>&2 echo -n +
>&2 printf " %q" exec nix shell "${args[@]}"
# echo current shell
# >&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
local outpaths="$(
export NIXPKGS_ALLOW_BROKEN
@@ -117,6 +122,12 @@ _ns() {
# export PYTHONNOUSERSITE=1
fi
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 "$@"; }