Compare commits

...

2 Commits

3 changed files with 17 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -6,10 +6,9 @@ CURRENT_FANCYFY=""
DELETE=false
MOVE=false
PRESENT=false
BASHRC="~/.bashrc"
_bashrc_present() {
if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ${BASHRC})" ]; then
if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ]; then
echo true
exit
fi
@ -19,7 +18,7 @@ _bashrc_present() {
_arguments() {
if [ "$(_bashrc_present)" = true ]; then
PRESENT=true
CURRENT_FANCYFY="$(grep TERMINAL_FANCYFY ${BASHRC} | sed 's/.*=//')"
CURRENT_FANCYFY="$(grep TERMINAL_FANCYFY ~/.bashrc | sed 's/.*=//')"
fi
for PARM in "$@"; do
if [ "${PARM}" = "--server" ]; then
@ -53,13 +52,13 @@ _help() {
}
_delete() {
sed -i '/REF:bashrc_overrides:REF/{N;N;d}' "${BASHRC}"
sed -i '/REF:bashrc_overrides:REF/{N;N;d}' ~/.bashrc
}
_bashrc_ref() {
echo "#REF:bashrc_overrides:REF" >> "${BASHRC}"
echo "export TERMINAL_FANCYFY=${1}" >> "${BASHRC}"
echo ". ${THIS}/bashrc_overrides/_all" >> "${BASHRC}"
echo "#REF:bashrc_overrides:REF" >> ~/.bashrc
echo "export TERMINAL_FANCYFY=${1}" >> ~/.bashrc
echo ". ${THIS}/bashrc_overrides/_all" >> ~/.bashrc
}
_move() {
@ -87,7 +86,7 @@ _main() {
fi
elif [ "${PRESENT}" = true ]; then
if [ "${CURRENT_FANCYFY}" != "${FANCYFY}" ]; then
sed -i "s/TERMINAL_FANCYFY=${CURRENT_FANCYFY}/TERMINAL_FANCYFY=${FANCYFY}/" "${BASHRC}"
sed -i "s/TERMINAL_FANCYFY=${CURRENT_FANCYFY}/TERMINAL_FANCYFY=${FANCYFY}/" ~/.bashrc
echo "customized fancyfying"
echo
else