forked from colonelpanic/dotfiles
cleanup bootstrap.sh. reorganize gitconfig.
This commit is contained in:
1
dotfiles/lib/bash/aliases.sh
Normal file
1
dotfiles/lib/bash/aliases.sh
Normal file
@@ -0,0 +1 @@
|
||||
alias sourcefile_abspath='$(readlink -f "$BASH_SOURCE" | xargs dirname)'
|
@@ -6,6 +6,7 @@ alias go2dotfiles='cd $(dirname `readlink -f ~/.zshrc | xargs dirname`)'
|
||||
|
||||
# enables the sudoing of aliases.
|
||||
alias sudo='sudo '
|
||||
alias get_absolute_directory=
|
||||
|
||||
# Detect which `ls` flavor is in use
|
||||
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
||||
|
@@ -1,15 +1,5 @@
|
||||
function parse_git_branch() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref=$(git rev-parse --short HEAD 2> /dev/null) || return
|
||||
echo ${ref#refs/heads/}
|
||||
}
|
||||
|
||||
function git_is_dirty() {
|
||||
! test -z "$(git status --porcelain)"
|
||||
}
|
||||
|
||||
function current_shell() {
|
||||
greadlink -f $(which "$(ps -p $$ | tail -1 | awk '{print $NF}' | sed 's/\-//')")
|
||||
readlink -f $(which "$(ps -p $$ | tail -1 | awk '{print $NF}' | sed 's/\-//')")
|
||||
}
|
||||
|
||||
function is_zsh() {
|
||||
|
@@ -13,7 +13,7 @@ function git_prompt_info() {
|
||||
}
|
||||
|
||||
function git_status_character() {
|
||||
if git_is_dirty;
|
||||
if git dirty;
|
||||
then
|
||||
echo "%{$FG[202]%}✘%{$reset_color%}"
|
||||
else
|
||||
@@ -29,7 +29,7 @@ function sandbox_prompt() {
|
||||
}
|
||||
|
||||
PROMPT='╭─% %{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(hostname -s)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}$(current_directory)%{$reset_color%}$(git_prompt_info)$(sandbox_prompt)
|
||||
$FG[255]╰─± '
|
||||
$FG[255]%{$reset_color%}╰─± '
|
||||
|
||||
PS2=''
|
||||
|
||||
|
Reference in New Issue
Block a user