mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Merge commit 'rubbyrussell/master' into integrate
This commit is contained in:
commit
33b1c1982e
7 changed files with 51 additions and 18 deletions
|
|
@ -44,7 +44,7 @@ if [ -f ~/.ssh/known_hosts ]; then
|
|||
fi
|
||||
|
||||
# Complete on history
|
||||
# zstyle ':completion:*:history-words' stop yes
|
||||
# zstyle ':completion:*:history-words' remove-all-dups yes
|
||||
# zstyle ':completion:*:history-words' list false
|
||||
# zstyle ':completion:*:history-words' menu yes
|
||||
#zstyle ':completion:*:history-words' stop yes
|
||||
#zstyle ':completion:*:history-words' remove-all-dups yes
|
||||
#zstyle ':completion:*:history-words' list false
|
||||
#zstyle ':completion:*:history-words' menu yes
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@ setopt correct_all
|
|||
alias man='nocorrect man'
|
||||
alias mv='nocorrect mv'
|
||||
alias mysql='nocorrect mysql'
|
||||
alias mv='nocorrect mv'
|
||||
alias mkdir='nocorrect mkdir'
|
||||
alias gist='nocorrect gist'
|
||||
alias heroku='nocorrect heroku'
|
||||
|
|
|
|||
|
|
@ -58,3 +58,20 @@ function tm() {
|
|||
cd $1
|
||||
mate $1
|
||||
}
|
||||
|
||||
# To use: add a .lighthouse file into your directory with the URL to the
|
||||
# individual project. For example:
|
||||
# https://rails.lighthouseapp.com/projects/8994
|
||||
# Example usage: http://screencast.com/t/ZDgwNDUwNT
|
||||
open_lighthouse_ticket () {
|
||||
if [ ! -f .lighthouse-url ]; then
|
||||
echo "There is no .lighthouse file in the current directory..."
|
||||
return 0;
|
||||
else
|
||||
lighthouse_url=$(cat .lighthouse-url);
|
||||
echo "Opening ticket #$1";
|
||||
`open $lighthouse_url/tickets/$1`;
|
||||
fi
|
||||
}
|
||||
|
||||
alias lho='open_lighthouse_ticket'
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ if [ "$DISABLE_AUTO_UPDATE" = "true" ]
|
|||
then
|
||||
return
|
||||
else
|
||||
/bin/sh $ZSH/tools/check_for_upgrade.sh
|
||||
/usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh
|
||||
fi
|
||||
|
|
|
|||
8
themes/macovsky.zsh-theme
Normal file
8
themes/macovsky.zsh-theme
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[green]%}%~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[yellow]%}•%{$fg_no_bold[magenta]%}%3~$(git_prompt_info)%{$reset_color%}» '
|
||||
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}➜%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» '
|
||||
RPROMPT='[%*]'
|
||||
|
||||
# git theming
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$fg_bold[blue]%})"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})"
|
||||
|
||||
# LS colors, made with http://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
current_epoch=$(($(date +%s) / 60 / 60 / 24))
|
||||
function _current_epoch() {
|
||||
echo $(($(date +%s) / 60 / 60 / 24))
|
||||
}
|
||||
|
||||
function _update_zsh_update() {
|
||||
echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update
|
||||
}
|
||||
|
||||
if [ -f ~/.zsh-update ]
|
||||
then
|
||||
. ~/.zsh-update
|
||||
epoch_diff=$(($current_epoch - $LAST_EPOCH))
|
||||
|
||||
if [[ -z "$LAST_EPOCH" ]]; then
|
||||
_update_zsh_update && return 0;
|
||||
fi
|
||||
|
||||
epoch_diff=$((${_current_epoch} - $LAST_EPOCH))
|
||||
if [ $epoch_diff -gt 6 ]
|
||||
then
|
||||
echo "[Oh My Zsh] Would you like to check for updates?"
|
||||
|
|
@ -15,14 +26,9 @@ then
|
|||
then
|
||||
/bin/sh $ZSH/tools/upgrade.sh
|
||||
fi
|
||||
|
||||
# Set the last epoch to the current so that we don't ask for another week
|
||||
echo "LAST_EPOCH=${current_epoch}" > ~/.zsh-update
|
||||
fi
|
||||
else
|
||||
# TODO: refactor this so remove duplicates
|
||||
# Create the ~/.zsh-update file with the current epoch info
|
||||
echo "LAST_EPOCH=${current_epoch}" > ~/.zsh-update
|
||||
fi
|
||||
|
||||
# update the zsh file
|
||||
_update_zsh_update
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue