also include interactive shell check

This commit is contained in:
Tobias Powalowski 2023-01-31 18:04:20 +01:00
parent f8dddb54d2
commit b895e9dcc7
2 changed files with 4 additions and 0 deletions

View file

@ -2,6 +2,8 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
# check on bash
[[ -n "${BASH_VERSION:-}" ]] || return
# Not an interactive shell?
[[ $- == *i* ]] || return
# color output
alias ls='ls --color=auto'
alias grep='grep --color=auto'

View file

@ -2,6 +2,8 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
# check on bash
[[ -n "${BASH_VERSION:-}" ]] || return
# Not an interactive shell?
[[ $- == *i* ]] || return
if [[ "${UID}" == 0 ]]; then
# red for root user
PS1='[\e[1;31m\u\e[m@\e[1;32m\h\e[m \W]\$ '