Simplifying my prompt
This commit is contained in:
parent
d25dce283b
commit
48be72ac10
3 changed files with 43 additions and 18 deletions
11
setup
11
setup
|
@ -32,9 +32,9 @@ then
|
|||
fi
|
||||
|
||||
# Gets our `brew` on
|
||||
brew install bash-completion ghi git htop hub imagemagick imagesnap \
|
||||
macvim memcached multitail mysql nginx nmap node npm p7zip \
|
||||
redis ssh-copy-id vim wget
|
||||
brew install bash-completion fortune ghi git htop hub imagemagick \
|
||||
imagesnap macvim memcached multitail mysql nginx nmap \
|
||||
node npm p7zip redis ssh-copy-id vim wget
|
||||
|
||||
# Allows htop to show all processes
|
||||
# TODO Need to find a better way to run these that sniffs the current version
|
||||
|
@ -156,6 +156,11 @@ fi
|
|||
|
||||
ln -s $DOTFILES/zsh/zshrc ~/.zshrc
|
||||
|
||||
# Additional plugins
|
||||
#cd ~/.oh-my-zsh/custom/plugins
|
||||
#git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
|
||||
|
||||
# TODO Move away from submodule and add logic to only do this if it's me
|
||||
# Perhaps only run this is the dotfiles-private directory is avail
|
||||
# Links .zshrc-private
|
||||
|
|
|
@ -1,22 +1,29 @@
|
|||
function
|
||||
function username()
|
||||
{
|
||||
if [[ -n "$SSH_CLIENT" ]];
|
||||
if [[ `whoami` != 'josh' ]];
|
||||
then
|
||||
REMOTE_INDICATOR='📡 '
|
||||
else
|
||||
REMOTE_INDICATOR=''
|
||||
echo %{$FG[248]%}%n
|
||||
fi
|
||||
}
|
||||
|
||||
SEPARATOR="%{$FG[238]%} ✱ "
|
||||
TIME="%{$FG[028]%}%D{%H}%{$FG[022]%}:%{$FG[028]%}%D{%M}%{$FG[022]%}:%{$FG[028]%}%D{%S}"
|
||||
USER="%{$FG[244]%}%n%{$FG[248]%}@%{$fg[magenta]%}%m"
|
||||
function server()
|
||||
{
|
||||
if [[ `hostname` != *.local ]];
|
||||
then
|
||||
echo "%{$FG[244]%}@%{$fg[magenta]%}%m "
|
||||
fi
|
||||
}
|
||||
|
||||
function unread_count()
|
||||
{
|
||||
}
|
||||
|
||||
USER="$(username)$(server)"
|
||||
PROMPT='
|
||||
%{$TIME%}%{$SEPARATOR%}%{$USER%}%{$SEPARATOR%}%{$fg_bold[blue]%}%~$(git_prompt_info)
|
||||
${REMOTE_INDICATOR}%{$FG[244]%}%# %{$reset_color%}'
|
||||
%{$USER%}%{$fg[blue]%}%~ $(git_prompt_info)
|
||||
%{$FG[244]%}%# %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[011]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=") %{$fg[red]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=")"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔"
|
||||
|
|
15
zsh/zshrc
15
zsh/zshrc
|
@ -37,7 +37,7 @@ alias fm="free -m"
|
|||
# git
|
||||
alias g="git"
|
||||
alias ga="git add"
|
||||
alias gaa="git add ."
|
||||
alias gaa="git add --all"
|
||||
alias gb="git branch"
|
||||
alias gba="git branch -a"
|
||||
alias gc="git commit"
|
||||
|
@ -75,11 +75,18 @@ alias jekyll="(sleep 5 && open http://localhost:4000) & jekyll serve --watch"
|
|||
|
||||
# memcached
|
||||
alias mc="telnet localhost 11211"
|
||||
alias mcfl="echo 'flush_all' | nc localhost 11211"
|
||||
|
||||
# mtr
|
||||
alias mtr="sudo mtr"
|
||||
|
||||
# mysql
|
||||
alias mysql="mysql -uroot"
|
||||
alias myst="mysql street"
|
||||
|
||||
# python
|
||||
alias py="python"
|
||||
|
||||
# quit
|
||||
alias quit="exit"
|
||||
|
||||
|
@ -92,6 +99,9 @@ alias service="sudo service"
|
|||
# wc
|
||||
alias count="wc -l"
|
||||
|
||||
# zsh
|
||||
alias zshrc="source ~/.zshrc"
|
||||
|
||||
# vim (and some other stuff)
|
||||
if [[ `uname` == "Darwin" ]];
|
||||
then
|
||||
|
@ -170,3 +180,6 @@ fi
|
|||
|
||||
### Added by the Heroku Toolbelt
|
||||
export PATH="/usr/local/heroku/bin:$PATH"
|
||||
|
||||
echo ''
|
||||
fortune
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue