From e0121331790ab26aa2c0447b4a9dd914f4a0d005 Mon Sep 17 00:00:00 2001 From: Jan Danielzick <> Date: Tue, 11 May 2021 16:36:15 +0200 Subject: [PATCH] added file --- ultimate.bashrc | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ultimate.bashrc diff --git a/ultimate.bashrc b/ultimate.bashrc new file mode 100644 index 0000000..21c0755 --- /dev/null +++ b/ultimate.bashrc @@ -0,0 +1,39 @@ +EDITOR=nano +PAGER=less + +export EDITOR PAGER + + +case $- in +*i*) + alias h="history 25" + alias j="jobs -l" + alias ls="ls --color=auto" + alias la="ls -aF" + alias lf="ls -FA" + alias ll="ls -lAF" + [[ -f /usr/local/share/bash-completion/bash_completion.sh ]] && source /usr/local/share/bash-completion/bash_completion.sh + PROMPT_COMMAND="PS1=\"[\[\e[03$( + if [ $EUID -eq 0 ] + then + echo '1;02m' + else + if [ -n "$(groups | grep 'wheel')" ]; + then + echo '2;01m' + else + echo '6;01m' + fi + fi + )\]\u@\h\[\e[0m\]]:\$( + PROMPT_ERRORLEVEL=\$? + if [ \$PROMPT_ERRORLEVEL -eq 0 ] + then + echo -n '\[\e[032;02m\]' + else + echo -n '\[\e[031;02m\]' + fi + echo -n \$PROMPT_ERRORLEVEL + echo -n '\[\e[00m\]' + ):\[\e[034;01m\]\$(pwd)\[\e[0m\]:> \"" +esac