zsh: unset empty TMP and TMPDIR
this is a safety mechanism so that `/` is never used
This commit is contained in:
parent
7b1b54ac9f
commit
a9218a80e6
1 changed files with 9 additions and 0 deletions
|
@ -53,6 +53,15 @@ in
|
|||
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
|
||||
in
|
||||
''
|
||||
if test ! -n "$TMPDIR" -a -z "$TMPDIR"; then
|
||||
unset TMPDIR
|
||||
fi
|
||||
|
||||
if test ! -n "$TMP" -a -z "$TMP"; then
|
||||
unset TMP
|
||||
fi
|
||||
|
||||
|
||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||
RPROMPT=""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue