Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/robbyrussell/oh-my-zsh: (181 commits)
  jump: fix printf path output (ohmyzsh#7105)
  vi-mode: reset-prompt if zle is active (TRAPWINCH)
  fix nmap vuln category name (ohmyzsh#7044)
  Update kubectl.plugin.zsh (ohmyzsh#6636)
  Fix rvm-prompt usage in fino* themes (ohmyzsh#6477)
  vi-mode show indicator on zle-line-init and SIGWINCH (ohmyzsh#6449)
  execute mvnw with "mvn" when mvnw-file is present (ohmyzsh#6484)
  executing gradlew, when gradlew-file exists (ohmyzsh#6485)
  Fixed `fwl` function in `firewalld` plugin when `sources` used (ohmyzsh#7011)
  kubectl: add alias for `kubectl cp` (ohmyzsh#7068)
  Update golang.plugin.zsh (ohmyzsh#6750)
  Update brew.plugin.zsh (ohmyzsh#6947)
  Add aliases for kubectl nodes (ohmyzsh#7093)
  Clarify random theme setting (ohmyzsh#7090)
  [plugins/git] Updated git clone alias (ohmyzsh#6893)
  Updating 'sbcl' to 'sbcln' (ohmyzsh#7095)
  git: add the `git show` alias `gsh` (ohmyzsh#5591)
  nyan: deprecate plugin with removal notice
  github: fix new_gh to force-add .gitignore (ohmyzsh#7086)
  trapd00r: clean up the script
  ...
  • Loading branch information
Gerardo Curiel committed Sep 3, 2018
2 parents 2160dcc + 0853b74 commit 648643a
Show file tree
Hide file tree
Showing 205 changed files with 3,937 additions and 1,674 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png" alt="Oh My Zsh">
</p>

Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration.
Oh My Zsh is an open source, community-driven framework for managing your [zsh](https://www.zsh.org/) configuration.

Sounds boring. Let's try again.

Expand All @@ -12,7 +12,7 @@ Once installed, your terminal shell will become the talk of the town _or your mo

Finally, you'll begin to get the sort of attention that you have always felt you deserved. ...or maybe you'll use the time that you're saving to start flossing more often. 😬

To learn more, visit [ohmyz.sh](http://ohmyz.sh) and follow [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter.
To learn more, visit [ohmyz.sh](https://ohmyz.sh) and follow [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter.

## Getting Started

Expand All @@ -21,7 +21,7 @@ To learn more, visit [ohmyz.sh](http://ohmyz.sh) and follow [@ohmyzsh](https://t
__Disclaimer:__ _Oh My Zsh works best on macOS and Linux._

* Unix-like operating system (macOS or Linux)
* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH)
* [Zsh](https://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH)
* `curl` or `wget` should be installed
* `git` should be installed

Expand Down Expand Up @@ -215,7 +215,7 @@ If you want to uninstall `oh-my-zsh`, just run `uninstall_oh_my_zsh` from the co

## Contributing

I'm far from being a [Zsh](http://www.zsh.org/) expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!
I'm far from being a [Zsh](https://www.zsh.org/) expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!

We also need people to test out pull-requests. So take a look through [the open issues](https://github.com/robbyrussell/oh-my-zsh/issues) and help where you can.

Expand All @@ -238,7 +238,7 @@ We're on the social media.

## Merchandise

We have [stickers](https://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town!
We have [stickers](https://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](https://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town!

## License

Expand Down
3 changes: 3 additions & 0 deletions custom/themes/example.zsh-theme
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Put your custom themes in this folder.
# Example:

PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% "
44 changes: 14 additions & 30 deletions lib/compfix.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# insecure ownership or permissions) by:
#
# * Human-readably notifying the user of these insecurities.
# * Moving away all existing completion caches to a temporary directory. Since
# any of these caches may have been generated from insecure directories, they
# are all suspect now. Failing to do so typically causes subsequent compinit()
# calls to fail with "command not found: compdef" errors. (That's bad.)
function handle_completion_insecurities() {
# List of the absolute paths of all unique insecure directories, split on
# newline from compaudit()'s output resembling:
Expand All @@ -22,39 +18,27 @@ function handle_completion_insecurities() {
insecure_dirs=( ${(f@):-"$(compaudit 2>/dev/null)"} )

# If no such directories exist, get us out of here.
if (( ! ${#insecure_dirs} )); then
print "[oh-my-zsh] No insecure completion-dependent directories detected."
return
fi
(( ! ${#insecure_dirs} )) && return

# List ownership and permissions of all insecure directories.
print "[oh-my-zsh] Insecure completion-dependent directories detected:"
ls -ld "${(@)insecure_dirs}"
print "[oh-my-zsh] For safety, completions will be disabled until you manually fix all"
print "[oh-my-zsh] insecure directory permissions and ownership and restart oh-my-zsh."
print "[oh-my-zsh] See the above list for directories with group or other writability.\n"

# Locally enable the "NULL_GLOB" option, thus removing unmatched filename
# globs from argument lists *AND* printing no warning when doing so. Failing
# to do so prints an unreadable warning if no completion caches exist below.
setopt local_options null_glob
cat <<EOD
# List of the absolute paths of all unique existing completion caches.
local -aU zcompdump_files
zcompdump_files=( "${ZSH_COMPDUMP}"(.) "${ZDOTDIR:-${HOME}}"/.zcompdump* )
[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.
# Move such caches to a temporary directory.
if (( ${#zcompdump_files} )); then
# Absolute path of the directory to which such files will be moved.
local ZSH_ZCOMPDUMP_BAD_DIR="${ZSH_CACHE_DIR}/zcompdump-bad"
[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w
# List such files first.
print "[oh-my-zsh] Insecure completion caches also detected:"
ls -l "${(@)zcompdump_files}"
[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.
# For safety, move rather than permanently remove such files.
print "[oh-my-zsh] Moving to \"${ZSH_ZCOMPDUMP_BAD_DIR}/\"...\n"
mkdir -p "${ZSH_ZCOMPDUMP_BAD_DIR}"
mv "${(@)zcompdump_files}" "${ZSH_ZCOMPDUMP_BAD_DIR}/"
fi
EOD
}
1 change: 1 addition & 0 deletions lib/correction.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if [[ "$ENABLE_CORRECTION" == "true" ]]; then
alias cp='nocorrect cp'
alias ebuild='nocorrect ebuild'
alias gist='nocorrect gist'
alias heroku='nocorrect heroku'
Expand Down
4 changes: 0 additions & 4 deletions lib/directories.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ alias lsa='ls -lah'
alias l='ls -lah'
alias ll='ls -lh'
alias la='ls -lAh'

# Push and pop directories on directory stack
alias pu='pushd'
alias po='popd'
20 changes: 8 additions & 12 deletions lib/functions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ function upgrade_oh_my_zsh() {
}

function take() {
mkdir -p $1
cd $1
mkdir -p $@ && cd ${@:$#}
}

function open_command() {
emulate -L zsh
setopt shwordsplit

local open_cmd

# define the open command
case "$OSTYPE" in
darwin*) open_cmd='open' ;;
cygwin*) open_cmd='cygstart' ;;
linux*) [[ $(uname -a) =~ "Microsoft" ]] && \
open_cmd='cmd.exe /c start' || \
open_cmd='xdg-open' ;;
linux*) ! [[ $(uname -a) =~ "Microsoft" ]] && open_cmd='xdg-open' || {
open_cmd='cmd.exe /c start ""'
[[ -e "$1" ]] && { 1="$(wslpath -w "${1:a}")" || return 1 }
} ;;
msys*) open_cmd='start ""' ;;
*) echo "Platform $OSTYPE not supported"
return 1
Expand All @@ -36,9 +33,9 @@ function open_command() {

# don't use nohup on OSX
if [[ "$OSTYPE" == darwin* ]]; then
$open_cmd "$@" &>/dev/null
${=open_cmd} "$@" &>/dev/null
else
nohup $open_cmd "$@" &>/dev/null
nohup ${=open_cmd} "$@" &>/dev/null
fi
}

Expand All @@ -54,8 +51,7 @@ function open_command() {
# 1 if it does not exist
#
function alias_value() {
alias "$1" | sed "s/^$1='\(.*\)'$/\1/"
test $(alias "$1")
(( $+aliases[$1] )) && echo $aliases[$1]
}

#
Expand Down
3 changes: 2 additions & 1 deletion lib/history.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ case $HIST_STAMPS in
"mm/dd/yyyy") alias history='omz_history -f' ;;
"dd.mm.yyyy") alias history='omz_history -E' ;;
"yyyy-mm-dd") alias history='omz_history -i' ;;
*) alias history='omz_history' ;;
"") alias history='omz_history' ;;
*) alias history="omz_history -t '$HIST_STAMPS'" ;;
esac

## History file configuration
Expand Down
2 changes: 1 addition & 1 deletion lib/prompt_info_functions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Real implementations will be used when the respective plugins are loaded
function chruby_prompt_info hg_prompt_info pyenv_prompt_info \
rbenv_prompt_info svn_prompt_info vi_mode_prompt_info \
virtualenv_prompt_info {
virtualenv_prompt_info jenv_prompt_info {
return 1
}

Expand Down
2 changes: 1 addition & 1 deletion lib/spectrum.zsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /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/
# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/

typeset -AHg FX FG BG

Expand Down
2 changes: 1 addition & 1 deletion lib/termsupport.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ preexec_functions+=(omz_termsupport_preexec)


# Keep Apple Terminal.app's current working directory updated
# Based on this answer: http://superuser.com/a/315029
# Based on this answer: https://superuser.com/a/315029
# With extra fixes to handle multibyte chars and non-UTF-8 locales

if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
Expand Down
32 changes: 17 additions & 15 deletions oh-my-zsh.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Set ZSH_CACHE_DIR to the path where cache files should be created
# or else we will use the default cache/
if [[ -z "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="$ZSH/cache"
fi

# Migrate .zsh-update file to $ZSH_CACHE_DIR
if [ -f ~/.zsh-update ] && [ ! -f ${ZSH_CACHE_DIR}/.zsh-update ]; then
mv ~/.zsh-update ${ZSH_CACHE_DIR}/.zsh-update
fi

# Check for updates on initial load...
if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh
env ZSH=$ZSH ZSH_CACHE_DIR=$ZSH_CACHE_DIR DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh
fi

# Initializes Oh My Zsh
Expand All @@ -11,20 +22,12 @@ fpath=($ZSH/functions $ZSH/completions $fpath)
# Load all stock functions (from $fpath files) called below.
autoload -U compaudit compinit

: ${ZSH_DISABLE_COMPFIX:=true}

# Set ZSH_CUSTOM to the path where your custom config files
# and plugins exists, or else we will use the default custom/
if [[ -z "$ZSH_CUSTOM" ]]; then
ZSH_CUSTOM="$ZSH/custom"
fi

# Set ZSH_CACHE_DIR to the path where cache files should be created
# or else we will use the default cache/
if [[ -z "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="$ZSH/cache"
fi


# Load all of the config files in ~/oh-my-zsh that end in .zsh
# TIP: Add files you don't want in git to .gitignore
Expand Down Expand Up @@ -65,16 +68,15 @@ if [ -z "$ZSH_COMPDUMP" ]; then
fi

if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
# If completion insecurities exist, warn the user without enabling completions.
# If completion insecurities exist, warn the user
if ! compaudit &>/dev/null; then
# This function resides in the "lib/compfix.zsh" script sourced above.
handle_completion_insecurities
# Else, enable and cache completions to the desired file.
else
compinit -d "${ZSH_COMPDUMP}"
fi
else
# Load only from secure directories
compinit -i -d "${ZSH_COMPDUMP}"
else
# If the user wants it, load from all found directories
compinit -u -d "${ZSH_COMPDUMP}"
fi

# Load all of the plugins that were defined in ~/.zshrc
Expand Down
4 changes: 2 additions & 2 deletions plugins/adb/_adb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ _arguments \

case "$state" in
specify_device)
_values 'devices' $(adb devices -l|awk 'NR>1&& $1 ~ /^[a-zA-Z0-9].*$/ \
{printf "%s[%s] ",$1,$6 }')
_values -C 'devices' ${$(adb devices -l|awk 'NR>1&& $1 \
{sub(/ +/," ",$0);gsub(":","\\:",$1); printf "%s[%s] ",$1, $NF}'):-""}
return
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion plugins/archlinux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| trupd | trizen -Sy && sudo abs | Update and refresh the local package and ABS databases |
| trupd | trizen -Sy && sudo aur | Update and refresh the local package and AUR databases |
| trupd | trizen -Sy | Update and refresh the local package database |
| trupd | trizen -Syua | Sync with repositories before upgrading all packages (from AUR too) |
| trupg | trizen -Syua | Sync with repositories before upgrading all packages (from AUR too) |
| trsu | trizen -Syua --no-confirm | Same as `trupg`, but without confirmation |
| upgrade | trizen -Syu | Sync with repositories before upgrading packages |

Expand Down
19 changes: 12 additions & 7 deletions plugins/asdf/asdf.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Find where asdf should be installed.
# Find where asdf should be installed
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"

# Load asdf, if found.
if [ -f $ASDF_DIR/asdf.sh ]; then
. $ASDF_DIR/asdf.sh
# If not found, check for Homebrew package
if [[ ! -d $ASDF_DIR ]] && (( $+commands[brew] )); then
ASDF_DIR="$(brew --prefix asdf)"
fi

# Load asdf completions, if found.
if [ -f $ASDF_DIR/completions/asdf.bash ]; then
. $ASDF_DIR/completions/asdf.bash
# Load command
if [[ -f "$ASDF_DIR/asdf.sh" ]]; then
. "$ASDF_DIR/asdf.sh"

# Load completions
if [[ -f "$ASDF_DIR/completions/asdf.bash" ]]; then
. "$ASDF_DIR/completions/asdf.bash"
fi
fi
4 changes: 2 additions & 2 deletions plugins/autojump/autojump.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed
. /etc/profile.d/autojump.sh
elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation
. /usr/local/share/autojump/autojump.zsh
elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
. /opt/local/etc/profile.d/autojump.zsh
elif [ -f /opt/local/etc/profile.d/autojump.sh ]; then # mac os x with ports
. /opt/local/etc/profile.d/autojump.sh
elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.sh ]; then # mac os x with brew
. `brew --prefix`/etc/autojump.sh
fi
Expand Down
11 changes: 5 additions & 6 deletions plugins/aws/aws.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ function asp {
}

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/'))
}

compctl -K aws_profiles asp

if _homebrew-installed && _awscli-homebrew-installed ; then
if which aws_zsh_completer.sh &>/dev/null; then
_aws_zsh_completer_path=$(which aws_zsh_completer.sh 2>/dev/null)
elif _homebrew-installed && _awscli-homebrew-installed; then
_aws_zsh_completer_path=$_brew_prefix/libexec/bin/aws_zsh_completer.sh
else
_aws_zsh_completer_path=$(which aws_zsh_completer.sh)
fi

[ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
[ -n "$_aws_zsh_completer_path" ] && [ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
unset _aws_zsh_completer_path
6 changes: 3 additions & 3 deletions plugins/bbedit/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## bbedit

Plugin for BBEdit, an HTML and text editor for Mac OS X
Plugin for BBEdit, an HTML and text editor for Mac OS X

### Requirements

* [BBEdit](http://www.barebones.com/products/bbedit/)
* [BBEdit Command-Line Tools](http://www.barebones.com/support/bbedit/cmd-line-tools.html)
* [BBEdit](https://www.barebones.com/products/bbedit/)
* [BBEdit Command-Line Tools](https://www.barebones.com/support/bbedit/cmd-line-tools.html)

### Usage

Expand Down
2 changes: 1 addition & 1 deletion plugins/bgnotify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Just add bgnotify to your plugins list in your `.zshrc`
- On OS X you'll need [terminal-notifier](https://github.com/alloy/terminal-notifier)
* `brew install terminal-notifier` (or `gem install terminal-notifier`)
- On ubuntu you're already all set!
- On windows you can use [notifu](http://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package
- On windows you can use [notifu](https://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package


## Screenshots
Expand Down
2 changes: 2 additions & 0 deletions plugins/brew/brew.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
alias brewp='brew pin'
alias brews='brew list -1'
alias brewsp='brew list --pinned'
alias bubo='brew update && brew outdated'
alias bubc='brew upgrade && brew cleanup'
alias bubu='bubo && bubc'
Expand Down
Loading

0 comments on commit 648643a

Please sign in to comment.