Last active
June 27, 2019 10:54
-
-
Save AndrewMontagne/822c76e4c5c068a9c53788cdcbcabc98 to your computer and use it in GitHub Desktop.
terminal stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null) | |
RETVAL=$? | |
if [ $RETVAL -eq 0 ]; then | |
if [ -z "$(git status -s)" ]; then | |
echo -ne " \001\033[48;5;2m" | |
elif [ "$(git ls-files --exclude-standard --others)" ]; then | |
echo -ne " \001\033[48;5;1m" | |
else | |
echo -ne " \001\033[48;5;3m" | |
fi | |
echo -e "\033[38;5;0m\002 ${BRANCH}" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set autoindent | |
set tabsize 4 | |
set nohelp | |
set const | |
set mouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test -n "$ZSH_VERSION"; then | |
setopt PROMPT_SUBST | |
export PROMPT='%F{015}%T%f %K{004}%F{000} %3~$(~/.git-branch.sh) %k%f ' | |
fpath=(~/.zsh $fpath) | |
TMOUT=10 | |
TRAPALRM() { | |
zle reset-prompt | |
} | |
else | |
export PS1='\[\033]0;\w $ bash\007\033[38;5;15m\]\A \[\033[38;5;0m\033[48;5;4m\] \w$(~/.git-branch.sh) \[$(tput sgr0)\] ' | |
source git-completion.bash | |
fi | |
trap 'echo -ne "\001\033]0;$(dirs +0) $ $BASH_COMMAND\007\002"' DEBUG | |
alias ll="ls -lahG" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment