mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-13 03:12:21 +01:00
Merge remote-tracking branch 'upstream/master'
Conflicts: templates/zshrc.zsh-template
This commit is contained in:
commit
a96971e7a8
6 changed files with 12 additions and 16 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
if [ $commands[autojump] ]; then # check if autojump is installed
|
if [ $commands[autojump] ]; then # check if autojump is installed
|
||||||
if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
|
if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
|
||||||
. $HOME/.autojump/etc/profile.d/autojump.zsh
|
. $HOME/.autojump/etc/profile.d/autojump.zsh
|
||||||
|
elif [ -f $HOME/.nix-profile/etc/profile.d/autojump.zsh ]; then # nix installation
|
||||||
|
. $HOME/.nix-profile/etc/profile.d/autojump.zsh
|
||||||
elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
|
elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
|
||||||
. /usr/share/autojump/autojump.zsh
|
. /usr/share/autojump/autojump.zsh
|
||||||
elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
|
elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,17 @@ _homebrew-installed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_awscli-homebrew-installed() {
|
_awscli-homebrew-installed() {
|
||||||
brew --prefix awscli &> /dev/null
|
brew list awscli &> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
export AWS_HOME=~/.aws
|
export AWS_HOME=~/.aws
|
||||||
|
|
||||||
function agp {
|
function agp {
|
||||||
echo $AWS_DEFAULT_PROFILE
|
echo $AWS_DEFAULT_PROFILE
|
||||||
|
|
||||||
}
|
}
|
||||||
function asp {
|
function asp {
|
||||||
export AWS_DEFAULT_PROFILE=$1
|
export AWS_DEFAULT_PROFILE=$1
|
||||||
export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
|
export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
|
||||||
|
|
||||||
}
|
}
|
||||||
function aws_profiles {
|
function aws_profiles {
|
||||||
reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
|
reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ function extract() {
|
||||||
file_name="$( basename "$1" )"
|
file_name="$( basename "$1" )"
|
||||||
extract_dir="$( echo "$file_name" | sed "s/\.${1##*.}//g" )"
|
extract_dir="$( echo "$file_name" | sed "s/\.${1##*.}//g" )"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
(*.tar.gz|*.tgz) tar xvzf "$1" ;;
|
(*.tar.gz|*.tgz) [ -z $commands[pigz] ] && tar zxvf "$1" || pigz -dc "$1" | tar xv ;;
|
||||||
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
|
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
|
||||||
(*.tar.xz|*.txz) tar --xz --help &> /dev/null \
|
(*.tar.xz|*.txz) tar --xz --help &> /dev/null \
|
||||||
&& tar --xz -xvf "$1" \
|
&& tar --xz -xvf "$1" \
|
||||||
|
|
@ -47,7 +47,7 @@ function extract() {
|
||||||
&& tar --lzma -xvf "$1" \
|
&& tar --lzma -xvf "$1" \
|
||||||
|| lzcat "$1" | tar xvf - ;;
|
|| lzcat "$1" | tar xvf - ;;
|
||||||
(*.tar) tar xvf "$1" ;;
|
(*.tar) tar xvf "$1" ;;
|
||||||
(*.gz) gunzip "$1" ;;
|
(*.gz) [ -z $commands[pigz] ] && gunzip "$1" || pigz -d "$1" ;;
|
||||||
(*.bz2) bunzip2 "$1" ;;
|
(*.bz2) bunzip2 "$1" ;;
|
||||||
(*.xz) unxz "$1" ;;
|
(*.xz) unxz "$1" ;;
|
||||||
(*.lzma) unlzma "$1" ;;
|
(*.lzma) unlzma "$1" ;;
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,14 @@ DISABLE_AUTO_UPDATE="true"
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git)
|
plugins=(git)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
|
|
||||||
zstyle ':completion:*:descriptions' format '%B%d%b'
|
zstyle ':completion:*:descriptions' format '%B%d%b'
|
||||||
# User configuration
|
# User configuration
|
||||||
|
|
||||||
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||||
# export MANPATH="/usr/local/man:$MANPATH"
|
# export MANPATH="/usr/local/man:$MANPATH"
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
# You may need to manually set your language environment
|
# You may need to manually set your language environment
|
||||||
# export LANG=en_US.UTF-8
|
# export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
# git untracked files modification from Brian Carper:
|
# git untracked files modification from Brian Carper:
|
||||||
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
|
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
|
||||||
|
|
||||||
|
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
|
|
||||||
function virtualenv_info {
|
function virtualenv_info {
|
||||||
[ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') '
|
[ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') '
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,5 @@
|
||||||
# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
|
# Grab the current version of ruby in use: [ruby-1.8.7]
|
||||||
if [ -e ~/.rvm/bin/rvm-prompt ]; then
|
JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(ruby_prompt_info)%{$fg[white]%}]%{$reset_color%}"
|
||||||
JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
|
|
||||||
else
|
|
||||||
if which rbenv &> /dev/null; then
|
|
||||||
JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Grab the current filepath, use shortcuts: ~/Desktop
|
# Grab the current filepath, use shortcuts: ~/Desktop
|
||||||
# Append the current git branch, if in a git repository
|
# Append the current git branch, if in a git repository
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue