mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
also include interactive shell check
This commit is contained in:
parent
f8dddb54d2
commit
b895e9dcc7
2 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
||||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
# check on bash
|
# check on bash
|
||||||
[[ -n "${BASH_VERSION:-}" ]] || return
|
[[ -n "${BASH_VERSION:-}" ]] || return
|
||||||
|
# Not an interactive shell?
|
||||||
|
[[ $- == *i* ]] || return
|
||||||
# color output
|
# color output
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
# check on bash
|
# check on bash
|
||||||
[[ -n "${BASH_VERSION:-}" ]] || return
|
[[ -n "${BASH_VERSION:-}" ]] || return
|
||||||
|
# Not an interactive shell?
|
||||||
|
[[ $- == *i* ]] || return
|
||||||
if [[ "${UID}" == 0 ]]; then
|
if [[ "${UID}" == 0 ]]; then
|
||||||
# red for root user
|
# red for root user
|
||||||
PS1='[\e[1;31m\u\e[m@\e[1;32m\h\e[m \W]\$ '
|
PS1='[\e[1;31m\u\e[m@\e[1;32m\h\e[m \W]\$ '
|
||||||
|
|
Loading…
Reference in a new issue