Skip to content

Commit

Permalink
bash: add very basic bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasakm committed Mar 19, 2020
1 parent 8b92072 commit 15c5438
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
alias ls="ls -hN --color=auto --group-directories-first"
alias ll="ls -l"
alias la="ls -Al"

__prompt_command() {
if (( $? == 0 )); then local color='\[\e[0;32m\]'; else local color='\[\e[0;31m\]'; fi
printf -v PS1 '%s%s%s\n%s%s%s ' '\[\e[1;34m\]' 'bash:\w' '\[\e[0m\]' "$color" '\$' '\[\e[0m\]'
}
PROMPT_COMMAND=__prompt_command

0 comments on commit 15c5438

Please sign in to comment.