mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Merge fca320f2d9 into 0365ef0529
This commit is contained in:
commit
cae5a0f0ce
7 changed files with 51 additions and 0 deletions
|
|
@ -23,3 +23,9 @@ alias sl=ls # often screw this up
|
||||||
alias afind='ack-grep -il'
|
alias afind='ack-grep -il'
|
||||||
|
|
||||||
alias x=extract
|
alias x=extract
|
||||||
|
|
||||||
|
alias reload="source ~/.zshrc"
|
||||||
|
|
||||||
|
alias netr='netstat -rn '
|
||||||
|
alias nets='netstat -an -f inet '
|
||||||
|
alias netl='netstat -an -f inet | grep LISTEN'
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,10 @@ function rvm_prompt_info() {
|
||||||
echo "($ruby_version)"
|
echo "($ruby_version)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ -s $HOME/.rvm/scripts/rvm ]]; then
|
||||||
|
# Bugfix: prompt displays the current directory as "~rvm_rvmrc_cwd"
|
||||||
|
# http://beginrescueend.com/integration/zsh/
|
||||||
|
unsetopt auto_name_dirs
|
||||||
|
|
||||||
|
source $HOME/.rvm/scripts/rvm
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ _gem_installed() {
|
||||||
installed_gems=(`gem list --local --no-versions`)
|
installed_gems=(`gem list --local --no-versions`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_gem_installed_for_open() {
|
||||||
|
installed_gems=(`ruby -rubygems -e 'puts Dir["{#{Gem::SourceIndex.installed_spec_directories.join(",")}}/*.gemspec"].collect {|s| File.basename(s).gsub(/\.gemspec$/, "")}'`)
|
||||||
|
}
|
||||||
|
|
||||||
local -a _1st_arguments
|
local -a _1st_arguments
|
||||||
_1st_arguments=(
|
_1st_arguments=(
|
||||||
'cert:Manage RubyGems certificates and signing settings'
|
'cert:Manage RubyGems certificates and signing settings'
|
||||||
|
|
@ -22,6 +26,7 @@ _1st_arguments=(
|
||||||
'list:Display gems whose name starts with STRING'
|
'list:Display gems whose name starts with STRING'
|
||||||
'lock:Generate a lockdown list of gems'
|
'lock:Generate a lockdown list of gems'
|
||||||
'mirror:Mirror a gem repository'
|
'mirror:Mirror a gem repository'
|
||||||
|
'open:Open a gem into your favorite editor (install gem-open before: "[sudo] gem install gem-open")'
|
||||||
'outdated:Display all gems that need updates'
|
'outdated:Display all gems that need updates'
|
||||||
'owner:Manage gem owners on RubyGems.org.'
|
'owner:Manage gem owners on RubyGems.org.'
|
||||||
'pristine:Restores installed gems to pristine condition from files located in the gem cache'
|
'pristine:Restores installed gems to pristine condition from files located in the gem cache'
|
||||||
|
|
@ -61,4 +66,7 @@ case "$words[1]" in
|
||||||
uninstall|update)
|
uninstall|update)
|
||||||
_gem_installed
|
_gem_installed
|
||||||
_wanted installed_gems expl 'installed gems' compadd -a installed_gems ;;
|
_wanted installed_gems expl 'installed gems' compadd -a installed_gems ;;
|
||||||
|
open)
|
||||||
|
_gem_installed_for_open
|
||||||
|
_wanted installed_gems expl 'installed gems' compadd -a installed_gems ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -55,3 +55,7 @@ end do_submenu
|
||||||
do_submenu("iTerm", "Shell", "New Tab")
|
do_submenu("iTerm", "Shell", "New Tab")
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lock() {
|
||||||
|
open -a ScreenSaverEngine
|
||||||
|
}
|
||||||
|
|
|
||||||
1
plugins/rvm/rvm.plugin.zsh
Normal file
1
plugins/rvm/rvm.plugin.zsh
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
alias rvms='rvm gemset'
|
||||||
|
|
@ -25,4 +25,9 @@ plugins=(git)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# After open new tabs / windows and "Reuse Previous Tab's Directory"
|
||||||
|
# reload the .rvmrc file on current directory
|
||||||
|
# http://beginrescueend.com/integration/zsh/
|
||||||
|
[[ -s $HOME/.rvm/scripts/rvm ]] && __rvm_project_rvmrc
|
||||||
|
|
||||||
# Customize to your needs...
|
# Customize to your needs...
|
||||||
|
|
|
||||||
21
themes/tinogomes.zsh-theme
Normal file
21
themes/tinogomes.zsh-theme
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# tinogomes theme: based over dst
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}("
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[green]%})%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
function prompt_char {
|
||||||
|
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#RVM settings
|
||||||
|
local RVM_PROMPT=''
|
||||||
|
|
||||||
|
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||||
|
RVM_PROMPT='%{$fg[cyan]%}$(rvm_prompt_info)%{$reset_color%}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
PROMPT='
|
||||||
|
%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$reset_color%} '$RVM_PROMPT' $(git_prompt_info)
|
||||||
|
%_$(prompt_char) '
|
||||||
Loading…
Add table
Add a link
Reference in a new issue