1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

zsh: support nix-shell --run zsh

This commit is contained in:
Daiderd Jordan 2017-07-09 10:14:49 +02:00
parent 8c29d0985d
commit 71f25cba9d
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -165,6 +165,12 @@ in
${optionalString cfg.enableFzfGit "source ${fzfGit}"}
${optionalString cfg.enableFzfHistory "source ${fzfHistory}"}
# Don't execute this file when running in a nix-shell.
if test ''${IN_NIX_SHELL:-0} -eq 1; then
PS1='%F{green}%B[nix-shell:%~]%#%b%f '
return
fi
# Only execute this file once per shell.
if [ -n "$__ETC_ZSHRC_SOURCED" -o -n "$NOSYSZSHRC" ]; then return; fi
__ETC_ZSHRC_SOURCED=1
@ -197,7 +203,6 @@ in
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
}
# Read system-wide modifications.
if test -f /etc/zshrc.local; then
source /etc/zshrc.local