Vim, .profile: Lots of changes, like tablines and prefixes
This commit is contained in:
13
.profile
13
.profile
@@ -58,7 +58,10 @@ PATH="$desiredpath:$PATH"
|
||||
[ -f "/etc/profile.d/bash_completion.sh" ] && . "/etc/profile.d/bash_completion.sh"
|
||||
|
||||
# Source ~/.functions, if it exists
|
||||
[ -r "$HOME/.functions" ] && [ "$_baseshell" != "sh" ] && . "$HOME/.functions"
|
||||
[ -r "$HOME/.functions" ] \
|
||||
&& [ "$_baseshell" != "sh" ] \
|
||||
&& [ "$_baseshell" != "dash" ] \
|
||||
&& . "$HOME/.functions"
|
||||
|
||||
# Define a require function
|
||||
has() {
|
||||
@@ -200,9 +203,9 @@ _ps1() {
|
||||
if [ "$SSH_CLIENT" ]; then
|
||||
prefix="${fg_bold}${fg_red}$(hostname)${r}${fg_red}:${r}${prefix}"
|
||||
fi
|
||||
# Append a "restricted" prefix in rbash
|
||||
if [ "$0" = "rbash" ]; then
|
||||
prefix="${fg_bold}${fg_grey}rbash${r}:"
|
||||
# Append "vim" in Vim
|
||||
if [ -n "$VIM_TERMINAL" ]; then
|
||||
prefix="${fg_bold}${fg_green}*${r}"
|
||||
fi
|
||||
# Change PWD color depending on the shell
|
||||
case $0 in
|
||||
@@ -239,7 +242,7 @@ case "$_baseshell" in
|
||||
# Don't do this on ZSH
|
||||
# I have a custom theme for that
|
||||
;;
|
||||
sh)
|
||||
sh|dash)
|
||||
export PS1='\$ '
|
||||
;;
|
||||
*)
|
||||
|
Reference in New Issue
Block a user