mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
Merge remote branch 'robbyrussell/master'
This commit is contained in:
commit
7442954985
6 changed files with 40 additions and 30 deletions
|
@ -1,11 +1,11 @@
|
||||||
## fixme - the load process here seems a bit bizarre
|
## fixme - the load process here seems a bit bizarre
|
||||||
|
|
||||||
setopt noautomenu
|
unsetopt menu_complete # do not autoselect the first completion entry
|
||||||
|
unsetopt flowcontrol
|
||||||
|
setopt auto_menu # show completion menu on succesive tab press
|
||||||
setopt complete_in_word
|
setopt complete_in_word
|
||||||
setopt always_to_end
|
setopt always_to_end
|
||||||
|
|
||||||
unsetopt flowcontrol
|
|
||||||
|
|
||||||
WORDCHARS=''
|
WORDCHARS=''
|
||||||
|
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
|
@ -23,14 +23,10 @@ fi
|
||||||
|
|
||||||
zstyle ':completion:*' list-colors ''
|
zstyle ':completion:*' list-colors ''
|
||||||
|
|
||||||
|
|
||||||
unsetopt MENU_COMPLETE
|
|
||||||
#setopt AUTO_MENU
|
|
||||||
|
|
||||||
# should this be in keybindings?
|
# should this be in keybindings?
|
||||||
bindkey -M menuselect '^o' accept-and-infer-next-history
|
bindkey -M menuselect '^o' accept-and-infer-next-history
|
||||||
|
|
||||||
zstyle ':completion:*:*:*:*:*' menu yes select
|
zstyle ':completion:*:*:*:*:*' menu select
|
||||||
# zstyle ':completion:*:*:*:*:processes' force-list always
|
# zstyle ':completion:*:*:*:*:processes' force-list always
|
||||||
|
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||||
|
|
|
@ -5,7 +5,7 @@ function git_prompt_info() {
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_git_dirty () {
|
parse_git_dirty () {
|
||||||
if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then
|
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
else
|
else
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||||
|
|
|
@ -1,24 +1,3 @@
|
||||||
_rake_does_task_list_need_generating () {
|
|
||||||
if [ ! -f .rake_tasks~ ]; then return 0;
|
|
||||||
else
|
|
||||||
accurate=$(stat -f%m .rake_tasks~)
|
|
||||||
changed=$(stat -f%m Rakefile)
|
|
||||||
return $(expr $accurate '>=' $changed)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_rake () {
|
|
||||||
if [ -f Rakefile ]; then
|
|
||||||
if _rake_does_task_list_need_generating; then
|
|
||||||
echo "\nGenerating .rake_tasks~..." > /dev/stderr
|
|
||||||
rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~
|
|
||||||
fi
|
|
||||||
compadd `cat .rake_tasks~`
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
compctl -K _rake rake
|
|
||||||
|
|
||||||
function _cap_does_task_list_need_generating () {
|
function _cap_does_task_list_need_generating () {
|
||||||
if [ ! -f .cap_tasks~ ]; then return 0;
|
if [ ! -f .cap_tasks~ ]; then return 0;
|
||||||
else
|
else
|
||||||
|
|
20
lib/spectrum.zsh
Normal file
20
lib/spectrum.zsh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#! /bin/zsh
|
||||||
|
# A script to make using 256 colors in zsh less painful.
|
||||||
|
# P.C. Shyamshankar <sykora@lucentbeing.com>
|
||||||
|
# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
|
||||||
|
|
||||||
|
typeset -Ag FX FG BG
|
||||||
|
|
||||||
|
FX=(
|
||||||
|
reset "%{[00m%}"
|
||||||
|
bold "%{[01m%}" no-bold "%{[22m%}"
|
||||||
|
italic "%{[03m%}" no-italic "%{[23m%}"
|
||||||
|
underline "%{[04m%}" no-underline "%{[24m%}"
|
||||||
|
blink "%{[05m%}" no-blink "%{[25m%}"
|
||||||
|
reverse "%{[07m%}" no-reverse "%{[27m%}"
|
||||||
|
)
|
||||||
|
|
||||||
|
for color in {000..255}; do
|
||||||
|
FG[$color]="%{[38;5;${color}m%}"
|
||||||
|
BG[$color]="%{[48;5;${color}m%}"
|
||||||
|
done
|
|
@ -17,3 +17,5 @@ then
|
||||||
else
|
else
|
||||||
/usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh
|
/usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
unset config_file
|
13
themes/sporty_256.zsh-theme
Normal file
13
themes/sporty_256.zsh-theme
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# zsh theme requires 256 color enabled terminal
|
||||||
|
# i.e TERM=xterm-256color
|
||||||
|
# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
|
||||||
|
# based on robbyrussell's shell but louder!
|
||||||
|
|
||||||
|
PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f
|
||||||
|
%{$fg_bold[white]%}%# %{$reset_color%}'
|
||||||
|
RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|"
|
Loading…
Reference in a new issue