This commit is contained in:
Phill Fernandes 2019-10-27 21:04:48 +01:00 committed by GitHub
commit b207d021f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 1 deletions

1
.bash/.bash Symbolic link
View file

@ -0,0 +1 @@
/home/pfernandes/dotfiles/.bash

@ -0,0 +1 @@
Subproject commit b032b4156241182a69c2bce36bddb97469194336

View file

@ -1,3 +1,5 @@
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source "${GITAWAREPROMPT}/main.sh"
# ~/.bashrc: executed by bash(1) for non-login shells. # ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples # for examples
@ -84,7 +86,7 @@ unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir # If this is an xterm set the title to user@host:dir
case "$TERM" in case "$TERM" in
xterm*|rxvt*) xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]" PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\] \$\[\e[0m\] "
;; ;;
*) *)
;; ;;

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule ".bash/git-aware-prompt"]
path = .bash/git-aware-prompt
url = https://github.com/jimeh/git-aware-prompt.git

View file

@ -7,6 +7,7 @@ for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
mv -f ~/$file{,.dtbak} mv -f ~/$file{,.dtbak}
fi fi
ln -s $PWD/$file ~/$file ln -s $PWD/$file ~/$file
ln -s $PWD/.bash ~/.bash
done done
# Check if vim-addon installed, if not, install it automatically # Check if vim-addon installed, if not, install it automatically

1
uninstall.sh Normal file → Executable file
View file

@ -5,6 +5,7 @@
for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
if [ -h ~/$file ]; then if [ -h ~/$file ]; then
rm -f ~/$file rm -f ~/$file
rm -rf ~/.bash
fi fi
if [ -e ~/${file}.dtbak ]; then if [ -e ~/${file}.dtbak ]; then
mv -f ~/$file{.dtbak,} mv -f ~/$file{.dtbak,}