added check for git command presence to enable git functions in terminal fancyfying
This commit is contained in:
parent
d792ce8809
commit
39cb410c3e
@ -1,4 +1,7 @@
|
||||
GIT_FUNCTIONS=true
|
||||
command -v git &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
GIT_FUNCTIONS=true
|
||||
fi
|
||||
|
||||
# Spaced
|
||||
#PS1="${LIGHTBLUE}[ ${LIGHTRED}\u ${LIGHTBLUE}@ ${LIGHTBROWN}$(hostname --fqdn) ${LIGHTBLUE}] ${LIGHTPURPLE}( ${GREEN}\w ${LIGHTPURPLE}) "
|
||||
@ -7,7 +10,7 @@ GIT_FUNCTIONS=true
|
||||
# another version I really like
|
||||
PS1="${PURPLE}\# ${LIGHTBLUE}{${LIGHTGREEN}\u${BROWN}@${LIGHTGREEN}\$(hostname --fqdn)${LIGHTBLUE}} ${LIGHTPURPLE}[${CYAN}\w${LIGHTPURPLE}] "
|
||||
|
||||
if [ $GIT_FUNCTIONS ]; then
|
||||
if [ $GIT_FUNCTIONS = "true" ]; then
|
||||
#PS1="$PS1${LIGHTPURPLE}[${LIGHTCYAN}$(__git_prompt)${LIGHTPURPLE}]"
|
||||
PS1="$PS1${LIGHTBROWN}(${LIGHTCYAN}\$(__git_prompt)${LIGHTBROWN}) "
|
||||
fi
|
||||
|
@ -1,11 +1,14 @@
|
||||
GIT_FUNCTIONS=true
|
||||
command -v git &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
GIT_FUNCTIONS=true
|
||||
fi
|
||||
|
||||
# Spaced
|
||||
#PS1="${LIGHTBLUE}[ ${LIGHTRED}\u ${LIGHTBLUE}@ ${LIGHTBROWN}$(hostname --fqdn) ${LIGHTBLUE}] ${LIGHTPURPLE}( ${GREEN}\w ${LIGHTPURPLE}) "
|
||||
# Not spaced
|
||||
PS1="${LIGHTBLUE}[${LIGHTRED}\u${LIGHTBLUE}@${LIGHTBROWN}$(hostname --fqdn)${LIGHTBLUE}]${LIGHTPURPLE}(${GREEN}\w${LIGHTPURPLE})"
|
||||
|
||||
if [ $GIT_FUNCTIONS ]; then
|
||||
if [ $GIT_FUNCTIONS = "true" ]; then
|
||||
#PS1="$PS1${LIGHTPURPLE}[${LIGHTCYAN}$(__git_prompt)${LIGHTPURPLE}]"
|
||||
PS1="$PS1${LIGHTBROWN}(${LIGHTCYAN}\$(__git_prompt)${LIGHTBROWN}) "
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user