mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Remove whitespace [Gun.io WhitespaceBot]
This commit is contained in:
parent
ce4afcfa04
commit
c42205ffac
23 changed files with 72 additions and 72 deletions
|
|
@ -39,6 +39,6 @@ alias rd=rmdir
|
|||
alias d='dirs -v'
|
||||
|
||||
# mkdir & cd to it
|
||||
function mcd() {
|
||||
mkdir -p "$1" && cd "$1";
|
||||
function mcd() {
|
||||
mkdir -p "$1" && cd "$1";
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
#Limited support for Apple Terminal (Terminal can't set window or tab separately)
|
||||
function title {
|
||||
[ "$DISABLE_AUTO_TITLE" != "true" ] || return
|
||||
if [[ "$TERM" == screen* ]]; then
|
||||
if [[ "$TERM" == screen* ]]; then
|
||||
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
|
||||
elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
|
||||
print -Pn "\e]2;$2:q\a" #set window name
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ if [[ -x `which yaourt` ]]; then
|
|||
# Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
|
||||
alias yaupg='yaourt -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system.
|
||||
alias yain='yaourt -S' # Install specific package(s) from the repositories
|
||||
alias yains='yaourt -U' # Install specific package not from the repositories but from a file
|
||||
alias yains='yaourt -U' # Install specific package not from the repositories but from a file
|
||||
alias yare='yaourt -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
|
||||
alias yarem='yaourt -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
|
||||
alias yarep='yaourt -Si' # Display information about a given package in the repositories
|
||||
|
|
@ -34,7 +34,7 @@ fi
|
|||
# Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
|
||||
alias pacupg='sudo pacman -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system.
|
||||
alias pacin='sudo pacman -S' # Install specific package(s) from the repositories
|
||||
alias pacins='sudo pacman -U' # Install specific package not from the repositories but from a file
|
||||
alias pacins='sudo pacman -U' # Install specific package not from the repositories but from a file
|
||||
alias pacre='sudo pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
|
||||
alias pacrem='sudo pacman -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
|
||||
alias pacrep='pacman -Si' # Display information about a given package in the repositories
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
if (( ${+commands[compleat]} )); then
|
||||
local prefix="${commands[compleat]:h:h}"
|
||||
local setup="${prefix}/share/compleat-1.0/compleat_setup"
|
||||
local setup="${prefix}/share/compleat-1.0/compleat_setup"
|
||||
|
||||
if [[ -f "$setup" ]]; then
|
||||
if ! bashcompinit >/dev/null 2>&1; then
|
||||
|
|
@ -15,6 +15,6 @@ if (( ${+commands[compleat]} )); then
|
|||
bashcompinit -i
|
||||
fi
|
||||
|
||||
source "$setup"
|
||||
source "$setup"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/zsh
|
||||
#
|
||||
#
|
||||
# Make the dirstack more persistant
|
||||
#
|
||||
#
|
||||
# Add dirpersist to $plugins in ~/.zshrc to load
|
||||
#
|
||||
#
|
||||
|
||||
# $zdirstore is the file used to persist the stack
|
||||
zdirstore=~/.zdirstore
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ _managepy-reset(){
|
|||
|
||||
_managepy-runfcgi(){
|
||||
local state
|
||||
|
||||
|
||||
local fcgi_opts
|
||||
fcgi_opts=(
|
||||
'protocol[fcgi, scgi, ajp, ... (default fcgi)]:protocol:(fcgi scgi ajp)'
|
||||
|
|
@ -99,7 +99,7 @@ _managepy-runfcgi(){
|
|||
'outlog[write stdout to this file.]:file:_files'
|
||||
'errlog[write stderr to this file.]:file:_files'
|
||||
)
|
||||
|
||||
|
||||
_arguments -s : \
|
||||
$nul_args \
|
||||
'*: :_values "FCGI Setting" $fcgi_opts' && ret=0
|
||||
|
|
@ -159,7 +159,7 @@ _managepy-validate() {
|
|||
|
||||
_managepy-commands() {
|
||||
local -a commands
|
||||
|
||||
|
||||
commands=(
|
||||
'adminindex:prints the admin-index template snippet for the given app name(s).'
|
||||
'createcachetable:creates the table needed to use the SQL cache backend.'
|
||||
|
|
@ -189,7 +189,7 @@ _managepy-commands() {
|
|||
'testserver:Runs a development server with data from the given fixture(s).'
|
||||
'validate:Validates all installed models.'
|
||||
)
|
||||
|
||||
|
||||
_describe -t commands 'manage.py command' commands && ret=0
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ _applist() {
|
|||
|
||||
_managepy() {
|
||||
local curcontext=$curcontext ret=1
|
||||
|
||||
|
||||
if ((CURRENT == 2)); then
|
||||
_managepy-commands
|
||||
else
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ function extract() {
|
|||
|
||||
remove_archive=1
|
||||
if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then
|
||||
remove_archive=0
|
||||
remove_archive=0
|
||||
shift
|
||||
fi
|
||||
|
||||
|
|
@ -64,10 +64,10 @@ function extract() {
|
|||
cd ..; rm *.tar.gz debian-binary
|
||||
cd ..
|
||||
;;
|
||||
(*)
|
||||
(*)
|
||||
echo "extract: '$1' cannot be extracted" 1>&2
|
||||
success=1
|
||||
;;
|
||||
success=1
|
||||
;;
|
||||
esac
|
||||
|
||||
(( success = $success > 0 ? $success : $? ))
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ _knife() {
|
|||
'4: :->knifesubcmd3' \
|
||||
'5: :->knifesubcmd4' \
|
||||
'6: :->knifesubcmd5'
|
||||
|
||||
|
||||
case $state in
|
||||
knifecmd)
|
||||
compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" exec index node recipe role search ssh status windows $cloudproviders
|
||||
|
|
@ -50,7 +50,7 @@ _knife() {
|
|||
;;
|
||||
role)
|
||||
compadd -Q "$@" "bulk delete" create delete edit "from file" list show
|
||||
;;
|
||||
;;
|
||||
windows)
|
||||
compadd "$@" bootstrap
|
||||
;;
|
||||
|
|
@ -117,8 +117,8 @@ _knife() {
|
|||
else
|
||||
_arguments '*:Subsubcommands:($(_knife_options2))'
|
||||
fi
|
||||
;;
|
||||
knifesubcmd5)
|
||||
;;
|
||||
knifesubcmd5)
|
||||
_arguments '*:Subsubcommands:($(_knife_options3))'
|
||||
esac
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#compdef port
|
||||
|
||||
local subcmds
|
||||
local subcmds
|
||||
|
||||
# we cache the list of ports
|
||||
# we shall use some cache policy to avoid problems with new ports
|
||||
|
|
@ -31,8 +31,8 @@ subcmds=(
|
|||
'file'
|
||||
'help'
|
||||
'info'
|
||||
'install'
|
||||
'installed'
|
||||
'install'
|
||||
'installed'
|
||||
'list'
|
||||
'livecheck'
|
||||
'location'
|
||||
|
|
@ -48,7 +48,7 @@ subcmds=(
|
|||
'test'
|
||||
'unarchive'
|
||||
'uninstall'
|
||||
'upgrade'
|
||||
'upgrade'
|
||||
'variants'
|
||||
'version'
|
||||
)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ alias latest-perl='curl -s http://www.perl.org/get.html | perl -wlne '\''if (/pe
|
|||
|
||||
# Functions #################################################################
|
||||
|
||||
# newpl - creates a basic Perl script file and opens it with $EDITOR
|
||||
# newpl - creates a basic Perl script file and opens it with $EDITOR
|
||||
newpl () {
|
||||
# set $EDITOR to 'vim' if it is undefined
|
||||
[[ -z $EDITOR ]] && EDITOR=vim
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ _arguments -C \
|
|||
|
||||
case $state in
|
||||
cmds)
|
||||
cmds=(
|
||||
cmds=(
|
||||
"version:show the rvm version installed in rvm_path"
|
||||
"use:setup current shell to use a specific ruby version"
|
||||
"reload:reload rvm source itself (useful after changing rvm source)"
|
||||
|
|
@ -116,7 +116,7 @@ case $state in
|
|||
if (( CURRENT == 3 )); then
|
||||
_values 'package_commands' \
|
||||
'install' \
|
||||
'uninstall'
|
||||
'uninstall'
|
||||
else
|
||||
_values 'packages' \
|
||||
'readline' \
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function _plugin__start_agent()
|
|||
. ${_plugin__ssh_env} > /dev/null
|
||||
|
||||
# load identies
|
||||
zstyle -a :omz:plugins:ssh-agent identities identities
|
||||
zstyle -a :omz:plugins:ssh-agent identities identities
|
||||
echo starting...
|
||||
/usr/bin/ssh-add $HOME/.ssh/${^identities}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function in_svn() {
|
|||
function svn_get_repo_name {
|
||||
if [ in_svn ]; then
|
||||
svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT
|
||||
|
||||
|
||||
svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | sed "s/\/.*$//"
|
||||
fi
|
||||
}
|
||||
|
|
@ -29,9 +29,9 @@ function svn_get_rev_nr {
|
|||
function svn_dirty_choose {
|
||||
if [ in_svn ]; then
|
||||
s=$(svn status|grep -E '^\s*[ACDIM!?L]' 2>/dev/null)
|
||||
if [ $s ]; then
|
||||
if [ $s ]; then
|
||||
echo $1
|
||||
else
|
||||
else
|
||||
echo $2
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#compdef vagrant
|
||||
#compdef vagrant
|
||||
#autoload
|
||||
|
||||
# vagrant zsh completion
|
||||
|
|
@ -64,7 +64,7 @@ __vagrant-box ()
|
|||
(options)
|
||||
case $line[1] in
|
||||
(repackage|remove)
|
||||
_arguments ':feature:__box_list'
|
||||
_arguments ':feature:__box_list'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
@ -93,7 +93,7 @@ case $state in
|
|||
(options)
|
||||
case $line[1] in
|
||||
(help)
|
||||
_arguments ':feature:__task_list'
|
||||
_arguments ':feature:__task_list'
|
||||
;;
|
||||
|
||||
(box)
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
|
|||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||
|
||||
# Text to display if the branch is dirty
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||
|
||||
# Text to display if the branch is clean
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Colors vary depending on time lapsed.
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
|
||||
|
|
@ -35,7 +35,7 @@ function rvm_gemset() {
|
|||
GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
|
||||
if [[ -n $GEMSET ]]; then
|
||||
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -53,12 +53,12 @@ function git_time_since_commit() {
|
|||
# Totals
|
||||
MINUTES=$((seconds_since_last_commit / 60))
|
||||
HOURS=$((seconds_since_last_commit/3600))
|
||||
|
||||
|
||||
# Sub-hours and sub-minutes
|
||||
DAYS=$((seconds_since_last_commit / 86400))
|
||||
SUB_HOURS=$((HOURS % 24))
|
||||
SUB_MINUTES=$((MINUTES % 60))
|
||||
|
||||
|
||||
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||
if [ "$MINUTES" -gt 30 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#RVM settings
|
||||
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ git_custom_status() {
|
|||
}
|
||||
|
||||
#RVM and git settings
|
||||
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||
RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1'
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ function precmd {
|
|||
|
||||
###
|
||||
# Truncate the path if it's too long.
|
||||
|
||||
|
||||
PR_FILLBAR=""
|
||||
PR_PWDLEN=""
|
||||
|
||||
|
||||
local promptsize=${#${(%):---(%n@%m:%l)---()--}}
|
||||
local rubyprompt=`rvm_prompt_info`
|
||||
local rubypromptsize=${#${rubyprompt}}
|
||||
local pwdsize=${#${(%):-%~}}
|
||||
|
||||
|
||||
if [[ "$promptsize + $rubypromptsize + $pwdsize" -gt $TERMWIDTH ]]; then
|
||||
((PR_PWDLEN=$TERMWIDTH - $promptsize))
|
||||
else
|
||||
|
|
@ -69,7 +69,7 @@ setprompt () {
|
|||
|
||||
###
|
||||
# See if we can use extended characters to look nicer.
|
||||
|
||||
|
||||
typeset -A altchar
|
||||
set -A altchar ${(s..)terminfo[acsc]}
|
||||
PR_SET_CHARSET="%{$terminfo[enacs]%}"
|
||||
|
|
@ -81,10 +81,10 @@ setprompt () {
|
|||
PR_LRCORNER=${altchar[j]:--}
|
||||
PR_URCORNER=${altchar[k]:--}
|
||||
|
||||
|
||||
|
||||
###
|
||||
# Decide if we need to set titlebar text.
|
||||
|
||||
|
||||
case $TERM in
|
||||
xterm*)
|
||||
PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
|
||||
|
|
@ -96,8 +96,8 @@ setprompt () {
|
|||
PR_TITLEBAR=''
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
###
|
||||
# Decide whether to set a screen title
|
||||
if [[ "$TERM" == "screen" ]]; then
|
||||
|
|
@ -105,8 +105,8 @@ setprompt () {
|
|||
else
|
||||
PR_STITLE=''
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
###
|
||||
# Finally, the prompt.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function josh_prompt {
|
|||
branch_size=${#branch}
|
||||
ruby_size=${#ruby_version}
|
||||
user_machine_size=${#${(%):-%n@%m-}}
|
||||
|
||||
|
||||
if [[ ${#branch} -eq 0 ]]
|
||||
then (( ruby_size = ruby_size + 1 ))
|
||||
else
|
||||
|
|
@ -24,15 +24,15 @@ function josh_prompt {
|
|||
(( branch_size = branch_size + 2 ))
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
(( spare_width = ${spare_width} - (${user_machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) ))
|
||||
|
||||
while [ ${#prompt} -lt $spare_width ]; do
|
||||
prompt=" $prompt"
|
||||
done
|
||||
|
||||
|
||||
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)"
|
||||
|
||||
|
||||
echo $prompt
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ prompt_jnrowe_precmd () {
|
|||
#dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/"
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
#dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
|
||||
|
||||
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
|
||||
> '
|
||||
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
||||
|
|
@ -55,7 +55,7 @@ prompt_jnrowe_precmd () {
|
|||
PROMPT='${vcs_info_msg_0_}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||
> '
|
||||
|
||||
|
||||
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ prompt_jnrowe_precmd () {
|
|||
PROMPT='${vcs_info_msg_0_}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||
> '
|
||||
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# /|/ Code by Stephen
|
||||
# /|/ "Rixius" Middleton
|
||||
#
|
||||
#
|
||||
# name in folder (github)
|
||||
# ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right.
|
||||
function collapse_pwd {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
|
||||
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
|
||||
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
|
||||
|
||||
|
||||
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}"
|
||||
|
|
@ -26,10 +26,10 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
|
|||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||
else
|
||||
else
|
||||
MODE_INDICATOR="❮❮❮"
|
||||
local return_status="%(?::⏎)"
|
||||
|
||||
|
||||
PROMPT='%c$(git_prompt_info) %(!.#.❯) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" git:"
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
# - Place that bundle in ~/Library/Application\ Support/SIMBL/Plugins (create that folder if it doesn't exist)
|
||||
# - Open Terminal preferences. Go to Settings -> Text -> More
|
||||
# - Change default colours to your liking.
|
||||
#
|
||||
#
|
||||
# Here are the colours from Textmate's Monokai theme:
|
||||
#
|
||||
#
|
||||
# Black: 0, 0, 0
|
||||
# Red: 229, 34, 34
|
||||
# Green: 166, 227, 45
|
||||
|
|
@ -28,7 +28,7 @@ PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
|
|||
RPROMPT='${time} %{$fg[magenta]%}$(git_prompt_info)%{$reset_color%}$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
# Add this at the start of RPROMPT to include rvm info showing ruby-version@gemset-name
|
||||
# %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
|
||||
# %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
|
||||
|
||||
# local time, color coded by last return code
|
||||
time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
|
||||
|
|
@ -49,7 +49,7 @@ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ♒" # ⓤ ⑊
|
|||
|
||||
# More symbols to choose from:
|
||||
# ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
|
||||
# ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠
|
||||
# ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠
|
||||
# ⬅ ⬆ ⬇ ⬈ ⬉ ⬊ ⬋ ⬒ ⬓ ⬔ ⬕ ⬖ ⬗ ⬘ ⬙ ⬟ ⬤ 〒 ǀ ǁ ǂ ĭ Ť Ŧ
|
||||
|
||||
# Determine if we are using a gemset.
|
||||
|
|
@ -57,7 +57,7 @@ function rvm_gemset() {
|
|||
GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
|
||||
if [[ -n $GEMSET ]]; then
|
||||
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine the time since last commit. If branch is clean,
|
||||
|
|
@ -74,12 +74,12 @@ function git_time_since_commit() {
|
|||
# Totals
|
||||
MINUTES=$((seconds_since_last_commit / 60))
|
||||
HOURS=$((seconds_since_last_commit/3600))
|
||||
|
||||
|
||||
# Sub-hours and sub-minutes
|
||||
DAYS=$((seconds_since_last_commit / 86400))
|
||||
SUB_HOURS=$((HOURS % 24))
|
||||
SUB_MINUTES=$((MINUTES % 60))
|
||||
|
||||
|
||||
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||
if [ "$MINUTES" -gt 30 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue