diff options
-rw-r--r-- | lib/aliases.zsh | 11 | ||||
-rw-r--r-- | lib/prompt_info_functions.zsh | 33 | ||||
-rw-r--r-- | lib/rbenv.zsh | 2 | ||||
-rw-r--r-- | lib/rvm.zsh | 8 | ||||
-rw-r--r-- | plugins/atom/atom.plugin.zsh | 4 | ||||
-rw-r--r-- | plugins/cabal/cabal.plugin.zsh | 11 | ||||
-rw-r--r-- | plugins/gitignore/gitignore.plugin.zsh | 6 | ||||
l---------[-rw-r--r--] | plugins/go/go.plugin.zsh | 152 | ||||
-rw-r--r-- | plugins/golang/golang.plugin.zsh | 34 | ||||
-rw-r--r-- | plugins/pip/_pip | 4 | ||||
-rw-r--r-- | plugins/rails/rails.plugin.zsh | 1 | ||||
-rw-r--r-- | plugins/rake/rake.plugin.zsh | 4 | ||||
-rw-r--r-- | plugins/rbenv/rbenv.plugin.zsh | 8 | ||||
-rw-r--r-- | plugins/svn-fast-info/svn-fast-info.plugin.zsh | 73 | ||||
-rw-r--r-- | plugins/xcode/xcode.plugin.zsh | 1 | ||||
-rw-r--r-- | themes/af-magic.zsh-theme | 9 | ||||
-rw-r--r-- | themes/ys.zsh-theme | 13 |
17 files changed, 191 insertions, 183 deletions
diff --git a/lib/aliases.zsh b/lib/aliases.zsh index b279bf855..2094f60a0 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -6,6 +6,11 @@ alias po='popd' alias ...='cd ../..' alias -- -='cd -' +# Prevent headaches +alias cp='cp -v' +alias rm='rm -v' +alias mv='mv -v' + # Super user alias _='sudo' alias please='sudo' @@ -27,9 +32,9 @@ else fi # List direcory contents alias lsa='ls -lah' -alias l='ls -la' -alias ll='ls -l' -alias la='ls -lA' +alias l='ls -lah' +alias ll='ls -lh' +alias la='ls -lAh' alias sl=ls # often screw this up alias afind='ack-grep -il' diff --git a/lib/prompt_info_functions.zsh b/lib/prompt_info_functions.zsh new file mode 100644 index 000000000..335c02a3d --- /dev/null +++ b/lib/prompt_info_functions.zsh @@ -0,0 +1,33 @@ +# *_prompt_info functions for usage in your prompt +# +# Plugin creators, please add your *_prompt_info function to the list +# of dummy implementations to help theme creators not receiving errors +# without the need of implementing conditional clauses. +# +# See also lib/bzr.zsh, lib/git.zsh and lib/nvm.zsh for +# git_prompt_info, bzr_prompt_info and nvm_prompt_info + +# Dummy implementations that return false to prevent command_not_found +# errors with themes, that implement these functions +# Real implementations will be used when the respective plugins are loaded +function chruby_prompt_info hg_prompt_info pyenv_prompt_info \ + rbenv_prompt_info svn_prompt_info vi_mode_prompt_info \ + virtualenv_prompt_info { + return 1 +} + +# oh-my-zsh supports an rvm prompt by default +# get the name of the rvm ruby version +function rvm_prompt_info() { + [ -f $HOME/.rvm/bin/rvm-prompt ] || return 1 + local rvm_prompt + rvm_prompt=$($HOME/.rvm/bin/rvm-prompt ${=ZSH_THEME_RVM_PROMPT_OPTIONS} 2>/dev/null) + [[ "${rvm_prompt}x" == "x" ]] && return 1 + echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}" +} + +# use this to enable users to see their ruby version, no matter which +# version management system they use +function ruby_prompt_info() { + echo $(rvm_prompt_info || rbenv_prompt_info || chruby_prompt_info) +} diff --git a/lib/rbenv.zsh b/lib/rbenv.zsh deleted file mode 100644 index a8b6c323c..000000000 --- a/lib/rbenv.zsh +++ /dev/null @@ -1,2 +0,0 @@ -# using the rbenv plugin will override this with a real implementation -function rbenv_prompt_info() {} diff --git a/lib/rvm.zsh b/lib/rvm.zsh deleted file mode 100644 index e8744e61e..000000000 --- a/lib/rvm.zsh +++ /dev/null @@ -1,8 +0,0 @@ -# get the name of the ruby version -function rvm_prompt_info() { - [ -f $HOME/.rvm/bin/rvm-prompt ] || return - local rvm_prompt - rvm_prompt=$($HOME/.rvm/bin/rvm-prompt ${ZSH_THEME_RVM_PROMPT_OPTIONS} 2>/dev/null) - [[ "${rvm_prompt}x" == "x" ]] && return - echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}" -} diff --git a/plugins/atom/atom.plugin.zsh b/plugins/atom/atom.plugin.zsh new file mode 100644 index 000000000..048fd7521 --- /dev/null +++ b/plugins/atom/atom.plugin.zsh @@ -0,0 +1,4 @@ +# +# Your guess is as good as mine. Let's just assume that we will need this... +# - For more info visit... http://atom.io/ +#
\ No newline at end of file diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 8d3c64587..9f76add7a 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -1,3 +1,14 @@ +function cabal_sandbox_info() { + cabal_files=(*.cabal(N)) + if [ $#cabal_files -gt 0 ]; then + if [ -f cabal.sandbox.config ]; then + echo "%{$fg[green]%}sandboxed%{$reset_color%}" + else + echo "%{$fg[red]%}not sandboxed%{$reset_color%}" + fi + fi +} + function _cabal_commands() { local ret=1 state _arguments ':subcommand:->subcommand' && ret=0 diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 332497cec..be037d87a 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ -function gi() { curl http://gitignore.io/api/$@ ;} +function gi() { curl http://www.gitignore.io/api/$@ ;} _gitignireio_get_command_list() { - curl -s http://gitignore.io/api/list | tr "," "\n" + curl -s http://www.gitignore.io/api/list | tr "," "\n" } _gitignireio () { @@ -9,4 +9,4 @@ _gitignireio () { compadd -S '' `_gitignireio_get_command_list` } -compdef _gitignireio gi
\ No newline at end of file +compdef _gitignireio gi diff --git a/plugins/go/go.plugin.zsh b/plugins/go/go.plugin.zsh index 23afa9656..cf943e2e1 100644..120000 --- a/plugins/go/go.plugin.zsh +++ b/plugins/go/go.plugin.zsh @@ -1,151 +1 @@ -# install in /etc/zsh/zshrc or your personal .zshrc - -# gc -prefixes=(5 6 8) -for p in $prefixes; do - compctl -g "*.${p}" ${p}l - compctl -g "*.go" ${p}g -done - -# standard go tools -compctl -g "*.go" gofmt - -# gccgo -compctl -g "*.go" gccgo - -# go tool -__go_tool_complete() { - typeset -a commands build_flags - commands+=( - 'build[compile packages and dependencies]' - 'clean[remove object files]' - 'doc[run godoc on package sources]' - 'fix[run go tool fix on packages]' - 'fmt[run gofmt on package sources]' - 'get[download and install packages and dependencies]' - 'help[display help]' - 'install[compile and install packages and dependencies]' - 'list[list packages]' - 'run[compile and run Go program]' - 'test[test packages]' - 'tool[run specified go tool]' - 'version[print Go version]' - 'vet[run go tool vet on packages]' - ) - if (( CURRENT == 2 )); then - # explain go commands - _values 'go tool commands' ${commands[@]} - return - fi - build_flags=( - '-a[force reinstallation of packages that are already up-to-date]' - '-n[print the commands but do not run them]' - "-p[number of parallel builds]:number" - '-x[print the commands]' - "-work[print temporary directory name and keep it]" - "-gcflags[flags for 5g/6g/8g]:flags" - "-ldflags[flags for 5l/6l/8l]:flags" - "-gccgoflags[flags for gccgo]:flags" - ) - __go_list() { - local expl importpaths - declare -a importpaths - importpaths=($(go list ${words[$CURRENT]}... 2>/dev/null)) - _wanted importpaths expl 'import paths' compadd "$@" - "${importpaths[@]}" - } - case ${words[2]} in - clean|doc) - _arguments -s -w : '*:importpaths:__go_list' - ;; - fix|fmt|list|vet) - _alternative ':importpaths:__go_list' ':files:_path_files -g "*.go"' - ;; - install) - _arguments -s -w : ${build_flags[@]} \ - "-v[show package names]" \ - '*:importpaths:__go_list' - ;; - get) - _arguments -s -w : \ - ${build_flags[@]} - ;; - build) - _arguments -s -w : \ - ${build_flags[@]} \ - "-v[show package names]" \ - "-o[output file]:file:_files" \ - "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }" - ;; - test) - _arguments -s -w : \ - ${build_flags[@]} \ - "-c[do not run, compile the test binary]" \ - "-i[do not run, install dependencies]" \ - "-v[print test output]" \ - "-x[print the commands]" \ - "-short[use short mode]" \ - "-parallel[number of parallel tests]:number" \ - "-cpu[values of GOMAXPROCS to use]:number list" \ - "-run[run tests and examples matching regexp]:regexp" \ - "-bench[run benchmarks matching regexp]:regexp" \ - "-benchtime[run each benchmark during n seconds]:duration" \ - "-timeout[kill test after that duration]:duration" \ - "-cpuprofile[write CPU profile to file]:file:_files" \ - "-memprofile[write heap profile to file]:file:_files" \ - "-memprofilerate[set heap profiling rate]:number" \ - "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }" - ;; - help) - _values "${commands[@]}" \ - 'gopath[GOPATH environment variable]' \ - 'importpath[description of import paths]' \ - 'remote[remote import path syntax]' \ - 'testflag[description of testing flags]' \ - 'testfunc[description of testing functions]' - ;; - run) - _arguments -s -w : \ - ${build_flags[@]} \ - '*:file:_path_files -g "*.go"' - ;; - tool) - if (( CURRENT == 3 )); then - _values "go tool" $(go tool) - return - fi - case ${words[3]} in - [568]g) - _arguments -s -w : \ - '-I[search for packages in DIR]:includes:_path_files -/' \ - '-L[show full path in file:line prints]' \ - '-S[print the assembly language]' \ - '-V[print the compiler version]' \ - '-e[no limit on number of errors printed]' \ - '-h[panic on an error]' \ - '-l[disable inlining]' \ - '-m[print optimization decisions]' \ - '-o[file specify output file]:file' \ - '-p[assumed import path for this code]:importpath' \ - '-u[disable package unsafe]' \ - "*:file:_files -g '*.go'" - ;; - [568]l) - local O=${words[3]%l} - _arguments -s -w : \ - '-o[file specify output file]:file' \ - '-L[search for packages in DIR]:includes:_path_files -/' \ - "*:file:_files -g '*.[ao$O]'" - ;; - dist) - _values "dist tool" banner bootstrap clean env install version - ;; - *) - # use files by default - _files - ;; - esac - ;; - esac -} - -compdef __go_tool_complete go +../golang/golang.plugin.zsh
\ No newline at end of file diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh index e60c4afe4..18bcaaff2 100644 --- a/plugins/golang/golang.plugin.zsh +++ b/plugins/golang/golang.plugin.zsh @@ -1,9 +1,10 @@ -# From : http://golang.org/misc/zsh/go?m=text +# install in /etc/zsh/zshrc or your personal .zshrc + # gc prefixes=(5 6 8) for p in $prefixes; do - compctl -g "*.${p}" ${p}l - compctl -g "*.go" ${p}g + compctl -g "*.${p}" ${p}l + compctl -g "*.go" ${p}g done # standard go tools @@ -19,6 +20,7 @@ __go_tool_complete() { 'build[compile packages and dependencies]' 'clean[remove object files]' 'doc[run godoc on package sources]' + 'env[print Go environment information]' 'fix[run go tool fix on packages]' 'fmt[run gofmt on package sources]' 'get[download and install packages and dependencies]' @@ -39,12 +41,17 @@ __go_tool_complete() { build_flags=( '-a[force reinstallation of packages that are already up-to-date]' '-n[print the commands but do not run them]' - "-p[number of parallel builds]:number" + '-p[number of parallel builds]:number' + '-race[enable data race detection]' '-x[print the commands]' - "-work[print temporary directory name and keep it]" - "-gcflags[flags for 5g/6g/8g]:flags" - "-ldflags[flags for 5l/6l/8l]:flags" - "-gccgoflags[flags for gccgo]:flags" + '-work[print temporary directory name and keep it]' + '-ccflags[flags for 5c/6c/8c]:flags' + '-gcflags[flags for 5g/6g/8g]:flags' + '-ldflags[flags for 5l/6l/8l]:flags' + '-gccgoflags[flags for gccgo]:flags' + '-compiler[name of compiler to use]:name' + '-installsuffix[suffix to add to package directory]:suffix' + '-tags[list of build tags to consider satisfied]:tags' ) __go_list() { local expl importpaths @@ -62,7 +69,7 @@ __go_tool_complete() { install) _arguments -s -w : ${build_flags[@]} \ "-v[show package names]" \ - '*:importpaths:__go_list' + '*:importpaths:__go_list' ;; get) _arguments -s -w : \ @@ -87,7 +94,10 @@ __go_tool_complete() { "-cpu[values of GOMAXPROCS to use]:number list" \ "-run[run tests and examples matching regexp]:regexp" \ "-bench[run benchmarks matching regexp]:regexp" \ - "-benchtime[run each benchmark during n seconds]:duration" \ + "-benchmem[print memory allocation stats]" \ + "-benchtime[run each benchmark until taking this long]:duration" \ + "-blockprofile[write goroutine blocking profile to file]:file" \ + "-blockprofilerate[set sampling rate of goroutine blocking profile]:number" \ "-timeout[kill test after that duration]:duration" \ "-cpuprofile[write CPU profile to file]:file:_files" \ "-memprofile[write heap profile to file]:file:_files" \ @@ -97,7 +107,7 @@ __go_tool_complete() { help) _values "${commands[@]}" \ 'gopath[GOPATH environment variable]' \ - 'importpath[description of import paths]' \ + 'packages[description of package lists]' \ 'remote[remote import path syntax]' \ 'testflag[description of testing flags]' \ 'testfunc[description of testing functions]' @@ -147,4 +157,4 @@ __go_tool_complete() { esac } -compdef __go_tool_complete go
\ No newline at end of file +compdef __go_tool_complete go diff --git a/plugins/pip/_pip b/plugins/pip/_pip index 967da48ca..7c1238db7 100644 --- a/plugins/pip/_pip +++ b/plugins/pip/_pip @@ -20,6 +20,7 @@ _1st_arguments=( 'bundle:create pybundles (archives containing multiple packages)' 'freeze:output all currently installed packages (exact versions) to stdout' 'help:show available commands' + 'show:show information about installed packages' 'install:install packages' 'search:search PyPI' 'uninstall:uninstall packages' @@ -76,4 +77,7 @@ case "$words[1]" in uninstall) _pip_installed _wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;; + show) + _pip_installed + _wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;; esac diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 23d15a9a1..4a96754e4 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -51,6 +51,7 @@ alias rds='rake db:seed' alias rdd='rake db:drop' alias rdtc='rake db:test:clone' alias rdtp='rake db:test:prepare' +alias rdmtc='rake db:migrate db:test:clone' alias rlc='rake log:clear' alias rn='rake notes' diff --git a/plugins/rake/rake.plugin.zsh b/plugins/rake/rake.plugin.zsh index 16b933c14..121150017 100644 --- a/plugins/rake/rake.plugin.zsh +++ b/plugins/rake/rake.plugin.zsh @@ -1,3 +1,7 @@ +# Thank you Jim for everything you contributed to the Ruby and open source community +# over the years. We will miss you dearly. +alias jimweirich="rake" + alias rake="noglob rake" # allows square brackts for rake task invocation alias brake='noglob bundle exec rake' # execute the bundled rake gem alias srake='noglob sudo rake' # noglob must come before sudo diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index 78f76c3a3..57ae2ca1f 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -10,12 +10,18 @@ FOUND_RBENV=0 rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv") if _homebrew-installed && _rbenv-from-homebrew-installed ; then rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}") + if [[ $RBENV_ROOT = '' ]]; then + RBENV_ROOT="$HOME/.rbenv" + fi fi for rbenvdir in "${rbenvdirs[@]}" ; do if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then FOUND_RBENV=1 - export RBENV_ROOT=$rbenvdir + if [[ $RBENV_ROOT = '' ]]; then + RBENV_ROOT=$rbenvdir + fi + export RBENV_ROOT export PATH=${rbenvdir}/bin:$PATH eval "$(rbenv init --no-rehash - zsh)" diff --git a/plugins/svn-fast-info/svn-fast-info.plugin.zsh b/plugins/svn-fast-info/svn-fast-info.plugin.zsh new file mode 100644 index 000000000..ea19bcea0 --- /dev/null +++ b/plugins/svn-fast-info/svn-fast-info.plugin.zsh @@ -0,0 +1,73 @@ +# vim:ft=zsh ts=2 sw=2 sts=2 et +# +# Faster alternative to the current SVN plugin implementation. +# +# Works with svn 1.6, 1.7, 1.8. +# Use `svn_prompt_info` method to enquire the svn data. +# It's faster because his efficient use of svn (single svn call) which saves a lot on a huge codebase +# It displays the current status of the local files (added, deleted, modified, replaced, or else...) +# +# Use as a drop-in replacement of the svn plugin not as complementary plugin + +function svn_prompt_info() { + local info + info=$(svn info 2>&1) || return 1; # capture stdout and stderr + local repo_need_upgrade=$(svn_repo_need_upgrade $info) + + if [[ -n $repo_need_upgrade ]]; then + printf '%s%s%s%s%s%s%s\n' \ + $ZSH_PROMPT_BASE_COLOR \ + $ZSH_THEME_SVN_PROMPT_PREFIX \ + $ZSH_PROMPT_BASE_COLOR \ + $repo_need_upgrade \ + $ZSH_PROMPT_BASE_COLOR \ + $ZSH_THEME_SVN_PROMPT_SUFFIX \ + $ZSH_PROMPT_BASE_COLOR + else + printf '%s%s%s %s%s:%s%s%s%s%s' \ + $ZSH_PROMPT_BASE_COLOR \ + $ZSH_THEME_SVN_PROMPT_PREFIX \ + \ + "$(svn_status_info $info)" \ + $ZSH_PROMPT_BASE_COLOR \ + \ + $ZSH_THEME_BRANCH_NAME_COLOR \ + $(svn_current_branch_name $info) \ + $ZSH_PROMPT_BASE_COLOR \ + \ + $(svn_current_revision $info) \ + $ZSH_PROMPT_BASE_COLOR \ + \ + $ZSH_THEME_SVN_PROMPT_SUFFIX \ + $ZSH_PROMPT_BASE_COLOR + fi +} + +function svn_repo_need_upgrade() { + grep -q "E155036" <<< ${1:-$(svn info 2> /dev/null)} && \ + echo "E155036: upgrade repo with svn upgrade" +} + +function svn_current_branch_name() { + grep '^URL:' <<< "${1:-$(svn info 2> /dev/null)}" | egrep -o '(tags|branches)/[^/]+|trunk' +} + +function svn_repo_root_name() { + grep '^Repository\ Root:' <<< "${1:-$(svn info 2> /dev/null)}" | sed 's#.*/##' +} + +function svn_current_revision() { + echo "${1:-$(svn info 2> /dev/null)}" | sed -n 's/Revision: //p' +} + +function svn_status_info() { + local svn_status_string="$ZSH_THEME_SVN_PROMPT_CLEAN" + local svn_status="$(svn status 2> /dev/null)"; + if grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi + if grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-✖}"; fi + if grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-✎}"; fi + if grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-∿}"; fi + if grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi + if grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi + echo $svn_status_string +} diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index f137253f3..4816ab0ed 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -16,3 +16,4 @@ function xcsel { alias xcb='xcodebuild' alias xcp='xcode-select --print-path' +alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app' diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme index f241efb6a..3c2f45658 100644 --- a/themes/af-magic.zsh-theme +++ b/themes/af-magic.zsh-theme @@ -8,8 +8,6 @@ # Created on: June 19, 2012 # Last modified on: June 20, 2012 - - if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" @@ -27,7 +25,12 @@ eval my_gray='$FG[237]' eval my_orange='$FG[214]' # right prompt -RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%' +if type "virtualenv_prompt_info" > /dev/null +then + RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%' +else + RPROMPT='$my_gray%n@%m%{$reset_color%}%' +fi # git settings ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:" diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index 43c101c2a..a44f295f4 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -32,3 +32,16 @@ PROMPT=" ${git_info} \ %{$fg[white]%}[%*] %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" + +if [[ "$(whoami)" == "root" ]]; then +PROMPT=" +%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ +%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \ +%{$fg[white]%}at \ +%{$fg[green]%}$(box_name) \ +%{$fg[white]%}in \ +%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\ +${git_info} \ +%{$fg[white]%}[%*] +%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" +fi |