mirror of
https://codeberg.org/frosty/dotfiles-server.git
synced 2024-09-19 03:26:44 -04:00
add bash configs
This commit is contained in:
parent
daa8ce8b12
commit
cafb88ea56
5
.bash_profile
Normal file
5
.bash_profile
Normal file
|
@ -0,0 +1,5 @@
|
|||
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
|
||||
|
||||
export EDITOR="vim"
|
||||
|
||||
export PATH="$PATH:$HOME/.bin"
|
33
.bashrc
Normal file
33
.bashrc
Normal file
|
@ -0,0 +1,33 @@
|
|||
case $- in
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
esac
|
||||
|
||||
# Default options
|
||||
alias ls='ls --color=auto -AF'
|
||||
alias grep='grep --color=auto'
|
||||
|
||||
# Shorthands
|
||||
alias l='ls'
|
||||
alias c='cd'
|
||||
alias v='vim'
|
||||
|
||||
# Other options
|
||||
alias ll='ls -l'
|
||||
|
||||
# List files on 'cd'
|
||||
cd() {
|
||||
builtin cd "$@"
|
||||
ls
|
||||
}
|
||||
|
||||
# Prompt
|
||||
parse_git_dirty() {
|
||||
[ -n "$(git status --porcelain 2>/dev/null)" ] && echo "*"
|
||||
}
|
||||
|
||||
parse_git_branch() {
|
||||
git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ (\1$(parse_git_dirty))/"
|
||||
}
|
||||
|
||||
export PS1="\n\[\e[36m\]\t\[\e[m\] \[\e[31m\]\h\[\e[m\] \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
|
Loading…
Reference in a new issue