summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2018-02-08 11:10:56 -0700
committerTuowen Zhao <ztuowen@gmail.com>2018-02-08 11:10:56 -0700
commitb7b623d6de696b81d213ec666d072851561d5c06 (patch)
tree996eeb851a9be04c351c4067ed6608c17c8164e8
parentb388fd7fdaccf2875cb5ef58c100dd7634b74bc3 (diff)
parent37c2d0ddd751e15d0c87a51e2d9f9849093571dc (diff)
downloadzsh-b7b623d6de696b81d213ec666d072851561d5c06.tar.gz
zsh-b7b623d6de696b81d213ec666d072851561d5c06.tar.bz2
zsh-b7b623d6de696b81d213ec666d072851561d5c06.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
-rw-r--r--LICENSE.txt2
-rw-r--r--lib/git.zsh4
-rw-r--r--plugins/bgnotify/README.md2
-rw-r--r--plugins/bundler/bundler.plugin.zsh1
-rw-r--r--plugins/colorize/colorize.plugin.zsh5
-rw-r--r--plugins/dirhistory/dirhistory.plugin.zsh3
-rw-r--r--plugins/docker/_docker13
-rw-r--r--plugins/eecms/eecms.plugin.zsh20
-rw-r--r--plugins/extract/extract.plugin.zsh2
-rw-r--r--plugins/lol/lol.plugin.zsh1
-rw-r--r--plugins/sublime/README.md4
-rw-r--r--plugins/sublime/sublime.plugin.zsh31
-rw-r--r--plugins/terraform/_terraform1
13 files changed, 78 insertions, 11 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
index ed0ae75fc..7af38f217 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2009-2017 Robby Russell and contributors
+Copyright (c) 2009-2018 Robby Russell and contributors
See the full list at https://github.com/robbyrussell/oh-my-zsh/contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/lib/git.zsh b/lib/git.zsh
index 167b4b0ea..9b0f6e36f 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -141,11 +141,15 @@ function git_prompt_status() {
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
+ elif $(echo "$INDEX" | grep '^MM ' &> /dev/null); then
+ STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
fi
if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
+ elif $(echo "$INDEX" | grep '^MM ' &> /dev/null); then
+ STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
fi
diff --git a/plugins/bgnotify/README.md b/plugins/bgnotify/README.md
index b154916d6..fad299159 100644
--- a/plugins/bgnotify/README.md
+++ b/plugins/bgnotify/README.md
@@ -10,7 +10,7 @@ Standalone homepage: [t413/zsh-background-notify](https://github.com/t413/zsh-ba
Just add bgnotify to your plugins list in your `.zshrc`
-- On OS X you'll need [terminal-notifer](https://github.com/alloy/terminal-notifier)
+- 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
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index c5284dbb1..6b10b78d1 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -14,6 +14,7 @@ bundled_commands=(
cucumber
foodcritic
guard
+ hanami
irb
jekyll
kitchen
diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
index 11b58e69d..b97dffe43 100644
--- a/plugins/colorize/colorize.plugin.zsh
+++ b/plugins/colorize/colorize.plugin.zsh
@@ -3,11 +3,12 @@
# If no highlighting method supported for given extension then it tries
# guess it by looking for file content.
-alias colorize='colorize_via_pygmentize'
+#easier alias to use plugin
+alias ccat='colorize_via_pygmentize'
colorize_via_pygmentize() {
if [ ! -x "$(which pygmentize)" ]; then
- echo "package \'pygmentize\' is not installed!"
+ echo "package \'Pygments\' is not installed!"
return -1
fi
diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh
index 0209981e3..8138872bc 100644
--- a/plugins/dirhistory/dirhistory.plugin.zsh
+++ b/plugins/dirhistory/dirhistory.plugin.zsh
@@ -119,6 +119,8 @@ zle -N dirhistory_zle_dirhistory_back
# xterm in normal mode
bindkey "\e[3D" dirhistory_zle_dirhistory_back
bindkey "\e[1;3D" dirhistory_zle_dirhistory_back
+# Mac teminal (alt+left/right)
+bindkey "^[b" dirhistory_zle_dirhistory_back
# Putty:
bindkey "\e\e[D" dirhistory_zle_dirhistory_back
# GNU screen:
@@ -127,6 +129,7 @@ bindkey "\eO3D" dirhistory_zle_dirhistory_back
zle -N dirhistory_zle_dirhistory_future
bindkey "\e[3C" dirhistory_zle_dirhistory_future
bindkey "\e[1;3C" dirhistory_zle_dirhistory_future
+bindkey "^[f" dirhistory_zle_dirhistory_future
bindkey "\e\e[C" dirhistory_zle_dirhistory_future
bindkey "\eO3C" dirhistory_zle_dirhistory_future
diff --git a/plugins/docker/_docker b/plugins/docker/_docker
index 5d6edd880..0c20cf28e 100644
--- a/plugins/docker/_docker
+++ b/plugins/docker/_docker
@@ -226,7 +226,7 @@ __docker_get_log_options() {
common_options=("max-buffer-size" "mode")
common_options2=("env" "env-regex" "labels")
awslogs_options=($common_options "awslogs-create-group" "awslogs-datetime-format" "awslogs-group" "awslogs-multiline-pattern" "awslogs-region" "awslogs-stream" "tag")
- fluentd_options=($common_options $common_options2 "fluentd-address" "fluentd-async-connect" "fluentd-buffer-limit" "fluentd-retry-wait" "fluentd-max-retries" "tag")
+ fluentd_options=($common_options $common_options2 "fluentd-address" "fluentd-async-connect" "fluentd-buffer-limit" "fluentd-retry-wait" "fluentd-max-retries" "fluentd-sub-second-precision" "tag")
gcplogs_options=($common_options $common_options2 "gcp-log-cmd" "gcp-meta-id" "gcp-meta-name" "gcp-meta-zone" "gcp-project")
gelf_options=($common_options $common_options2 "gelf-address" "gelf-compression-level" "gelf-compression-type" "tag")
journald_options=($common_options $common_options2 "tag")
@@ -745,6 +745,7 @@ __docker_container_subcommand() {
"($help)--privileged[Give extended Linux capabilities to the command]" \
"($help -t --tty)"{-t,--tty}"[Allocate a pseudo-tty]" \
"($help -u --user)"{-u=,--user=}"[Username or UID]:user:_users" \
+ "($help -w --workdir)"{-w=,--workdir=}"[Working directory inside the container]:directory:_directories" \
"($help -):containers:__docker_complete_running_containers" \
"($help -)*::command:->anycommand" && ret=0
case $state in
@@ -1393,7 +1394,7 @@ __docker_nodes() {
# Names
if [[ $type = (names|all) ]]; then
for line in $lines; do
- s="${line[${begin[NAME]},${end[NAME]}]%% ##}"
+ s="${line[${begin[HOSTNAME]},${end[HOSTNAME]}]%% ##}"
nodes=($nodes $s)
done
fi
@@ -1955,6 +1956,7 @@ __docker_service_subcommand() {
"($help)--health-retries=[Consecutive failures needed to report unhealthy]:retries:(1 2 3 4 5)"
"($help)--health-timeout=[Maximum time to allow one check to run]:time: "
"($help)--hostname=[Service container hostname]:hostname: " \
+ "($help)--isolation=[Service container isolation mode]:isolation:(default process hyperv)" \
"($help)*--label=[Service labels]:label: "
"($help)--limit-cpu=[Limit CPUs]:value: "
"($help)--limit-memory=[Limit Memory]:value: "
@@ -2168,9 +2170,9 @@ __docker_stacks() {
end[${header[$i,$((j-1))]}]=-1
lines=(${lines[2,-1]})
- # Service ID
+ # Service NAME
for line in $lines; do
- s="${line[${begin[ID]},${end[ID]}]%% ##}"
+ s="${line[${begin[NAME]},${end[NAME]}]%% ##}"
stacks=($stacks $s)
done
@@ -2631,7 +2633,6 @@ __docker_subcommand() {
"($help)--default-gateway-v6[Container default gateway IPv6 address]:IPv6 address: " \
"($help)--default-shm-size=[Default shm size for containers]:size:" \
"($help)*--default-ulimit=[Default ulimits for containers]:ulimit: " \
- "($help)--disable-legacy-registry[Disable contacting legacy registries (default true)]" \
"($help)*--dns=[DNS server to use]:DNS: " \
"($help)*--dns-opt=[DNS options to use]:DNS option: " \
"($help)*--dns-search=[DNS search domains to use]:DNS search: " \
@@ -3023,4 +3024,4 @@ _docker "$@"
# indent-tabs-mode: nil
# sh-basic-offset: 4
# End:
-# vim: ft=zsh sw=4 ts=4 et
+# vim: ft=zsh sw=4 ts=4 et \ No newline at end of file
diff --git a/plugins/eecms/eecms.plugin.zsh b/plugins/eecms/eecms.plugin.zsh
new file mode 100644
index 000000000..ee10fbb7e
--- /dev/null
+++ b/plugins/eecms/eecms.plugin.zsh
@@ -0,0 +1,20 @@
+# ExpressionEngine CMS basic command completion
+
+_eecms_console () {
+ echo "php $(find . -maxdepth 3 -mindepth 1 -name 'eecms' -type f | head -n 1)"
+}
+
+_eecms_get_command_list () {
+ `_eecms_console` | sed "/Available commands/,/^/d" | sed "s/[[:space:]].*//g"
+}
+
+_eecms () {
+ compadd `_eecms_get_command_list`
+}
+
+compdef _eecms '`_eecms_console`'
+compdef _eecms 'system/ee/eecms'
+compdef _eecms eecms
+
+#Alias
+alias eecms='`_eecms_console`'
diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
index c524bf8f5..34f8d8710 100644
--- a/plugins/extract/extract.plugin.zsh
+++ b/plugins/extract/extract.plugin.zsh
@@ -10,7 +10,7 @@ extract() {
Usage: extract [-option] [file ...]
Options:
- -r, --remove Remove archive.
+ -r, --remove Remove archive after unpacking.
EOF
fi
diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh
index 1b32ec2e4..e9a62a863 100644
--- a/plugins/lol/lol.plugin.zsh
+++ b/plugins/lol/lol.plugin.zsh
@@ -45,6 +45,7 @@ alias bringz='git pull'
alias chicken='git add'
alias oanward='git commit -m'
alias ooanward='git commit -am'
+alias yolo='git commit -m "$(curl -s whatthecommit.com/index.txt)"'
alias letcat='git checkout'
alias violenz='git rebase'
diff --git a/plugins/sublime/README.md b/plugins/sublime/README.md
index 7b02d8428..5379891ad 100644
--- a/plugins/sublime/README.md
+++ b/plugins/sublime/README.md
@@ -19,3 +19,7 @@ Plugin for Sublime Text, a cross platform text and code editor, available for Li
* If `sst` command is called, it is like `sudo st`, opening the file or folder in Sublime Text. Useful for editing system protected files.
* If `stp` command is called, it find a `.sublime-project` file by traversing up the directory structure. If there is no `.sublime-project` file, but if the current folder is a Git repo, opens up the root directory of the repo. If the current folder is not a Git repo, then opens up the current directory.
+
+ * If `stn` command is called without an argument, create a stub `.sublime-project` file in the current working directory if one does not already exist
+
+ * If `stn` is passed a directory, create a stub `.sublime-project` file in it
diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
index f84b7032a..22cf98227 100644
--- a/plugins/sublime/sublime.plugin.zsh
+++ b/plugins/sublime/sublime.plugin.zsh
@@ -84,4 +84,35 @@ find_project()
st $FINAL_DEST
}
+function create_project() {
+
+ local _target=$1
+
+ if [[ "${_target}" == "" ]]; then
+ _target=$(pwd);
+ elif [[ ! -d ${_target} ]]; then
+ echo "${_target} is not a valid directory"
+ return 1
+ fi
+
+ local _sublime_project_file=$_target/$(basename $_target).sublime-project
+
+ if [[ ! -f $_sublime_project_file ]]; then
+
+ touch $_sublime_project_file
+
+ echo -e "{" >> $_sublime_project_file
+ echo -e "\t\"folders\":" >> $_sublime_project_file
+ echo -e "\t\t[{" >> $_sublime_project_file
+ echo -e "\t\t\t\"path\": \".\"," >> $_sublime_project_file
+ echo -e "\t\t\t\"file_exclude_patterns\": []" >> $_sublime_project_file
+ echo -e "\t\t}]" >> $_sublime_project_file
+ echo -e "}" >> $_sublime_project_file
+
+ echo -e "New Sublime Text project created:\n\t${_sublime_project_file}"
+
+ fi
+}
+
alias stp=find_project
+alias stn=create_project
diff --git a/plugins/terraform/_terraform b/plugins/terraform/_terraform
index d67820603..285d83ec7 100644
--- a/plugins/terraform/_terraform
+++ b/plugins/terraform/_terraform
@@ -20,6 +20,7 @@ _terraform_cmds=(
__apply() {
_arguments \
+ '-auto-approve[Skip interactive approval of plan before applying.]' \
'-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
'-input=[(true) Ask for input for variables if not directly set.]' \
'-no-color[If specified, output will not contain any color.]' \