aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/zsh/aliases/dev.zsh4
-rw-r--r--external/zsh/theme.zsh1
2 files changed, 5 insertions, 0 deletions
diff --git a/external/zsh/aliases/dev.zsh b/external/zsh/aliases/dev.zsh
index b7ce579..9128777 100644
--- a/external/zsh/aliases/dev.zsh
+++ b/external/zsh/aliases/dev.zsh
@@ -3,6 +3,10 @@ alias aws="docker run --rm -it amazon/aws-cli"
nrx() { nix-shell -p nodejs-14_x --run "npm run $1"; }
+with_node_14() { nix-shell -p nodejs-14_x --run 'WITH_NIX_PREFIX="node14" zsh'; }
+
+nix-zshell() { nix-shell --run 'WITH_NIX_PREFIX=":" zsh' "$@"; }
+
# :: Filename Pattern Replacetext
far() {
local file_r="$1"; shift;
diff --git a/external/zsh/theme.zsh b/external/zsh/theme.zsh
index 8666a7a..9fc4fac 100644
--- a/external/zsh/theme.zsh
+++ b/external/zsh/theme.zsh
@@ -22,6 +22,7 @@ p_dir() {
# Prompt terminal status
p_status() {
+ [[ ! -z "$WITH_NIX_PREFIX" ]] && echo -n "$(segment "[NIX:$WITH_NIX_PREFIX] " black $COL_STATUS_ERROR)";
echo -n "%(?..$(segment 'x' black $COL_STATUS_ERROR))"
echo -n "%(1j.$(segment '(jobs: %j)' black $COL_STATUS_BG).)"
}