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:
parent
8c29d0985d
commit
71f25cba9d
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue