mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
nicer bash test
This commit is contained in:
parent
27a578801d
commit
72d93fccac
2 changed files with 12 additions and 7 deletions
|
@ -1,9 +1,13 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
# check on bash
|
||||
[[ -n "${BASH_VERSION:-}" ]] || return
|
||||
|
||||
# color output
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
# set neovim default editor
|
||||
# set neovim as default editor
|
||||
alias vi='nvim'
|
||||
alias vim='nvim'
|
||||
alias edit='nvim'
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
if [[ "${0}" == "-bash" ]]; then
|
||||
if [[ "${UID}" == 0 ]]; then
|
||||
PS1='[\e[1;31m\u\e[m@\e[1;32m\h\e[m \W]\$ '
|
||||
else
|
||||
PS1='[\e[1;34m\u\e[m@\e[1;32m\h\e[m \W]\$ '
|
||||
fi
|
||||
# check on bash
|
||||
[[ -n "${BASH_VERSION:-}" ]] || return
|
||||
if [[ "${UID}" == 0 ]]; then
|
||||
PS1='[\e[1;31m\u\e[m@\e[1;32m\h\e[m \W]\$ '
|
||||
else
|
||||
PS1='[\e[1;34m\u\e[m@\e[1;32m\h\e[m \W]\$ '
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue